public class ConfirmDeclarationDialog extends FreeColDialog<java.util.List<java.lang.String>> implements java.awt.event.ActionListener, java.awt.event.ItemListener
| Modifier and Type | Class and Description |
|---|---|
static class |
ConfirmDeclarationDialog.ColorButton
A button for a colour.
|
private static class |
ConfirmDeclarationDialog.EnumRenderer<T>
Simple renderer for Messages with a prefix.
|
FreeColDialog.DialogTypejavax.swing.JDialog.AccessibleJDialogjava.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityTypejava.awt.Window.AccessibleAWTWindow, java.awt.Window.Type| Modifier and Type | Field and Description |
|---|---|
private javax.swing.JComboBox<Flag.Background> |
background
A box to select the flag background from.
|
private ConfirmDeclarationDialog.ColorButton[] |
backgroundColors
The selected background colours.
|
private javax.swing.JTextField |
countryField
Independent country name.
|
static Flag |
DANISH_FLAG |
private javax.swing.JComboBox<Flag.Decoration> |
decoration
A box to select the flag decoration from.
|
private ConfirmDeclarationDialog.ColorButton |
decorationColor
The selected decoration colour.
|
private static java.util.Map<java.lang.String,Flag> |
defaultFlags
A map of default nation flags.
|
static Flag |
DUTCH_FLAG |
static Flag |
ENGLISH_FLAG |
private Flag |
flag
The flag to use for the new nation.
|
static Flag |
FRENCH_FLAG |
private javax.swing.JLabel |
label
Label with the icon of the flag.
|
private static java.util.logging.Logger |
logger |
private javax.swing.JTextField |
nationField
Independent nation name.
|
static Flag |
PORTUGUESE_FLAG |
static Flag |
RUSSIAN_FLAG |
static Flag |
SPANISH_FLAG |
private ConfirmDeclarationDialog.ColorButton |
starColor
The selected star colour.
|
private javax.swing.JComboBox<java.lang.String> |
stars
A box to select the number of stars with.
|
private javax.swing.JComboBox<java.lang.String> |
stripes
A box to select the number of stripes with.
|
static Flag |
SWEDISH_FLAG |
private ConfirmDeclarationDialog.ColorButton |
unionColor
The selected union colour.
|
private javax.swing.JComboBox<Flag.UnionPosition> |
unionPosition
A box to select the union position with.
|
private javax.swing.JComboBox<Flag.UnionShape> |
unionShape
A box to select the union shap with.
|
freeColClient, modal, optionsaccessibleContext, rootPane, rootPaneCheckingEnabledBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT| Constructor and Description |
|---|
ConfirmDeclarationDialog(FreeColClient freeColClient,
javax.swing.JFrame frame)
The constructor that will add the items to this panel.
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent ae) |
private <T> void |
addComboBox(javax.swing.JPanel panel,
javax.swing.JComboBox<T> box,
java.lang.String prefix,
T value) |
private java.lang.String[] |
getNumbers(int count) |
java.util.List<java.lang.String> |
getResponse()
Get the response from this dialog.
|
void |
itemStateChanged(java.awt.event.ItemEvent e) |
private void |
setColors() |
choices, getFreeColClient, getGame, getGUI, getImageLibrary, getMyPlayer, getSpecification, getValue, igc, initializeDialog, isModal, propertyChange, removeNotify, requestFocus, responded, setSubcomponentsNotOpaque, setValue, setVisibleaddImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, updateaddNotify, getModalityType, getTitle, hide, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBackaddPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFrontadd, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleprivate static final java.util.logging.Logger logger
public static final Flag SPANISH_FLAG
public static final Flag PORTUGUESE_FLAG
public static final Flag ENGLISH_FLAG
public static final Flag FRENCH_FLAG
public static final Flag DUTCH_FLAG
public static final Flag SWEDISH_FLAG
public static final Flag DANISH_FLAG
public static final Flag RUSSIAN_FLAG
private static final java.util.Map<java.lang.String,Flag> defaultFlags
private final javax.swing.JTextField countryField
private final javax.swing.JTextField nationField
private final javax.swing.JLabel label
private Flag flag
private final javax.swing.JComboBox<Flag.Background> background
private final javax.swing.JComboBox<Flag.Decoration> decoration
private final javax.swing.JComboBox<Flag.UnionPosition> unionPosition
private final javax.swing.JComboBox<Flag.UnionShape> unionShape
private final javax.swing.JComboBox<java.lang.String> stars
private final javax.swing.JComboBox<java.lang.String> stripes
private final ConfirmDeclarationDialog.ColorButton decorationColor
private final ConfirmDeclarationDialog.ColorButton unionColor
private final ConfirmDeclarationDialog.ColorButton starColor
private final ConfirmDeclarationDialog.ColorButton[] backgroundColors
public ConfirmDeclarationDialog(FreeColClient freeColClient, javax.swing.JFrame frame)
freeColClient - The FreeColClient for the game.frame - The owner frame.private <T> void addComboBox(javax.swing.JPanel panel,
javax.swing.JComboBox<T> box,
java.lang.String prefix,
T value)
private void setColors()
private java.lang.String[] getNumbers(int count)
public void actionPerformed(java.awt.event.ActionEvent ae)
actionPerformed in interface java.awt.event.ActionListenerpublic void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged in interface java.awt.event.ItemListenerpublic java.util.List<java.lang.String> getResponse()
getResponse in class FreeColDialog<java.util.List<java.lang.String>>