Package net.sf.freecol.client.gui.panel
Class EuropePanel
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- net.sf.freecol.client.gui.panel.MigPanel
-
- net.sf.freecol.client.gui.panel.FreeColPanel
-
- net.sf.freecol.client.gui.panel.PortPanel
-
- net.sf.freecol.client.gui.panel.EuropePanel
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.awt.image.ImageObserver,java.awt.MenuContainer,java.io.Serializable,java.util.EventListener,javax.accessibility.Accessible
public final class EuropePanel extends PortPanel
This is a panel for the Europe display. It shows the ships in Europe and allows the user to send them back.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classEuropePanel.DestinationPanelA panel to hold unit labels that represent units that are going to America or Europe.static classEuropePanel.EuropeActionclassEuropePanel.EuropeanDocksPanelA panel that holds UnitLabels that represent Units that are waiting on the docks in Europe.private static classEuropePanel.EuropeButtonprivate classEuropePanel.EuropeInPortPanelA panel that holds unit labels that represent naval units that are waiting in Europe.private classEuropePanel.MarketPanelA panel that shows goods available for purchase in Europe.private classEuropePanel.TransactionLogTo log transactions made in Europe-
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
-
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
-
-
Field Summary
Fields Modifier and Type Field Description private Europeeuropeprivate EuropePanel.EuropeanDocksPaneleuropeanDocksPanelprivate javax.swing.JButtonexitButtonprivate EuropePanel.TransactionLoglogprivate static java.util.logging.Loggerloggerprivate EuropePanel.MarketPanelmarketPanelprivate javax.swing.JButtonpurchaseButtonprivate javax.swing.JButtonrecruitButtonprivate javax.swing.JButtonsailButtonprivate EuropePanel.DestinationPaneltoAmericaPanelprivate EuropePanel.DestinationPaneltoEuropePanelprivate javax.swing.JButtontrainButtonprivate javax.swing.JButtonunloadButton-
Fields inherited from class net.sf.freecol.client.gui.panel.PortPanel
cargoPanel, defaultTransferHandler, inPortPanel, pressListener, selectedUnitLabel
-
Fields inherited from class net.sf.freecol.client.gui.panel.FreeColPanel
CANCEL, editable, HELP, MARGIN, NL_SPAN_SPLIT_2, OK, okButton, SPAN_SPLIT_2
-
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
-
Constructor Summary
Constructors Constructor Description EuropePanel(FreeColClient freeColClient, boolean header)The constructor for a EuropePanel.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcleanup()Cleans up this EuropePanel.private voidexitAction()Exits this EuropePanel.java.util.List<Unit>getUnitList()Get the units in Europe.private voidinitialize(Europe europe)Initialize this EuropePanel.voidrefresh()Refreshes this panel.voidremoveNotify()voidrequestFocus()What to do when requesting focus.private voidsailAction()A unit sets sail for the new world.voidsetSelectedUnitLabel(UnitLabel unitLabel)Selects a unit that is located somewhere on this panel.private voidunloadAction()Unload the contents of the currently selected carrier.-
Methods inherited from class net.sf.freecol.client.gui.panel.PortPanel
getCargoPanel, getPressListener, getSelectedUnit, getSelectedUnitLabel, getTransferHandler, setSelectedUnit
-
Methods inherited from class net.sf.freecol.client.gui.panel.FreeColPanel
actionPerformed, addClosingCallback, createColonyButton, getClientOptions, getFreeColClient, getGame, getGUI, getImageLibrary, getMap, getMyPlayer, getSmallAbstractUnitImage, getSpecification, igc, isEditable, setCancelComponent
-
Methods inherited from class net.sf.freecol.client.gui.panel.MigPanel
getMigLayout, getUIClassID
-
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, paramString, setUI, updateUI
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
logger
private static final java.util.logging.Logger logger
-
toAmericaPanel
private EuropePanel.DestinationPanel toAmericaPanel
-
toEuropePanel
private EuropePanel.DestinationPanel toEuropePanel
-
europeanDocksPanel
private EuropePanel.EuropeanDocksPanel europeanDocksPanel
-
marketPanel
private EuropePanel.MarketPanel marketPanel
-
log
private EuropePanel.TransactionLog log
-
exitButton
private javax.swing.JButton exitButton
-
trainButton
private javax.swing.JButton trainButton
-
purchaseButton
private javax.swing.JButton purchaseButton
-
recruitButton
private javax.swing.JButton recruitButton
-
unloadButton
private javax.swing.JButton unloadButton
-
sailButton
private javax.swing.JButton sailButton
-
europe
private final Europe europe
-
-
Constructor Detail
-
EuropePanel
public EuropePanel(FreeColClient freeColClient, boolean header)
The constructor for a EuropePanel.- Parameters:
freeColClient- TheFreeColClientfor the game.header- True when a header should be added.
-
-
Method Detail
-
initialize
private void initialize(Europe europe)
Initialize this EuropePanel.- Parameters:
europe- TheEuropethis panel should display.
-
cleanup
private void cleanup()
Cleans up this EuropePanel.
-
requestFocus
public void requestFocus()
What to do when requesting focus.- Overrides:
requestFocusin classFreeColPanel
-
refresh
public void refresh()
Refreshes this panel.
-
setSelectedUnitLabel
public void setSelectedUnitLabel(UnitLabel unitLabel)
Selects a unit that is located somewhere on this panel.- Overrides:
setSelectedUnitLabelin classPortPanel- Parameters:
unitLabel- TheUnitLabelfor the unit that is being selected.
-
exitAction
private void exitAction()
Exits this EuropePanel.
-
unloadAction
private void unloadAction()
Unload the contents of the currently selected carrier.
-
sailAction
private void sailAction()
A unit sets sail for the new world.
-
getUnitList
public java.util.List<Unit> getUnitList()
Get the units in Europe.- Specified by:
getUnitListin classPortPanel- Returns:
- A list of units in Europe.
-
removeNotify
public void removeNotify()
- Overrides:
removeNotifyin classPortPanel
-
-