|
Gridarta Editor
|
Implements the main status bar of the application. More...
Inheritance diagram for net.sf.gridarta.gui.misc.StatusBar< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >:
Collaboration diagram for net.sf.gridarta.gui.misc.StatusBar< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >:Public Member Functions | |
| void | setStatusText (final String text) |
| Sets the level status text, which usually displays arch numbers. More... | |
| StatusBar (@NotNull final MapManager< G, A, R > mapManager, @NotNull final MapViewManager< G, A, R > mapViewManager, @NotNull final ArchetypeSet< G, A, R > archetypeSet, @NotNull final NamedObjects< FaceObject > faceObjects) | |
| Constructs a status bar that has the given main controller object set as its controller. More... | |
Private Member Functions | |
| void | mapCursorChanged (@Nullable final MapCursor< G, A, R > mapCursor) |
| Sets the coordinates of the MapCursor to cursor label and the offset when in drag mode. More... | |
| void | mousePosChanged (@NotNull final MouseEvent e) |
| Set new mouse and map coordinates to mouse label. More... | |
| void | setCurrentMapView (@Nullable final MapView< G, A, R > mapView) |
Static Private Member Functions | |
| static String | getMemoryString (final long mem) |
| Returns the given memory amount as a string scales the value to be bytes, kilobytes or megabytes. More... | |
Private Attributes | |
| final ArchetypeSet< G, A, R > | archetypeSet |
| The ArchetypeSet. More... | |
| final JLabel | cursor |
| The label that shows the cursor. More... | |
| final NamedObjects< FaceObject > | faceObjects |
| The NamedObjects instance to use. More... | |
| final MapControlListener< G, A, R > | mapControlListener |
| The MapControlListener used to detect saved maps. More... | |
| final MapCursorListener< G, A, R > | mapCursorListener |
| The map cursor listener to detect map cursor changes. More... | |
| final MapManagerListener< G, A, R > | mapManagerListener |
| The map manager listener to detect current map changes. More... | |
| MapView< G, A, R > | mapView |
| The map view for which mapCursorListener is registered, or. More... | |
| final MapViewManagerListener< G, A, R > | mapViewManagerListener |
| The map view manager listener to detect current map changes. More... | |
| final JLabel | memory |
| The label that shows the memory status. More... | |
| final JLabel | mouse |
| The label that shows the mouse. More... | |
| final Point | mouseMapTmp = new Point() |
| Temporary used to get map coordinates. More... | |
| final MouseMotionListener | mouseMotionListener |
| The MouseMotionListener for tracking the mouse position in map windows. More... | |
| final JLabel | status |
| The label that shows the one line text message. More... | |
| final ActionListener | statusBarUpdate |
| The action listener which is registered to periodically update the status bar. More... | |
Static Private Attributes | |
| static final ActionBuilder | ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta") |
| Action Builder. More... | |
| static final NumberFormat | FORMAT = NumberFormat.getInstance() |
| The DecimalFormat to use for formatting the numbers in getMemoryString(long). More... | |
| static final long | serialVersionUID = 1L |
| The serial Version UID. More... | |
| static final String [] | UNITS = { "Bytes", "KB", "MB", "GB" } |
| The units used by getMemoryString(long). More... | |
Implements the main status bar of the application.
Used to show one line text messages to the user about progress, state etc. Also includes level info and memory info panels.
Definition at line 68 of file StatusBar.java.
| net.sf.gridarta.gui.misc.StatusBar< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.StatusBar | ( | @NotNull final MapManager< G, A, R > | mapManager, |
| @NotNull final MapViewManager< G, A, R > | mapViewManager, | ||
| @NotNull final ArchetypeSet< G, A, R > | archetypeSet, | ||
| @NotNull final NamedObjects< FaceObject > | faceObjects | ||
| ) |
Constructs a status bar that has the given main controller object set as its controller.
| mapManager | the map manager |
| mapViewManager | the map view manager |
| archetypeSet | the archetype set |
| faceObjects | the named objects instance to use |
Definition at line 280 of file StatusBar.java.
|
staticprivate |
Returns the given memory amount as a string scales the value to be bytes, kilobytes or megabytes.
| mem | memory amount to calculate |
Definition at line 349 of file StatusBar.java.
|
private |
Sets the coordinates of the MapCursor to cursor label and the offset when in drag mode.
| mapCursor | the map cursor to set coordinates from |
Definition at line 365 of file StatusBar.java.
Referenced by net.sf.gridarta.gui.misc.StatusBar<?, ?, ?>.setCurrentMapView().
Here is the caller graph for this function:
|
private |
Set new mouse and map coordinates to mouse label.
| e | Event that was fired from #MapCursor |
Definition at line 390 of file StatusBar.java.
|
private |
Definition at line 401 of file StatusBar.java.
| void net.sf.gridarta.gui.misc.StatusBar< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.setStatusText | ( | final String | text | ) |
Sets the level status text, which usually displays arch numbers.
| text | the text |
Definition at line 320 of file StatusBar.java.
Referenced by net.sf.gridarta.action.GcAction.gc().
Here is the caller graph for this function:
|
staticprivate |
Action Builder.
Definition at line 79 of file StatusBar.java.
|
private |
The ArchetypeSet.
Definition at line 86 of file StatusBar.java.
Referenced by net.sf.gridarta.gui.misc.StatusBar<?, ?, ?>.StatusBar().
|
private |
The label that shows the cursor.
Definition at line 107 of file StatusBar.java.
|
private |
The NamedObjects instance to use.
Definition at line 93 of file StatusBar.java.
Referenced by net.sf.gridarta.gui.misc.StatusBar<?, ?, ?>.StatusBar().
|
staticprivate |
The DecimalFormat to use for formatting the numbers in getMemoryString(long).
Definition at line 329 of file StatusBar.java.
|
private |
The MapControlListener used to detect saved maps.
Definition at line 220 of file StatusBar.java.
|
private |
The map cursor listener to detect map cursor changes.
Definition at line 140 of file StatusBar.java.
|
private |
The map manager listener to detect current map changes.
Definition at line 168 of file StatusBar.java.
|
private |
The map view for which mapCursorListener is registered, or.
if none is registered.
Definition at line 134 of file StatusBar.java.
Referenced by net.sf.gridarta.gui.misc.StatusBar<?, ?, ?>.setCurrentMapView().
|
private |
The map view manager listener to detect current map changes.
Definition at line 197 of file StatusBar.java.
|
private |
The label that shows the memory status.
Definition at line 121 of file StatusBar.java.
|
private |
The label that shows the mouse.
Definition at line 100 of file StatusBar.java.
|
private |
Temporary used to get map coordinates.
Definition at line 127 of file StatusBar.java.
Referenced by net.sf.gridarta.gui.misc.StatusBar<?, ?, ?>.mousePosChanged().
|
private |
The MouseMotionListener for tracking the mouse position in map windows.
Definition at line 235 of file StatusBar.java.
|
staticprivate |
The serial Version UID.
Definition at line 73 of file StatusBar.java.
|
private |
The label that shows the one line text message.
Definition at line 114 of file StatusBar.java.
|
private |
The action listener which is registered to periodically update the status bar.
Definition at line 254 of file StatusBar.java.
|
staticprivate |
The units used by getMemoryString(long).
Definition at line 340 of file StatusBar.java.