|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Window
|
+--java.awt.Frame
|
+--javax.swing.JFrame
|
+--de.uni_paderborn.robots.gui.ArenaDesignerFrame
this class creates the main frame for the Arena designer
| Inner Class Summary | |
private class |
ArenaDesignerFrame.LoadArenaFileFilter
The FileFilter for loading the arena, thus only files ending with ".arena" are shown. |
| Inner classes inherited from class javax.swing.JFrame |
javax.swing.JFrame.AccessibleJFrame |
| Inner classes inherited from class java.awt.Frame |
java.awt.Frame.AccessibleAWTFrame |
| Inner classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
| Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.AWTTreeLock |
| Field Summary | |
private java.io.File |
actualFile
contains the actual filename |
private boolean |
allTeleportersOrdered
true if all teleporters are ordered |
private boolean |
arenaChanged
is true when the arena has changed |
private javax.swing.JButton[][] |
buttonArray
the array which contains all buttons |
private int[][] |
contentArray
the array which contains the current arena |
private java.lang.String |
energyIcon
the name of the file for a energy-Icon |
private java.lang.String |
exitIcon
the name of the file for a exit-Icon |
private boolean |
exitSet
if there is an exit in the arena it is true |
private java.lang.String |
fieldIcon
the name of the file for a field-Icon |
private int |
height
the height of the current arena |
private javax.swing.JMenuBar |
jMenuBar
the menu bar |
private javax.swing.JMenu |
jMenuFile
the file menu |
private javax.swing.JMenu |
jMenuInfo
the info menu |
private javax.swing.JMenuItem |
jMenuItemAbout
the about MI in the info menu |
private javax.swing.JMenuItem |
jMenuItemNewArena
new arena MI in file menu |
private javax.swing.JMenuItem |
jMenuItemOpenArena
open arena MI in file menu |
private javax.swing.JMenuItem |
jMenuItemOrder
the order teleporter MI in the teleporter menu |
private javax.swing.JMenuItem |
jMenuItemQuit
exit arena designer MI in file menu |
private javax.swing.JMenuItem |
jMenuItemSaveArena
save arena MI in file menu |
private javax.swing.JMenuItem |
jMenuItemSaveArenaAs
save arena as MI in file menu |
private javax.swing.JMenuItem |
jMenuItemStopOrder
the stop order teleporter MI in the teleporter menu |
private javax.swing.JMenu |
jMenuTeleporter
the teleporter menu |
private javax.swing.JPanel |
jPanel
the panel containing the buttons |
private javax.swing.JScrollPane |
jScrollPane
the scroll panel containing the jPanel |
private javax.swing.JSeparator |
jSeparator1
a seperator |
private javax.swing.JSeparator |
jSeparator2
a seperator |
private javax.swing.JSeparator |
jSeparator3
a seperator |
private java.lang.String |
robotIcon
the name of the file for a robot-Icon |
private java.awt.Dimension |
screenSize
the screen size |
private java.lang.String |
startImage
the name of the file for the introducing-Icon |
private int[][] |
teleporterArray
the array which contains all teleporter numbers |
private java.lang.String |
teleporterIcon
the name of the file for a teleporter-Icon |
private boolean |
teleporterMode
true when order teleporter is selected, important for the listener |
private int[][] |
useASCIIForTeleporterArray
the array which contains the free ascii-chars for teleporters |
private java.lang.String |
wallIcon
the name of the file for a wall-Icon |
private int |
width
the width of the current arena |
| Fields inherited from class javax.swing.JFrame |
accessibleContext, defaultCloseOperation, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Frame |
base, CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, frameSerializedDataVersion, HAND_CURSOR, icon, ICONIFIED, mbManagement, menuBar, MOVE_CURSOR, N_RESIZE_CURSOR, nameCounter, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, ownedWindows, resizable, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, serialVersionUID, state, SW_RESIZE_CURSOR, TEXT_CURSOR, title, W_RESIZE_CURSOR, WAIT_CURSOR, weakThis |
| Fields inherited from class java.awt.Window |
active, dbg, focusMgr, inputContext, inputContextLock, OPENED, ownedWindowList, warningString, windowListener, windowSerializedDataVersion |
| Fields inherited from class java.awt.Container |
component, containerListener, containerSerializedDataVersion, dispatcher, layoutMgr, listeningBoundsChildren, listeningChildren, maxSize, ncomponents, printing, printingThreads |
| Fields inherited from class java.awt.Component |
actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, changeSupport, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, graphicsConfig, hasFocus, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, name, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, privateKey, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, windowClosingException, windowListenerK, x, y |
| Fields inherited from interface javax.swing.WindowConstants |
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
ArenaDesignerFrame()
Creates new form ArenaDesignerFrame |
|
| Method Summary | |
private void |
checkIfTeleportersAreOrdered()
method is called to check if all teleporters are ordered |
private void |
exitForm(java.awt.event.WindowEvent evt)
method is called to exit the frame |
int |
getHeight()
method is called to get the height of the arena |
int |
getWidth()
method is called to get the width of the arena |
private void |
initComponents()
This method is called from within the constructor to initialize the GUI-form. |
void |
initializeArray()
method is called to initialize the teleporter arrays |
void |
initializeButtons()
method is called to initialize the buttons such as they are in the content array |
private void |
jMenuItemAboutActionPerformed(java.awt.event.ActionEvent evt)
creates and shows a new about frame |
private void |
jMenuItemNewArenaActionPerformed(java.awt.event.ActionEvent evt)
method is called when you select the new arena MI checks whether the old arena has changed and opens a dialog to create a new arena |
private void |
jMenuItemOpenArenaActionPerformed(java.awt.event.ActionEvent evt)
method is called when you select the open arena MI checks whether the old arena has changed and opens a dialog to open a new arena |
private void |
jMenuItemOrderActionPerformed(java.awt.event.ActionEvent evt)
this method is called when the order teleporter MI is selected all button which are no teleporters will be disabled and if the number of the teleporter is known it will be displayed on it |
private void |
jMenuItemQuitActionPerformed(java.awt.event.ActionEvent evt)
method is called when you select the quit MI |
private void |
jMenuItemSaveArenaActionPerformed(java.awt.event.ActionEvent evt)
method is called when you select the save arena MI checks whether the arena name is not equal to untiteled.arena, checks for unselected teleporters and saves the arena |
private void |
jMenuItemSaveArenaAsActionPerformed(java.awt.event.ActionEvent evt)
method is called when you select the save arena as MI checks whether the arena has unselected teleporters and opens a dialog to save the arena as |
private void |
jMenuItemStopOrderActionPerformed(java.awt.event.ActionEvent evt)
Method is performed when the stop order teleporters MI is selected |
void |
saveArena(java.io.File fileName)
method is called to save the current arena to file |
void |
setHeight(int value)
method is called to set the height of the arena |
void |
setWidth(int value)
method is called to set the width of the arena |
| Methods inherited from class javax.swing.JFrame |
addImpl, createRootPane, createRootPaneException, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, processKeyEvent, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
| Methods inherited from class java.awt.Frame |
|
| Methods inherited from class java.awt.Window |
addOwnedWindow, addWindowListener, adjustListeningChildren, applyResourceBundle, applyResourceBundle, connectOwnedWindow, dispatchEventImpl, dispose, eventEnabled, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, hide, isActive, isShowing, nextFocus, ownedInit, pack, postEvent, postWindowEvent, preProcessKeyEvent, processEvent, removeOwnedWindow, removeWindowListener, resetGC, setCursor, setFocusOwner, setWarningString, show, toBack, toFront, transferFocus |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, applyOrientation, checkGD, countComponents, createChildHierarchyEvents, createHierarchyEvents, deliverEvent, dispatchEventToSelf, doLayout, findComponentAt, findComponentAt, findComponentAt, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPaint, lightweightPrint, list, list, locate, minimumSize, numListening, paint, paintComponents, paintHeavyweightComponents, postsOldMouseEvents, preferredSize, print, printComponents, printHeavyweightComponents, processContainerEvent, proxyEnableEvents, proxyRequestFocus, remove, removeAll, removeContainerListener, setFont, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, checkWindowClosingException, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleIndexInParent, getAccessibleStateSet, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkitImpl, getTreeLock, getWindowForObject, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isRecursivelyVisible, 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, processMouseEvent, processMouseMotionEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
| Methods inherited from interface java.awt.MenuContainer |
getFont, postEvent |
| Field Detail |
private javax.swing.JButton[][] buttonArray
private int[][] teleporterArray
private int[][] contentArray
private java.lang.String fieldIcon
private java.lang.String wallIcon
private java.lang.String teleporterIcon
private java.lang.String exitIcon
private java.lang.String robotIcon
private java.lang.String energyIcon
private java.lang.String startImage
private java.io.File actualFile
private boolean exitSet
private boolean arenaChanged
private boolean teleporterMode
private boolean allTeleportersOrdered
private java.awt.Dimension screenSize
private int[][] useASCIIForTeleporterArray
private javax.swing.JMenuBar jMenuBar
private javax.swing.JMenu jMenuFile
private javax.swing.JMenuItem jMenuItemNewArena
private javax.swing.JSeparator jSeparator1
private javax.swing.JMenuItem jMenuItemOpenArena
private javax.swing.JSeparator jSeparator2
private javax.swing.JMenuItem jMenuItemSaveArena
private javax.swing.JMenuItem jMenuItemSaveArenaAs
private javax.swing.JSeparator jSeparator3
private javax.swing.JMenuItem jMenuItemQuit
private javax.swing.JMenu jMenuTeleporter
private javax.swing.JMenuItem jMenuItemOrder
private javax.swing.JMenuItem jMenuItemStopOrder
private javax.swing.JMenu jMenuInfo
private javax.swing.JMenuItem jMenuItemAbout
private javax.swing.JPanel jPanel
private javax.swing.JScrollPane jScrollPane
private int width
private int height
| Constructor Detail |
public ArenaDesignerFrame()
| Method Detail |
private void initComponents()
private void jMenuItemStopOrderActionPerformed(java.awt.event.ActionEvent evt)
evt - the ActionEventprivate void jMenuItemAboutActionPerformed(java.awt.event.ActionEvent evt)
evt - the ActionEventprivate void jMenuItemOrderActionPerformed(java.awt.event.ActionEvent evt)
evt - the ActionEventprivate void jMenuItemQuitActionPerformed(java.awt.event.ActionEvent evt)
evt - the ActionEventprivate void jMenuItemSaveArenaAsActionPerformed(java.awt.event.ActionEvent evt)
evt - the ActionEventprivate void jMenuItemSaveArenaActionPerformed(java.awt.event.ActionEvent evt)
evt - the ActionEventprivate void jMenuItemOpenArenaActionPerformed(java.awt.event.ActionEvent evt)
evt - the ActionEventprivate void jMenuItemNewArenaActionPerformed(java.awt.event.ActionEvent evt)
evt - the ActionEventpublic void initializeArray()
public void initializeButtons()
private void exitForm(java.awt.event.WindowEvent evt)
public void setWidth(int value)
value - the new widthpublic int getWidth()
getWidth in class java.awt.Componentpublic void setHeight(int value)
value - the heightpublic int getHeight()
getHeight in class java.awt.Componentprivate void checkIfTeleportersAreOrdered()
public void saveArena(java.io.File fileName)
fileName - the filename for the arena
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||