|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
dk.brics.bisim.view.OptionsView
public class OptionsView
The view for selecting game options.
Nested Class Summary |
---|
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 |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
javax.swing.JButton |
applyButton
|
private static java.lang.String |
applyString
|
javax.swing.JRadioButton |
attackerRadioButton
|
private static java.lang.String |
attackerString
|
private javax.swing.ButtonGroup |
bisimulationButtonGroup
|
private javax.swing.JPanel |
bisimulationPanel
|
static java.lang.String |
bisimulationString
|
private static java.lang.String |
browseString
|
private javax.swing.JPanel |
buttonPanel
|
javax.swing.JRadioButton |
clientRadioButton
|
private javax.swing.border.TitledBorder |
clientServerBorder
|
private javax.swing.ButtonGroup |
clientServerButtonGroup
|
private javax.swing.JPanel |
clientServerPanel
|
private static java.lang.String |
clientServerString
|
private static java.lang.String |
clientString
|
private java.io.File |
currentDir
|
javax.swing.JRadioButton |
defenderRadioButton
|
private static java.lang.String |
defenderString
|
javax.swing.JButton |
exitButton
|
private static java.lang.String |
exitString
|
private javax.swing.JPanel |
gameTypePanel
|
private static java.lang.String |
gameTypeString
|
private javax.swing.JLabel |
hostLabel
|
private static java.lang.String |
hostString
|
javax.swing.JTextField |
hostTextField
|
private static int |
hostTextFieldSize
|
private javax.swing.ImageIcon |
icon
|
private java.awt.Image |
image
|
private javax.swing.JLabel |
imageLabel
|
private javax.swing.JPanel |
imagePanel
The image panel to the left. |
javax.swing.JButton |
leftLTSBrowseButton
|
private javax.swing.JLabel |
leftLTSLabel
|
private javax.swing.JPanel |
leftLTSPanel
|
private static java.lang.String |
leftLTSString
|
private javax.swing.JTextField |
leftLTSTextField
|
private javax.swing.border.Border |
loweredetched
|
private javax.swing.JPanel |
lowerPanel
The status panel underneath the tabbed pane. |
private javax.swing.JPanel |
ltsPanel
|
static java.lang.String |
ltsString
|
private static int |
ltsTextFieldSize
|
private javax.swing.JPanel |
mainPanel
The main panel of the options view. |
javax.swing.JRadioButton |
onePlayerRadioButton
|
private static java.lang.String |
onePlayerString
|
private javax.swing.border.TitledBorder |
playersBorder
|
private javax.swing.ButtonGroup |
playersButtonGroup
|
private javax.swing.JPanel |
playersPanel
|
private static java.lang.String |
playersString
|
javax.swing.JButton |
rightLTSBrowseButton
|
private javax.swing.JLabel |
rightLTSLabel
|
private javax.swing.JPanel |
rightLTSPanel
|
private static java.lang.String |
rightLTSString
|
private javax.swing.JTextField |
rightLTSTextField
|
private javax.swing.border.TitledBorder |
roleBorder
|
private javax.swing.ButtonGroup |
roleButtonGroup
|
private javax.swing.JPanel |
rolePanel
|
private static java.lang.String |
roleString
|
private static long |
serialVersionUID
|
javax.swing.JRadioButton |
serverRadioButton
|
private javax.swing.border.TitledBorder |
serverSettingsBorder
|
private javax.swing.JPanel |
serverSettingsPanel
|
private static java.lang.String |
serverSettingsString
|
private static java.lang.String |
serverString
|
javax.swing.JButton |
startButton
|
private static java.lang.String |
startString
|
private javax.swing.JLabel |
statusLabel
|
private javax.swing.JPanel |
statusPanel
|
javax.swing.JRadioButton |
strongRadioButton
|
private static java.lang.String |
strongString
|
private javax.swing.JTabbedPane |
tabbedPane
The tabbed pane to the right. |
javax.swing.JRadioButton |
twoPlayerLocalRadioButton
|
private static java.lang.String |
twoPlayerLocalString
|
javax.swing.JRadioButton |
twoPlayerRemoteRadioButton
|
private static java.lang.String |
twoPlayerRemoteString
|
javax.swing.JRadioButton |
weakRadioButton
|
private static java.lang.String |
weakString
|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
OptionsView()
|
Method Summary | |
---|---|
java.io.File |
chooseLTS()
Open a file chooser and return the file path. |
private void |
createBisimulationPanel()
|
private void |
createGameTypePanel()
|
private void |
createImagePanel()
|
private void |
createLowerPanel()
|
private void |
createLTSPanel()
|
private void |
createTabbedPane()
|
void |
displayStatus(java.lang.String mes)
Display a status in the lower panel. |
java.util.ArrayList<javax.swing.AbstractButton> |
getButtons()
Purpose: To return all buttons that need an action listener. |
java.util.ArrayList<javax.swing.JTextField> |
getTextFields()
Purpose: To return all text fields that need an action listener. |
void |
setHostPanelEnabled(boolean enable)
Enable/disable components inside the host panel. |
void |
setLeftLTSPath(java.lang.String path)
Set the path to the left LTS. |
void |
setRemotePanelEnabled(boolean enable)
Enable/disable text fields and buttons for remote settings. |
void |
setRightLTSPath(java.lang.String path)
Set the path to the right LTS. |
void |
setRolePanelEnabled(boolean enable)
Enable buttons inside role panel. |
void |
setTabEnabled(java.lang.String tabTitle,
boolean enable)
Enable/disable a tab in the tabbed pane. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, 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, 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, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getWidth, getVisibleRect, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, 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, transferFocusBackward, 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, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private javax.swing.JPanel mainPanel
private javax.swing.JPanel imagePanel
private javax.swing.JTabbedPane tabbedPane
private javax.swing.JPanel lowerPanel
private javax.swing.JLabel imageLabel
private java.awt.Image image
private javax.swing.ImageIcon icon
private javax.swing.JPanel gameTypePanel
private static final java.lang.String gameTypeString
private javax.swing.JPanel playersPanel
private static final java.lang.String playersString
private javax.swing.ButtonGroup playersButtonGroup
private static final java.lang.String onePlayerString
public javax.swing.JRadioButton onePlayerRadioButton
private static final java.lang.String twoPlayerLocalString
public javax.swing.JRadioButton twoPlayerLocalRadioButton
private static final java.lang.String twoPlayerRemoteString
public javax.swing.JRadioButton twoPlayerRemoteRadioButton
private javax.swing.JPanel clientServerPanel
private static final java.lang.String clientServerString
private javax.swing.ButtonGroup clientServerButtonGroup
private static final java.lang.String serverString
public javax.swing.JRadioButton serverRadioButton
private static final java.lang.String clientString
public javax.swing.JRadioButton clientRadioButton
private javax.swing.JPanel serverSettingsPanel
private static final java.lang.String serverSettingsString
private static final java.lang.String hostString
private javax.swing.JLabel hostLabel
public javax.swing.JTextField hostTextField
private static final int hostTextFieldSize
private static final java.lang.String applyString
public javax.swing.JButton applyButton
private javax.swing.JPanel rolePanel
private static final java.lang.String roleString
private javax.swing.ButtonGroup roleButtonGroup
private static final java.lang.String attackerString
public javax.swing.JRadioButton attackerRadioButton
private static final java.lang.String defenderString
public javax.swing.JRadioButton defenderRadioButton
private javax.swing.border.Border loweredetched
private javax.swing.border.TitledBorder playersBorder
private javax.swing.border.TitledBorder roleBorder
private javax.swing.border.TitledBorder serverSettingsBorder
private javax.swing.border.TitledBorder clientServerBorder
private javax.swing.JPanel ltsPanel
public static final java.lang.String ltsString
private static final java.lang.String browseString
private static final int ltsTextFieldSize
private static final java.lang.String leftLTSString
private javax.swing.JLabel leftLTSLabel
private javax.swing.JPanel leftLTSPanel
private javax.swing.JTextField leftLTSTextField
public javax.swing.JButton leftLTSBrowseButton
private static final java.lang.String rightLTSString
private javax.swing.JLabel rightLTSLabel
private javax.swing.JPanel rightLTSPanel
private javax.swing.JTextField rightLTSTextField
public javax.swing.JButton rightLTSBrowseButton
private javax.swing.JPanel bisimulationPanel
public static final java.lang.String bisimulationString
private javax.swing.ButtonGroup bisimulationButtonGroup
private static final java.lang.String strongString
public javax.swing.JRadioButton strongRadioButton
private static final java.lang.String weakString
public javax.swing.JRadioButton weakRadioButton
private javax.swing.JPanel statusPanel
private javax.swing.JLabel statusLabel
private javax.swing.JPanel buttonPanel
private static final java.lang.String startString
public javax.swing.JButton startButton
private static final java.lang.String exitString
public javax.swing.JButton exitButton
private java.io.File currentDir
Constructor Detail |
---|
public OptionsView()
Method Detail |
---|
private void createImagePanel()
private void createTabbedPane()
private void createGameTypePanel()
private void createLTSPanel()
private void createBisimulationPanel()
private void createLowerPanel()
public java.util.ArrayList<javax.swing.AbstractButton> getButtons()
public java.util.ArrayList<javax.swing.JTextField> getTextFields()
public void setLeftLTSPath(java.lang.String path)
path
- A path namepublic void setRightLTSPath(java.lang.String path)
path
- A path namepublic java.io.File chooseLTS()
public void setRolePanelEnabled(boolean enable)
enable
- Whether or not to enablepublic void setRemotePanelEnabled(boolean enable)
enable
- Whether or not to enablepublic void setHostPanelEnabled(boolean enable)
enable
- Whether or not to enablepublic void setTabEnabled(java.lang.String tabTitle, boolean enable)
tabTitle
- Title of the tabenable
- Whether or not to enablepublic void displayStatus(java.lang.String mes)
mes
- A status message
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |