Merge branch 'namingNames' into 'master'

Naming names

See merge request core-developers/forge!3001
This commit is contained in:
Sol
2020-07-15 12:11:39 +00:00
6 changed files with 13 additions and 10 deletions

View File

@@ -97,6 +97,7 @@ public class CardDetailPanel extends SkinnedPanel {
cdArea.setBorder(new EmptyBorder(2, 6, 2, 6)); cdArea.setBorder(new EmptyBorder(2, 6, 2, 6));
cdArea.setOpaque(false); cdArea.setOpaque(false);
cdArea.setFocusable(true); cdArea.setFocusable(true);
cdArea.getAccessibleContext().setAccessibleName("Card textbox");
scrArea = new FScrollPane(cdArea, false); scrArea = new FScrollPane(cdArea, false);
add(nameCostLabel); add(nameCostLabel);

View File

@@ -451,6 +451,7 @@ public abstract class ItemManager<T extends InventoryItem> extends JPanel implem
@Override @Override
public void setCaption(final String caption) { public void setCaption(final String caption) {
this.lblCaption.setText(caption); this.lblCaption.setText(caption);
this.lblCaption.setLabelFor(this.listView.getTable());
} }
/** /**

View File

@@ -23,7 +23,8 @@ public class StartButton extends SkinnedButton {
setRolloverIcon(FSkin.getIcon(FSkinProp.IMG_BTN_START_OVER)); setRolloverIcon(FSkin.getIcon(FSkinProp.IMG_BTN_START_OVER));
setIcon(FSkin.getIcon(FSkinProp.IMG_BTN_START_UP)); setIcon(FSkin.getIcon(FSkinProp.IMG_BTN_START_UP));
setPressedIcon(FSkin.getIcon(FSkinProp.IMG_BTN_START_DOWN)); setPressedIcon(FSkin.getIcon(FSkinProp.IMG_BTN_START_DOWN));
// Accessible name.
this.getAccessibleContext().setAccessibleName("Start game");
addFocusListener(new FocusListener() { addFocusListener(new FocusListener() {
@Override @Override
public void focusLost(FocusEvent arg0) { public void focusLost(FocusEvent arg0) {

View File

@@ -183,7 +183,6 @@ public class VLobby implements ILobbyView {
if (lobby.hasControl()) { if (lobby.hasControl()) {
pnlStart.setOpaque(false); pnlStart.setOpaque(false);
pnlStart.add(btnStart, "align center"); pnlStart.add(btnStart, "align center");
// Start button event handling // Start button event handling
btnStart.addActionListener(new ActionListener() { btnStart.addActionListener(new ActionListener() {
@Override @Override

View File

@@ -57,22 +57,17 @@ public enum VSubmenuQuestStart implements IVSubmenu<CSubmenuQuestStart> {
private final FLabel lblStartingWorld = new FLabel.Builder().text(localizer.getMessage("lblStartingWorld") + ":").build(); private final FLabel lblStartingWorld = new FLabel.Builder().text(localizer.getMessage("lblStartingWorld") + ":").build();
private final FComboBoxWrapper<QuestWorld> cbxStartingWorld = new FComboBoxWrapper<>(); private final FComboBoxWrapper<QuestWorld> cbxStartingWorld = new FComboBoxWrapper<>();
/* Second column */ /* Second column */
private final FLabel lblStartingPool = new FLabel.Builder().text(localizer.getMessage("lblStartingPool") + ":").build(); private final FLabel lblStartingPool = new FLabel.Builder().text(localizer.getMessage("lblStartingPool") + ":").build();
private final FComboBoxWrapper<StartingPoolType> cbxStartingPool = new FComboBoxWrapper<>(); private final FComboBoxWrapper<StartingPoolType> cbxStartingPool = new FComboBoxWrapper<>();
private final FLabel lblUnrestricted = new FLabel.Builder().text(localizer.getMessage("lblAllCardsAvailable")).build(); private final FLabel lblUnrestricted = new FLabel.Builder().text(localizer.getMessage("lblAllCardsAvailable")).build();
private final FLabel lblPreconDeck = new FLabel.Builder().text(localizer.getMessage("lblStarterEventdeck") +":").build(); private final FLabel lblPreconDeck = new FLabel.Builder().text(localizer.getMessage("lblStarterEventdeck") +":").build();
private final FComboBoxWrapper<String> cbxPreconDeck = new FComboBoxWrapper<>(); private final FComboBoxWrapper<String> cbxPreconDeck = new FComboBoxWrapper<>();
private final FLabel lblFormat = new FLabel.Builder().text(localizer.getMessage("lblSanctionedFormat") + ":").build(); private final FLabel lblFormat = new FLabel.Builder().text(localizer.getMessage("lblSanctionedFormat") + ":").build();
private final FComboBoxWrapper<GameFormat> cbxFormat = new FComboBoxWrapper<>(); private final FComboBoxWrapper<GameFormat> cbxFormat = new FComboBoxWrapper<>();
private final FLabel lblCustomDeck = new FLabel.Builder().text(localizer.getMessage("lblCustomdeck")).build(); private final FLabel lblCustomDeck = new FLabel.Builder().text(localizer.getMessage("lblCustomdeck")).build();
private final FComboBoxWrapper<Deck> cbxCustomDeck = new FComboBoxWrapper<>(); private final FComboBoxWrapper<Deck> cbxCustomDeck = new FComboBoxWrapper<>();
private final FLabel btnDefineCustomFormat = new FLabel.Builder().opaque(true).hoverable(true).text(localizer.getMessage("lblDefineCustomFormat")).build(); private final FLabel btnDefineCustomFormat = new FLabel.Builder().opaque(true).hoverable(true).text(localizer.getMessage("lblDefineCustomFormat")).build();
private final FLabel btnSelectFormat = new FLabel.Builder().opaque(true).hoverable(true).text(localizer.getMessage("lblSelectFormat")).build(); private final FLabel btnSelectFormat = new FLabel.Builder().opaque(true).hoverable(true).text(localizer.getMessage("lblSelectFormat")).build();
@@ -89,10 +84,8 @@ public enum VSubmenuQuestStart implements IVSubmenu<CSubmenuQuestStart> {
private final FLabel lblPrizedCards = new FLabel.Builder().text(localizer.getMessage("lblPrizedCards")).build(); private final FLabel lblPrizedCards = new FLabel.Builder().text(localizer.getMessage("lblPrizedCards")).build();
private final FComboBoxWrapper<Object> cbxPrizedCards = new FComboBoxWrapper<>(); private final FComboBoxWrapper<Object> cbxPrizedCards = new FComboBoxWrapper<>();
private final FLabel lblPrizeFormat = new FLabel.Builder().text(localizer.getMessage("lblSanctionedFormat") + ":").build(); private final FLabel lblPrizeFormat = new FLabel.Builder().text(localizer.getMessage("lblSanctionedFormat") + ":").build();
private final FComboBoxWrapper<GameFormat> cbxPrizeFormat = new FComboBoxWrapper<>(); private final FComboBoxWrapper<GameFormat> cbxPrizeFormat = new FComboBoxWrapper<>();
private final FLabel lblPrizeUnrestricted = new FLabel.Builder().text(localizer.getMessage("lblAllCardsAvailableWin")).build(); private final FLabel lblPrizeUnrestricted = new FLabel.Builder().text(localizer.getMessage("lblAllCardsAvailableWin")).build();
private final FLabel lblPrizeSameAsStarting = new FLabel.Builder().text(localizer.getMessage("lblOnlySetsInStarting")).build(); private final FLabel lblPrizeSameAsStarting = new FLabel.Builder().text(localizer.getMessage("lblOnlySetsInStarting")).build();
@@ -195,6 +188,13 @@ public enum VSubmenuQuestStart implements IVSubmenu<CSubmenuQuestStart> {
boxCompleteSet.setToolTipText(localizer.getMessage("lblboxCompleteSet")); boxCompleteSet.setToolTipText(localizer.getMessage("lblboxCompleteSet"));
boxAllowDuplicates.setToolTipText(localizer.getMessage("lblboxAllowDuplicates")); boxAllowDuplicates.setToolTipText(localizer.getMessage("lblboxAllowDuplicates"));
lblStartingWorld.setLabelFor(cbxStartingWorld.getComponent());
lblStartingPool.setLabelFor(cbxStartingPool.getComponent());
lblPreconDeck.setLabelFor(cbxPreconDeck.getComponent());
lblFormat.setLabelFor(cbxFormat.getComponent());
lblCustomDeck.setLabelFor(cbxCustomDeck.getComponent());
lblPrizedCards.setLabelFor(cbxPrizedCards.getComponent());
lblPrizeFormat.setLabelFor(cbxPrizeFormat.getComponent());
cbxStartingPool.addItem(StartingPoolType.Complete); cbxStartingPool.addItem(StartingPoolType.Complete);
cbxStartingPool.addItem(StartingPoolType.Sanctioned); cbxStartingPool.addItem(StartingPoolType.Sanctioned);

View File

@@ -94,7 +94,8 @@ public class VPrompt implements IVDoc<CPrompt> {
tarMessage.setForeground(FSkin.getColor(FSkin.Colors.CLR_TEXT)); tarMessage.setForeground(FSkin.getColor(FSkin.Colors.CLR_TEXT));
tarMessage.setMargin(new Insets(3, 3, 3, 3)); tarMessage.setMargin(new Insets(3, 3, 3, 3));
tarMessage.getAccessibleContext().setAccessibleName("Prompt");
tarMessage.setFocusable(true); // Allow tab to navigate to the prompt.
messageScroller.getViewport().getView().addMouseListener(new MouseAdapter() { messageScroller.getViewport().getView().addMouseListener(new MouseAdapter() {
@Override @Override
public void mouseEntered(final MouseEvent e) { public void mouseEntered(final MouseEvent e) {