|
|||||||||
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
UserInterface
public final class UserInterface
This is responsible for creating the main user interface of the application and handling action events from the various menu options and buttons. This does not include UI for the playback controls nor does it contain the UI for the Set Editor.
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 | |
---|---|
(package private) javax.swing.JMenuItem |
aboutCLIPMenuItem
The About Dialog Menu Item |
(package private) javax.swing.JDialog |
aboutDialog
Dialog that holds the 'About this Application' info |
(package private) javax.swing.JMenuItem |
addBlankTileMenuItem
The Add Blank Tile To TileBin Menu Item |
(package private) javax.swing.JButton |
applySetEditorButton
The Apply button for the Set Editor dialog |
(package private) javax.swing.JTextArea |
arrangementComments
The TextArea for the Arrangement Comments dialog |
(package private) javax.swing.JDialog |
arrangementCommentsDialog
The Tile Arrangement Comments dialog |
(package private) javax.swing.JList |
availableTileSets
The list of available pre-loaded TileSet. |
(package private) javax.swing.DefaultListModel |
availableTileSetsModel
The list model for the availableTileSets |
(package private) javax.swing.JButton |
backButtonComments
The Back button for the Arrangement Comments dialog |
(package private) javax.swing.JButton |
backUnusedTileButton
The Back button for the Unused Tile dialog |
(package private) javax.swing.JLabel |
blankDescriptionLabel
The blank tile description label of the blank tile dialog |
(package private) javax.swing.JDialog |
blankDialog
The dialog for Blank Tiles |
(package private) javax.swing.JPanel |
blankEditor
The panel that holds the Blank Tile dialog components |
(package private) javax.swing.JLabel |
blankNameLabel
The blank tile name label of the blank tile dialog |
(package private) javax.swing.JTextArea |
blankTileDescription
The description field of the blank tile dialog |
(package private) javax.swing.JTextField |
blankTileName
The name field of the blank tile dialog |
(package private) javax.swing.JButton |
browseButton
The Browse button for the load TileSet dialog |
(package private) javax.swing.JTextField |
browseTextField
The text field associated with the browse button in the load TileSet dialog |
(package private) java.awt.Font |
buttonFont
The font used for some buttons |
(package private) javax.swing.JButton |
cancelAddBlankButton
The cancel button for the blank tile dialog |
(package private) javax.swing.JButton |
cancelButtonComments
The Cancel button for the Arrangement Comments dialog |
(package private) javax.swing.JButton |
cancelLoadTileButton
The Cancel button for the load TileSet dialog |
(package private) javax.swing.JButton |
cancelSetEditorButton
The Cancel button for the Set Editor dialog |
(package private) javax.swing.JButton |
cancelUnusedTileButton
The Cancel button for the Unused Tile dialog |
(package private) javax.swing.JMenuItem |
continueSessionMenuItem
The Coninue Session Menu Item |
(package private) javax.swing.JPanel |
CPPanel
Holds theControlPanel and spacers for playback mode |
(package private) javax.swing.JPanel |
cpSpacer
A spacer for CPPanel |
(package private) javax.swing.JMenuItem |
createTileSetMenuItem
The Create Tile Set Menu Item |
(package private) int |
curBlankTile
The currently active blank tile |
(package private) java.io.File |
curDirectory
The last directory that the use loaded or saved from |
(package private) boolean |
currentlySaving
true if the user is currently in the process of saving a log |
(package private) javax.swing.JButton |
deleteAddBlankButton
the delete button for the blank tile dialog |
(package private) javax.swing.JTextArea |
descUnusedText
The description TextArea for the Unused Tile dialog |
(package private) javax.swing.JTabbedPane |
editorsTabPane
The Tabbed Pane for the Set Editor dialog |
(package private) javax.swing.JMenuItem |
exitMenuItem
The Exit Menu Item |
(package private) javax.swing.JCheckBoxMenuItem |
gridlinesMenuItem
The View/Hide Gridlines Menu Item |
(package private) javax.swing.JDialog |
helpDialog
The Dialog that holds theHelpPanel |
(package private) javax.swing.JMenuItem |
helpSystemMenuItem
The Help System Menu Item |
(package private) javax.swing.JPanel |
leftSpacer
A left spacer for the main UI |
(package private) javax.swing.JMenuItem |
loadTileArrangementMenuItem
The Load Tile Arrangement Menu Item |
(package private) javax.swing.JDialog |
loadTileSetDialog
The Load TileSet Dialog |
(package private) javax.swing.JMenuItem |
loadTileSetMenuItem
The Load Tile Set Menu Item |
(package private) java.lang.String |
MainPanelName
The name assoctiated with theMainPanel |
(package private) javax.swing.JSplitPane |
mainSplit
The SplitPane that holds the theGrid and the theTileBinPanel |
(package private) javax.swing.JDialog |
minimapDialog
The dialog that holds the MiniMapPanel |
(package private) javax.swing.JCheckBoxMenuItem |
minimapMenuItem
The View/Hide Mini-Map Menu Item |
(package private) javax.swing.JMenuItem |
modifyTileSetMenuItem
The Modify Tile Set Menu Item |
(package private) UserInteraction |
mouseInput
CLIP's mouse input adapter attached to most of the UI components |
(package private) static int |
NewBlankInGrid
Defines the event of adding a blank tile to the Grid |
(package private) static int |
NewBlankInTileBin
Defines the event of adding a blank tile to the TileBin |
(package private) javax.swing.JButton |
nextButtonComments
The Next button for the Arrangement Comments dialog |
(package private) javax.swing.JButton |
okLoadTileButton
The OK button for load TileSet dialog |
(package private) javax.swing.JButton |
okSetEditorButton
The OK button for the Set Editor dialog |
(package private) javax.swing.JButton |
okUnusedTileButton
The OK button for the Unused Tile dialog |
(package private) javax.swing.JMenu |
openMenu
The Open Menu |
(package private) CLIPFrame |
parentFrame
The Frame that the application is running in |
(package private) java.util.ArrayList |
preloaded
List of Rules objects defining each preloaded tile set |
(package private) javax.swing.JMenuItem |
printArrangementMenuItem
The Print Tile Arrangement Menu Item |
(package private) javax.swing.JMenuItem |
printArrangementToFileMenuItem
The Print Tile Arrangement To Image File Menu Item |
(package private) javax.swing.JMenu |
printMenu
The Print Menu |
(package private) javax.swing.JMenuItem |
printTileInfoMenuItem
The Print Additional Tile Information Menu Item |
(package private) javax.swing.JPanel |
rightSpacer
A right spacer for the main UI |
(package private) javax.swing.JButton |
saveAddBlankButton
The save button for the blank tile dialog |
(package private) javax.swing.JMenuItem |
saveCompleteArrangementMenuItem
The Save Complete Arrangement Menu Item |
(package private) javax.swing.JMenuItem |
saveIncompleteArrangementMenuItem
The Save Incomplete Arrangement Menu Item |
(package private) javax.swing.JMenu |
saveMenu
The Save Menu |
(package private) int |
saveMoveCount
The number of recorded moves at the last save time |
private static long |
serialVersionUID
|
(package private) javax.swing.JDialog |
setEditorDialog
The Dialog for the Set Editor |
(package private) java.awt.Dimension |
SpacerSizeHorizontal
Size of horizontal spacers |
(package private) java.awt.Dimension |
SpacerSizeVertical
Size of vertical spacers |
(package private) java.awt.Font |
textFont
The font used for some text |
(package private) javax.swing.JPanel |
theControlPanel
The Control Panel for playback mode |
(package private) Grid |
theGrid
The Grid component |
(package private) javax.swing.JScrollPane |
theGridScrollPane
The scrollpane that contains theGrid |
(package private) HelpPanel |
theHelpPanel
The System Help Panel: HelpPanel |
(package private) javax.swing.JPanel |
theMainPanel
One of the most important panels in the program since it holds the Grid , the TileBin , and the Playback controls. |
(package private) MiniMapPanel |
theMiniMap
The MiniMap Panel |
(package private) Playback |
thePlayback
CLIP's playback system for playing back log files |
(package private) TileBinPanel |
theTileBinPanel
The panel that holds the TileBin |
(package private) javax.swing.JRadioButtonMenuItem |
tileBinLeftMenuItem
The Set TileBin on Left Menu Item |
(package private) javax.swing.JRadioButtonMenuItem |
tileBinRightMenuItem
The Set TileBin on Right Menu Item |
(package private) javax.swing.JMenuItem |
tilesetInstructionsMenuItem
The TileSet Instructions Menu Item |
(package private) javax.swing.ImageIcon[] |
tileUnusedIcons
The array of ImageIcons that make up the tileUnusedList |
(package private) javax.swing.JList |
tileUnusedList
The list of icons of the unused tiles for the Unused Tile Dialog |
(package private) int |
tileUnusedListPrevIndex
The last selected index of tileUnusedList in the Unused Tile dialog |
(package private) javax.swing.JPanel |
topSpacer
A top spacer for the main UI |
(package private) boolean |
unusedCompleted
true if has completed the Unused Tile dialog task |
(package private) javax.swing.JDialog |
unusedTileDialog
Unused Tile dialog |
(package private) int |
unusedTileDialogMaxHeight
Maximum height of the Unused Tile dialog |
(package private) int |
unusedTileDialogMaxWidth
Maximum width of the Unused Tile dialog |
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 | |
---|---|
UserInterface(CLIPFrame parent,
UserInteraction newMouseInput)
The Constructor sets up the main UI components and some dialogs. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent ev)
Handles action events on most CLIP buttons and menu items. |
void |
adjustSplitPaneDividerLocation()
Adjusts the split pane divider's location by passing the call onto the TileBin's TileBin.adjustSize() method |
private void |
BrowseForTileSet()
Opens a file dialog and allows the user to browse for a TileSet to load. |
void |
changeTileBinWidth(int newWidth)
Changes the width of the TileBin to accomodate the number of tiles wide specified by the passed in value. |
boolean |
confirmLoseUnsavedWork()
If the user has unsaved work, it prompts them if they want to continue and returns true if the user wishes
to continue without saving thier work. |
private void |
ContinueSession()
Allows the user to browse for a log file, load it up, skip to the end of the log, and start arranging tiles. |
private TileSet |
convertRulesToSet(Rules newRuleSet)
Takes a rule set and converts it to a tile set, then returns it. |
void |
createAboutDialog()
Creates the About Dialog. |
void |
CreateAndDisplayMiniMap()
Creates and then displays the minimap at the upper left corner of the Grid. |
void |
createArrangementCommentsPanel()
Creates the Tile Arrangement Comments Panel to be used in the arrangementCommentsDialog dialog. |
javax.swing.JPanel |
createBlankTilePanel()
Creates the panel used for creating, editing, and deleting blank tiles. |
(package private) javax.swing.JPanel |
createEditors(javax.swing.JScrollPane rulePanel,
javax.swing.JPanel extraOptionsPanel,
javax.swing.JPanel tilePanel)
Creates the Set Editor dialog. |
(package private) javax.swing.JMenu |
createFileMenu()
Creates the File menu. |
void |
createHelpDialog()
Creates the Help System Dialog. |
(package private) javax.swing.JMenu |
createHelpMenu()
Creates the Help menu. |
javax.swing.JPanel |
createLoadTileSetPanel()
Creates the panel used for the Load Tile Set dialog. |
(package private) javax.swing.JMenuBar |
createMenuBar()
Creates the Menu Bar used by the CLIP application. |
private void |
CreateNewTileSet()
Initializes the Set Editor to create a new tile set and then displays it. |
(package private) javax.swing.JMenu |
createToolsMenu()
Creates the Tools menu. |
void |
createUnusedPanel()
Creates the unused tile dialog so the user can explain why each tile in the TileBin was not included in the final tile arrangement. |
(package private) javax.swing.JMenu |
createViewMenu()
Creates the View menu. |
private void |
DeleteBlankTile()
Deletes the blank tile with the tileID equal to the curBlankTile . |
void |
displayAddBlankTileDialog(int tileID)
Displays the blank tile dialog for the tile with the passed in tileID. |
void |
displayInstructions(java.lang.String title,
java.lang.String message)
Displays a special information message dialog with the passed in title and message with the message word-wrapping at 80 characters. |
void |
enterPlaybackMode()
Puts the system into Playback mode. |
void |
enterTileArrangementMode()
Puts the system into Tile Arrangement mode. |
void |
finishLoadingTileSet()
Sets up the other components and UI to use the new TileSet that was loaded prior to calling this method. |
javax.swing.JPanel |
getGUI()
Returns the user interface. |
java.awt.image.BufferedImage |
getPrintArrangementImage()
Creates a cropped image of the current tile arrangement on a white background and returns it (to print or save). |
private boolean |
inPlaybackMode()
Returns true if the system is in Playback mode. |
private boolean |
inTileArrangementMode()
Returns true if the system is in Tile Arrangement mode. |
private void |
LoadPreloadedSets()
Loads the preloaded sets into memory. |
private void |
LoadTileArrangement()
User browses for a log file to load and once selected, it loads up the file and enters Playback mode. |
void |
loadTileSet()
This loads a TileSet from the Load TileSet Dialog. |
private void |
ModifyTileSet()
Initializes the Set Editor to modify a tile set, opens a file dialog to load a set file, then displays the editor with the set information filled in. |
private void |
PrintTileArrangement()
Brings up the print dialog to print the current tile arrangement. |
private void |
PrintTileArrangementToFile()
Brings up a file dialog to save an image file of the current tile arrangement. |
private void |
PrintTileInformation()
Prints a page(s} with arrangement comments at the top of the first page (if needed) and unused/blank tile comments following (if needed). |
private void |
SaveBlankTile()
Handles saving newly created or modified blank tiles. |
private void |
SaveCompleteLog()
Customizes the save dialog prompt for the current tile set then moves on to the next step of saving the log. |
private void |
SaveIncompleteLog()
Saves a log file but does not prompt user for addtional information about arrangement comments or unused tile reasonings. |
void |
saveTileArrangement()
Saves a log file after prompting the user for Unused Tile reasons (if needed) and creating all needed TileSet.summaryTiles . |
private void |
SaveTileSet()
Saves a tile set created or modified in the Set Editor. |
void |
setMiniMapSize()
Sets the MiniMap to an appropriate size based on the current Grid size. |
private void |
SetTileBinToLeftSide()
Sets the TileBin to be displayed on the left side of the Grid. |
private void |
SetTileBinToRightSide()
Sets the TileBin to be displayed on the right side of the Grid. |
private void |
SubmitArrangementComments()
Submits tile arrangement comments from the Tile Arrangement Comments dialog and then continues the save process. |
private void |
SubmitUnusedTileInfo()
Submits Unused Tile information from the Unused Tile dialog. |
private void |
ToggleMiniMap()
This toggles the MiniMap on and off. |
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, getVisibleRect, getWidth, 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
static final int NewBlankInTileBin
TileBin
static final int NewBlankInGrid
Grid
java.awt.Font buttonFont
java.awt.Font textFont
CLIPFrame parentFrame
UserInteraction mouseInput
java.io.File curDirectory
java.util.ArrayList preloaded
Rules
objects defining each preloaded tile set
javax.swing.JMenu openMenu
javax.swing.JMenuItem loadTileSetMenuItem
javax.swing.JMenuItem loadTileArrangementMenuItem
javax.swing.JMenuItem continueSessionMenuItem
javax.swing.JMenu saveMenu
javax.swing.JMenuItem saveCompleteArrangementMenuItem
javax.swing.JMenuItem saveIncompleteArrangementMenuItem
javax.swing.JMenu printMenu
javax.swing.JMenuItem printArrangementMenuItem
javax.swing.JMenuItem printTileInfoMenuItem
javax.swing.JMenuItem printArrangementToFileMenuItem
javax.swing.JMenuItem exitMenuItem
javax.swing.JMenuItem addBlankTileMenuItem
javax.swing.JMenuItem createTileSetMenuItem
javax.swing.JMenuItem modifyTileSetMenuItem
javax.swing.JRadioButtonMenuItem tileBinRightMenuItem
javax.swing.JRadioButtonMenuItem tileBinLeftMenuItem
javax.swing.JCheckBoxMenuItem minimapMenuItem
javax.swing.JCheckBoxMenuItem gridlinesMenuItem
javax.swing.JMenuItem tilesetInstructionsMenuItem
javax.swing.JMenuItem helpSystemMenuItem
javax.swing.JMenuItem aboutCLIPMenuItem
javax.swing.JDialog loadTileSetDialog
javax.swing.JList availableTileSets
javax.swing.DefaultListModel availableTileSetsModel
availableTileSets
javax.swing.JTextField browseTextField
javax.swing.JButton browseButton
javax.swing.JButton okLoadTileButton
javax.swing.JButton cancelLoadTileButton
javax.swing.JDialog blankDialog
javax.swing.JPanel blankEditor
javax.swing.JLabel blankNameLabel
javax.swing.JLabel blankDescriptionLabel
javax.swing.JTextField blankTileName
javax.swing.JTextArea blankTileDescription
javax.swing.JButton saveAddBlankButton
javax.swing.JButton cancelAddBlankButton
javax.swing.JButton deleteAddBlankButton
int curBlankTile
javax.swing.JDialog arrangementCommentsDialog
javax.swing.JTextArea arrangementComments
javax.swing.JButton backButtonComments
javax.swing.JButton nextButtonComments
javax.swing.JButton cancelButtonComments
javax.swing.JDialog unusedTileDialog
javax.swing.JButton okUnusedTileButton
javax.swing.JButton cancelUnusedTileButton
javax.swing.JButton backUnusedTileButton
javax.swing.JTextArea descUnusedText
javax.swing.JList tileUnusedList
javax.swing.ImageIcon[] tileUnusedIcons
tileUnusedList
final int unusedTileDialogMaxWidth
final int unusedTileDialogMaxHeight
int tileUnusedListPrevIndex
tileUnusedList
in the Unused Tile dialog
boolean unusedCompleted
true
if has completed the Unused Tile dialog task
javax.swing.JDialog setEditorDialog
javax.swing.JTabbedPane editorsTabPane
javax.swing.JButton okSetEditorButton
javax.swing.JButton cancelSetEditorButton
javax.swing.JButton applySetEditorButton
javax.swing.JDialog minimapDialog
MiniMapPanel
MiniMapPanel theMiniMap
javax.swing.JDialog helpDialog
theHelpPanel
HelpPanel theHelpPanel
HelpPanel
javax.swing.JDialog aboutDialog
Playback thePlayback
javax.swing.JPanel theControlPanel
javax.swing.JPanel CPPanel
theControlPanel
and spacers for playback mode
javax.swing.JPanel cpSpacer
CPPanel
final java.awt.Dimension SpacerSizeVertical
final java.awt.Dimension SpacerSizeHorizontal
javax.swing.JPanel leftSpacer
javax.swing.JPanel rightSpacer
javax.swing.JPanel topSpacer
javax.swing.JPanel theMainPanel
Grid
, the TileBin
, and the Playback
controls.
final java.lang.String MainPanelName
theMainPanel
Grid theGrid
Grid
component
javax.swing.JScrollPane theGridScrollPane
theGrid
TileBinPanel theTileBinPanel
TileBin
javax.swing.JSplitPane mainSplit
theGrid
and the theTileBinPanel
int saveMoveCount
boolean currentlySaving
true
if the user is currently in the process of saving a log
Constructor Detail |
---|
public UserInterface(CLIPFrame parent, UserInteraction newMouseInput)
parent
- The frame the application runs innewMouseInput
- CLIPs mouse adapter to attach to the UI componentsMethod Detail |
---|
public javax.swing.JPanel getGUI()
Grid
,
TileBinPanel
, and the Playback
controls.theMainPanel
public void CreateAndDisplayMiniMap()
MiniMapPanel
javax.swing.JMenuBar createMenuBar()
private void LoadPreloadedSets()
This fills the availableTileSetsModel
and the
preloaded
vars with preloaded set information.
availableTileSetsModel
,
preloaded
public javax.swing.JPanel createLoadTileSetPanel()
LoadPreloadedSets()
javax.swing.JPanel createEditors(javax.swing.JScrollPane rulePanel, javax.swing.JPanel extraOptionsPanel, javax.swing.JPanel tilePanel)
rulePanel
- Panel with the basic set rulesextraOptionsPanel
- Panel with the advanced featurestilePanel
- Panel dealing with the addition and removal of tiles
public javax.swing.JPanel createBlankTilePanel()
public void displayAddBlankTileDialog(int tileID)
NewBlankInGrid
or NewBlankInTileBin
to set up the dialog as an add blank tile dialog rather
than an edit dialog.
tileID
- ID of the blank tile to edit. NewBlankInGrid
or NewBlankInTileBin
to edit blank tiles.SaveBlankTile()
,
DeleteBlankTile()
public void createHelpDialog()
public void createAboutDialog()
javax.swing.JMenu createFileMenu()
javax.swing.JMenu createToolsMenu()
javax.swing.JMenu createViewMenu()
javax.swing.JMenu createHelpMenu()
public void loadTileSet()
Rules
file and then converts it to a TileSet with the
convertRulesToSet(Rules)
method. It then finishes
loading the set with the finishLoadingTileSet()
method and enabling/disabling menu options. It also
displays the set instructions if they exist. Calling this
method also puts the system in Tile Arrangement mode with
the enterTileArrangementMode()
method.
Rules
,
convertRulesToSet(Rules)
,
finishLoadingTileSet()
,
enterTileArrangementMode()
,
displayInstructions(String, String)
private void BrowseForTileSet()
browseTextField
of the Load Tile Dialog but does not actually load the set.
browseTextField
public void finishLoadingTileSet()
TileBin
. It changes
the size of the Grid
to the Set's grid size.
It sets the size of the minimap. Lastly, it adjusts the
Split Pane and UI to support the new set.
TileBin.LoadTileSet(TileSet)
,
Grid.changeGridSize(Dimension)
,
Grid.setTileSet(TileSet)
,
adjustSplitPaneDividerLocation()
,
setMiniMapSize()
private TileSet convertRulesToSet(Rules newRuleSet)
newRuleSet
- The Rules object to convert to a TileSet
Rules
,
TileSet
public void enterTileArrangementMode()
UserInteraction
object.
CLIPFrame.Mode
,
UserInteraction.beginTileArrangement()
public void enterPlaybackMode()
CLIPFrame.Mode
,
Playback.beginPlayback()
public void setMiniMapSize()
MiniMapPanel
,
Grid
private boolean inTileArrangementMode()
true
if the system is in Tile Arrangement mode.
true
if the system is in Tile Arrangement mode.CLIPFrame.Mode
private boolean inPlaybackMode()
true
if the system is in Playback mode.
true
if the system is in Playback mode.CLIPFrame.Mode
private void SaveBlankTile()
curBlankTile
variable must be set before
entering this function. If it is set to an existing
blank tile's ID, then it saves the changes (if any) to
that tile. If it is set to either NewBlankInGrid
or NewBlankInTileBin
then it creates an new blank
tile in the appropriate place. The information for the
blank tiles is pulled from the Blank Tile Dialog components.
This function also calls the necessary functions to record
the action in the Record
object.
curBlankTile
,
NewBlankInGrid
,
NewBlankInTileBin
,
displayAddBlankTileDialog(int)
,
Record.recordAddBlankTile(int, String, String)
,
Record.recordAddBlankTileToGrid(int, String, String, int, int)
,
Record.recordEditBlankTile(int, String, String, String, String)
private void DeleteBlankTile()
curBlankTile
. This value must be
set before calling this method. Also records
the deletion of the tile in the move list.
curBlankTile
,
displayAddBlankTileDialog(int)
,
Record.recordRemoveBlankTile(int, int, String, String, int, int)
private void SaveTileSet()
Data
object and
outputs a Rules
file.
Data
,
Rules
private void LoadTileArrangement()
Playback.loadLogFile(String)
,
Playback.beginPlayback()
,
enterPlaybackMode()
private void ContinueSession()
Playback
system.
It also records a 'load log' entry in the Record
object.
enterTileArrangementMode()
,
Playback
,
Record.recordLoadLog(long, long)
private void SaveIncompleteLog()
Record.saveLog(String)
private void SaveCompleteLog()
saveTileArrangement()
. If arrangement
comments or unused tile reasons are required and they
apply, then those dialogs are displayed first (with
arrangement comments being the first if both are needed).
saveTileArrangement()
private void PrintTileArrangement()
getPrintArrangementImage()
,
Print2DPrinterJob
private void PrintTileInformation()
Print2DPrinterJob
private void PrintTileArrangementToFile()
getPrintArrangementImage()
private void CreateNewTileSet()
private void ModifyTileSet()
private void SetTileBinToLeftSide()
mainSplit
in
the process.
private void SetTileBinToRightSide()
mainSplit
in
the process.
private void ToggleMiniMap()
MiniMapPanel
,
setMiniMapSize()
private void SubmitUnusedTileInfo()
unusedTileDialog
,
TileSet.summaryTiles
,
SummaryEntry
private void SubmitArrangementComments()
arrangementCommentsDialog
.
arrangementCommentsDialog
,
saveTileArrangement()
public void adjustSplitPaneDividerLocation()
TileBin.adjustSize()
method
TileBin.adjustSize()
public void createArrangementCommentsPanel()
arrangementCommentsDialog
dialog.
public void createUnusedPanel()
public void saveTileArrangement()
TileSet.summaryTiles
.
createUnusedPanel()
,
TileSet.summaryTiles
,
SummaryEntry
,
Record.saveLog(String)
public void changeTileBinWidth(int newWidth)
newWidth
- Number of tiles for the TileBin to display per rowTileBin
,
mainSplit
public boolean confirmLoseUnsavedWork()
true
if the user wishes
to continue without saving thier work.
true
to continue without saving work
false
otherwise.public void displayInstructions(java.lang.String title, java.lang.String message)
title
- Title of the message dialogmessage
- Message to display in the message dialogWrappingJOptionPane
public java.awt.image.BufferedImage getPrintArrangementImage()
TileSet.getTileBoundsInGrid()
,
Grid.drawTiles(Graphics2D, int, int)
public void actionPerformed(java.awt.event.ActionEvent ev)
actionPerformed
in interface java.awt.event.ActionListener
ev
- The ActionEvent
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |