|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
es.prodevelop.gvsig.mobile.gui.mainframe.MainWindow
This is the application main window. It is instantiated by the
GvsigMobileApp
class and it owns the MapControl and all the
graphic components (menu items, status bar, toos and tool bars, etc)
It acts as the mouse listener that starts actions when a new tool is selected
(not when the tool is used, this is done by the MapToolListener
).
When it is sezied (due also to new settings in the screen - horizontal/vertical)
all the compoenents are notified and repainted.
MapControl
,
MapToolListener
,
TBButton
,
Serialized FormField Summary | |
Animator |
animator
|
TBMenu |
dropMenu
|
StatusBar |
statusBar
|
Fields inherited from class java.awt.Frame |
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
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 | |
MainWindow(java.awt.Frame spl_dlg,
java.util.Timer spl_timer)
Creates a new instance of the MainWindow given a splash
screen and a timer |
|
MainWindow(java.awt.Frame spl_dlg,
java.util.Timer spl_timer,
int _width,
int _height)
Creates a new instance of the MainWindow given a splash
screen, a timer and dimensions of the screen |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent ae)
|
void |
addEcwLayer(boolean repaint)
Starts the process to add a new ECW layer to the view (first of all, shows a file chooser to choose a file.) |
void |
addShpLayer(boolean repaint)
Starts the process to add a new SHP layer to the view (first of all, shows a file chooser to choose a file.) |
void |
addToolBar(ToolBar _newbar)
Adds a ToolBar to the array of ToolBars in MainWindow |
void |
addWkrLayer(boolean repaint)
Starts the process to add a new WKR layer to the view (first of all, shows a file chooser to choose a file.) |
void |
addWmsLayer(boolean repaint)
This method is called when the user clicks on the "add WMS" button. |
void |
closeAll()
Closes all datasources associated to the layers. |
void |
componentHidden(java.awt.event.ComponentEvent e)
|
void |
componentMoved(java.awt.event.ComponentEvent e)
|
void |
componentResized(java.awt.event.ComponentEvent e)
|
void |
componentShown(java.awt.event.ComponentEvent e)
|
void |
doAddWmsLayer(WMSDialog dlg,
java.lang.String wms_version,
java.lang.String path_symbol,
boolean repaint)
This is the method that truly adds a WMS layer, called by the WMS dialog. |
MapControl |
getMapControl()
Returns the Window's MapControl |
ToolBar |
getSelectedToolBar()
Gets the currently selected tool bar (its button is at the top of the left-most vertical button bar.) |
boolean |
getTool(TBButton tb)
Searches for the existence of a tool in the ToolBars |
void |
keyPressed(java.awt.event.KeyEvent e)
The main window also listens to key events: left arrow cursor: pan to the west, 1/2 of the width of the view. |
void |
keyReleased(java.awt.event.KeyEvent e)
|
void |
keyTyped(java.awt.event.KeyEvent e)
|
void |
mouseClicked(java.awt.event.MouseEvent arg0)
This method is triggered every time a new tool button is selected, or when any of the available dialogs has to be opened (project/app/GPS settings, etc.) |
void |
mouseEntered(java.awt.event.MouseEvent arg0)
|
void |
mouseExited(java.awt.event.MouseEvent arg0)
|
void |
mousePressed(java.awt.event.MouseEvent arg0)
|
void |
mouseReleased(java.awt.event.MouseEvent arg0)
|
void |
setAllToolsVisible(boolean visibility)
Sets all the buttons of all tool bars to visible/invisible |
void |
setStatusBarIcon(int id,
java.lang.String dir,
java.lang.String filename)
Sets a new icon in the status bar. |
void |
setStatusBarSubIcon(int id,
java.lang.String dir,
java.lang.String filename)
Sets a new sub icon in the status bar. |
void |
setStatusBarText(int id,
java.lang.String txt)
Sets a new text in the status bar. |
void |
unselectAllButtons()
Unselects all the buttons of all tool bars. |
void |
winDeactivated()
This method is called when the main window changes its graphical status in a way that makes it sensible to stop using the GPS tracking (iconified) |
Methods inherited from class java.awt.Frame |
addNotify, getAccessibleContext, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.awt.Window |
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, show, toBack, toFront |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
getFont, postEvent |
Field Detail |
public StatusBar statusBar
public Animator animator
public TBMenu dropMenu
Constructor Detail |
public MainWindow(java.awt.Frame spl_dlg, java.util.Timer spl_timer)
MainWindow
given a splash
screen and a timer
spl_dlg
- splash dialog to showspl_timer
- timer. Can be nullpublic MainWindow(java.awt.Frame spl_dlg, java.util.Timer spl_timer, int _width, int _height)
MainWindow
given a splash
screen, a timer and dimensions of the screen
spl_dlg
- splash dialog to showspl_timer
- timer. Can be null_width
- screen width in pixels_height
- screen height in pixelsMethod Detail |
public MapControl getMapControl()
public void addToolBar(ToolBar _newbar)
ToolBar
to the array of ToolBars in MainWindow
_newbar
- New ToolBar
to be addedpublic boolean getTool(TBButton tb)
tb
- TBActionButton
button to be found
boolean
answer. true
if foundpublic void setAllToolsVisible(boolean visibility)
visibility
- true
set all buttons to visible
false
set all buttons to invisiblepublic void unselectAllButtons()
TBButton
's
public void closeAll()
public void actionPerformed(java.awt.event.ActionEvent ae)
actionPerformed
in interface java.awt.event.ActionListener
public void addShpLayer(boolean repaint)
repaint
- whether the view has to be repainted after the layer
has been added. This is useful when the layer is added from the TOC.
We don't want arefresh in that moment.public void addEcwLayer(boolean repaint)
repaint
- whether the view has to be repainted after the layer
has been added. This is useful when the layer is added from the TOC.
We don't want arefresh in that moment.public void mouseClicked(java.awt.event.MouseEvent arg0)
mouseClicked
in interface java.awt.event.MouseListener
public void winDeactivated()
public void doAddWmsLayer(WMSDialog dlg, java.lang.String wms_version, java.lang.String path_symbol, boolean repaint)
dlg
- the WMS dialog that has just been closedwms_version
- the WMS version of the serverpath_symbol
- The path separator to be ueed in requestsrepaint
- Whether the view has to be repainted after the new layer
has been added (if added from TOC, this has to be false)public ToolBar getSelectedToolBar()
public void setStatusBarText(int id, java.lang.String txt)
id
- The ID of the status bar to be updated.txt
- The text to be printed in the status bar.public void setStatusBarIcon(int id, java.lang.String dir, java.lang.String filename)
id
- The ID of the status bar to be updated.dir
- The path of the folder where the image is locatedfilename
- The name of the image file.public void setStatusBarSubIcon(int id, java.lang.String dir, java.lang.String filename)
id
- The ID of the status bar to be updated.dir
- The path of the folder where the image is locatedfilename
- The name of the image file.public void mousePressed(java.awt.event.MouseEvent arg0)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent arg0)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent arg0)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent arg0)
mouseExited
in interface java.awt.event.MouseListener
public void addWmsLayer(boolean repaint)
repaint
- whether the view has to be repainted after adding the
new layer.WMSDialog
public void addWkrLayer(boolean repaint)
repaint
- whether the view has to be repainted after the layer
has been added. This is useful when the layer is added from the TOC.
We don't want arefresh in that moment.public void componentResized(java.awt.event.ComponentEvent e)
componentResized
in interface java.awt.event.ComponentListener
public void componentHidden(java.awt.event.ComponentEvent e)
componentHidden
in interface java.awt.event.ComponentListener
public void componentMoved(java.awt.event.ComponentEvent e)
componentMoved
in interface java.awt.event.ComponentListener
public void componentShown(java.awt.event.ComponentEvent e)
componentShown
in interface java.awt.event.ComponentListener
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed
in interface java.awt.event.KeyListener
public void keyTyped(java.awt.event.KeyEvent e)
keyTyped
in interface java.awt.event.KeyListener
public void keyReleased(java.awt.event.KeyEvent e)
keyReleased
in interface java.awt.event.KeyListener
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |