Class WorkbenchFrame
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
com.vividsolutions.jump.workbench.ui.WorkbenchFrame
- All Implemented Interfaces:
ErrorHandler, LayerViewPanelContext, ViewportListener, ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants
public class WorkbenchFrame
extends JFrame
implements LayerViewPanelContext, ViewportListener, ErrorHandler
This class is responsible for the main window of the JUMP application.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class JFrame
JFrame.AccessibleJFrameNested classes/interfaces inherited from class Frame
Frame.AccessibleAWTFrameNested classes/interfaces inherited from class Window
Window.AccessibleAWTWindow, Window.TypeNested classes/interfaces inherited from class Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic Stringstatic Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class JFrame
accessibleContext, rootPane, rootPaneCheckingEnabledFields inherited from class 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_CURSORFields inherited from class Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields inherited from interface WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivateFrame(JInternalFrame frame) voidAdds an ApplicationExitHandler, wich will be executed if the WorkbenchFrame gets closing.voidaddChoosableStyleClass(Class choosableStyleClass) voidUnlike #add(KeyListener), listeners registered using this method are notified when KeyEvents occur on this frame's child components.voidvoidaddInternalFrame(JInternalFrame internalFrame) If internalFrame is a LayerManagerProxy, the close behaviour will be altered so that the user is prompted if it is the last window on the LayerManager.voidaddInternalFrame(JInternalFrame internalFrame, boolean alwaysOnTop, boolean autoUpdateToolBar) voidaddKeyboardShortcut(KeyStroke stroke, PlugIn plugIn) Adds a keyboard shortcut for a plugin. logs plugin exceptions. note - attaching to keyCode 'a', modifiers =1 will detect shift-A events.addTaskFrame(Task task) addTaskFrame(TaskFrame taskFrame) voidAdd's a TaskListener, wich will be fired if a Task was added via the WorkbenchFrame.addTaskFrame(TaskFrame taskFrame) or the a Task was loaded completly with all his layers.voidvoidFundamental Style classes (like BasicStyle, VertexStyle, and LabelStyle) cannot be removed, and are thus excluded from the choosable Style classes.intintintMap<Class<?>, JPopupMenu> gather a list of open task frames and return themvoidCan be called regardless of whether the current thread is the AWT event dispatch thread.voidhandleThrowable(Throwable t, Component parent) show a modal error dialog and log the issuebooleanhasInternalFrame(JInternalFrame internalFrame) voidDeprecated.- use com.vividsolutions.jump.workbench.Logger insteadvoidDeprecated.- use com.vividsolutions.jump.workbench.Logger insteadvoidDeprecated.- use com.vividsolutions.jump.workbench.Logger insteadvoidRemove's the given ApplicationExitHandler.voidvoidvoidremoveInternalFrame(JInternalFrame internalFrame) voidRemove's a TaskListener.voidrestore()voidvoidsetActiveTaskFrame(TaskFrame taskFrame) voidsetEnvelopeRenderingThreshold(int newEnvelopeRenderingThreshold) voidvoidsetMaximumFeatureExtentForEnvelopeRenderingInPixels(int newMaximumFeatureExtentForEnvelopeRenderingInPixels) voidsetMinimumFeatureExtentForAnyRenderingInPixels(int newMinimumFeatureExtentForAnyRenderingInPixels) voidsetScaleText(String message) voidsetStatusMessage(String message) Displays a message indicating the status of current operations, typically in a status bar.voidsetStatusMessage(String message, int millis) voidsetStatusMessage(String msg, int millis, Color color, boolean flash) voidsetStatusMessage(String message, Color color) voidsetTaskFrameFactory(ComponentFactory<TaskFrame> taskFrameFactory) voidsetTimeMessage(String message) voidsetVisible(boolean b) static StringvoidNotifies the user about a minor issue.voidzoomChanged(org.locationtech.jts.geom.Envelope modelEnvelope) Methods inherited from class JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, updateMethods inherited from class Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecoratedMethods inherited from class Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, show, toBack, toFrontMethods inherited from class Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTreeMethods inherited from class Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface MenuContainer
getFont, postEvent
-
Field Details
-
MEMORY_GC
-
MEMORY_TIPS
-
COORDINATES
-
COORDINATES_TIPS
-
SCALE
-
SCALE_TIPS
-
MAXIMIZED_KEY
-
HORIZONTAL_KEY
-
VERTICAL_KEY
-
WIDTH_KEY
-
HEIGHT_KEY
-
STATUSPANEL_DIVIDER_LOCATION_1
-
STATUSPANEL_DIVIDER_LOCATION_2
-
STATUSPANEL_DIVIDER_LOCATION_3
-
STATUSPANEL_DIVIDER_LOCATION_4
-
DESKTOPSTATUS_DIVIDER_LOCATION
-
-
Constructor Details
-
WorkbenchFrame
- Throws:
Exception
-
-
Method Details
-
addEasyKeyListener
Unlike #add(KeyListener), listeners registered using this method are notified when KeyEvents occur on this frame's child components. Note: Bug: KeyListeners registered using this method may receive events multiple times.- See Also:
-
removeEasyKeyListener
-
addEasyKeyListenerToComp
-
removeEasyKeyListenerFromComp
-
getMBCommittedMemory
-
setEnvelopeRenderingThreshold
public void setEnvelopeRenderingThreshold(int newEnvelopeRenderingThreshold) - Parameters:
newEnvelopeRenderingThreshold- the number of on-screen features above which envelope rendering should occur
-
setMaximumFeatureExtentForEnvelopeRenderingInPixels
public void setMaximumFeatureExtentForEnvelopeRenderingInPixels(int newMaximumFeatureExtentForEnvelopeRenderingInPixels) -
log
Deprecated.- use com.vividsolutions.jump.workbench.Logger insteadbackward compatibility log method for legacy code -
log
Deprecated.- use com.vividsolutions.jump.workbench.Logger insteadbackward compatibility log method for legacy code. NOTE: parameter clazz is ignored -
log
Deprecated.- use com.vividsolutions.jump.workbench.Logger insteadbackward compatibility log method for legacy code -
setMinimumFeatureExtentForAnyRenderingInPixels
public void setMinimumFeatureExtentForAnyRenderingInPixels(int newMinimumFeatureExtentForAnyRenderingInPixels) -
displayLastStatusMessage
public void displayLastStatusMessage() -
setStatusMessage
Description copied from interface:LayerViewPanelContextDisplays a message indicating the status of current operations, typically in a status bar.- Specified by:
setStatusMessagein interfaceLayerViewPanelContext
-
setStatusMessage
-
setStatusMessage
-
setStatusMessage
-
setTimeMessage
-
setScaleText
-
setVisible
public void setVisible(boolean b) - Overrides:
setVisiblein classWindow
-
getActiveInternalFrame
-
getInternalFrames
-
getCategoryPopupMenu
-
getContext
-
getDesktopPane
-
getEnvelopeRenderingThreshold
public int getEnvelopeRenderingThreshold() -
getLayerNamePopupMenu
-
getWMSLayerNamePopupMenu
-
getLayerViewPanelListener
-
getNodeClassToPopupMenuMap
-
getLayerNamePanelListener
-
getMaximumFeatureExtentForEnvelopeRenderingInPixels
public int getMaximumFeatureExtentForEnvelopeRenderingInPixels() -
getMinimumFeatureExtentForAnyRenderingInPixels
public int getMinimumFeatureExtentForAnyRenderingInPixels() -
getOutputFrame
-
getToolBar
-
activateFrame
-
addInternalFrame
If internalFrame is a LayerManagerProxy, the close behaviour will be altered so that the user is prompted if it is the last window on the LayerManager. -
addInternalFrame
public void addInternalFrame(JInternalFrame internalFrame, boolean alwaysOnTop, boolean autoUpdateToolBar) -
addTaskFrame
-
createTask
-
addTaskFrame
-
addTaskFrame
-
getTaskFrames
-
getActiveTaskFrame
-
setActiveTaskFrame
-
flash
-
handleThrowable
Can be called regardless of whether the current thread is the AWT event dispatch thread.- Specified by:
handleThrowablein interfaceErrorHandler- Parameters:
t- Description of the Parameter
-
handleThrowable
-
toMessage
-
hasInternalFrame
-
removeInternalFrame
-
warnUser
Description copied from interface:LayerViewPanelContextNotifies the user about a minor issue. Subclasses may wish to simply forward the warning to #setStatusMessage.- Specified by:
warnUserin interfaceLayerViewPanelContext
-
zoomChanged
public void zoomChanged(org.locationtech.jts.geom.Envelope modelEnvelope) - Specified by:
zoomChangedin interfaceViewportListener
-
getChoosableStyleClasses
Fundamental Style classes (like BasicStyle, VertexStyle, and LabelStyle) cannot be removed, and are thus excluded from the choosable Style classes. -
addChoosableStyleClass
-
addKeyboardShortcut
Adds a keyboard shortcut for a plugin. logs plugin exceptions. note - attaching to keyCode 'a', modifiers =1 will detect shift-A events. It will *not* detect caps-lock-'a'. This is due to inconsistencies in java.awt.event.KeyEvent. In the unlikely event you actually do want to also attach to caps-lock-'a', then make two shortcuts - one to keyCode 'a' and modifiers =1 (shift-A) and one to keyCode 'A' and modifiers=0 (caps-lock A). For more details, see the java.awt.event.KeyEvent class - it has a full explanation. Adding an existing keystroke overwrites the existing entry. keyCode What key to attach to (See java.awt.event.KeyEvent) modifiers 0= none, 1=shift, 2= cntrl, 8=alt, 3=shift+cntrl, etc... See the modifier mask constants in the Event class- Parameters:
stroke- can be created via e.g.KeyStroke.getKeyStroke(int, int)plugIn- which plugin to execute
-
getKeyboardShortcutPlugin
-
getKeyboardShortcuts
-
getInternalFrameCloseHandler
-
setInternalFrameCloseHandler
-
addApplicationExitHandler
Adds an ApplicationExitHandler, wich will be executed if the WorkbenchFrame gets closing.- Parameters:
aeh- the ApplicationExitHandler to add
-
removeApplicationExitHandler
Remove's the given ApplicationExitHandler.- Parameters:
aeh- the ApplicationExitHandler to remove
-
setTaskFrameFactory
- Parameters:
taskFrameFactory- the taskFrameFactory to set
-
saveWindowState
public void saveWindowState() -
initWindowLocation
-
initWindowSize
-
restore
public void restore() -
getTaskListeners
- Returns:
- the taskListeners
-
addTaskListener
Add's a TaskListener, wich will be fired if a Task was added via the WorkbenchFrame.addTaskFrame(TaskFrame taskFrame) or the a Task was loaded completly with all his layers.- Parameters:
l- - The TaskListener to add.
-
removeTaskListener
Remove's a TaskListener.- Parameters:
l- - The TaskListener to add.
-