Class 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:
  • Field Details

    • MEMORY_GC

      public static String MEMORY_GC
    • MEMORY_TIPS

      public static String MEMORY_TIPS
    • COORDINATES

      public static String COORDINATES
    • COORDINATES_TIPS

      public static String COORDINATES_TIPS
    • SCALE

      public static String SCALE
    • SCALE_TIPS

      public static String SCALE_TIPS
    • MAXIMIZED_KEY

      public static final String MAXIMIZED_KEY
    • HORIZONTAL_KEY

      public static final String HORIZONTAL_KEY
    • VERTICAL_KEY

      public static final String VERTICAL_KEY
    • WIDTH_KEY

      public static final String WIDTH_KEY
    • HEIGHT_KEY

      public static final String HEIGHT_KEY
    • STATUSPANEL_DIVIDER_LOCATION_1

      public static final String STATUSPANEL_DIVIDER_LOCATION_1
    • STATUSPANEL_DIVIDER_LOCATION_2

      public static final String STATUSPANEL_DIVIDER_LOCATION_2
    • STATUSPANEL_DIVIDER_LOCATION_3

      public static final String STATUSPANEL_DIVIDER_LOCATION_3
    • STATUSPANEL_DIVIDER_LOCATION_4

      public static final String STATUSPANEL_DIVIDER_LOCATION_4
    • DESKTOPSTATUS_DIVIDER_LOCATION

      public static final String DESKTOPSTATUS_DIVIDER_LOCATION
  • Constructor Details

  • Method Details

    • addEasyKeyListener

      public void addEasyKeyListener(KeyListener l)
      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

      public void removeEasyKeyListener(KeyListener l)
    • addEasyKeyListenerToComp

      public void addEasyKeyListenerToComp(Component c)
    • removeEasyKeyListenerFromComp

      public void removeEasyKeyListenerFromComp(Component c)
    • getMBCommittedMemory

      public String 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 public void log(String message)
      Deprecated.
      - use com.vividsolutions.jump.workbench.Logger instead
      backward compatibility log method for legacy code
    • log

      @Deprecated public void log(String message, Class clazz)
      Deprecated.
      - use com.vividsolutions.jump.workbench.Logger instead
      backward compatibility log method for legacy code. NOTE: parameter clazz is ignored
    • log

      @Deprecated public void log(String message, Throwable t)
      Deprecated.
      - use com.vividsolutions.jump.workbench.Logger instead
      backward compatibility log method for legacy code
    • setMinimumFeatureExtentForAnyRenderingInPixels

      public void setMinimumFeatureExtentForAnyRenderingInPixels(int newMinimumFeatureExtentForAnyRenderingInPixels)
    • displayLastStatusMessage

      public void displayLastStatusMessage()
    • setStatusMessage

      public void setStatusMessage(String message)
      Description copied from interface: LayerViewPanelContext
      Displays a message indicating the status of current operations, typically in a status bar.
      Specified by:
      setStatusMessage in interface LayerViewPanelContext
    • setStatusMessage

      public void setStatusMessage(String message, int millis)
    • setStatusMessage

      public void setStatusMessage(String message, Color color)
    • setStatusMessage

      public void setStatusMessage(String msg, int millis, Color color, boolean flash)
    • setTimeMessage

      public void setTimeMessage(String message)
    • setScaleText

      public void setScaleText(String message)
    • setVisible

      public void setVisible(boolean b)
      Overrides:
      setVisible in class Window
    • getActiveInternalFrame

      public JInternalFrame getActiveInternalFrame()
    • getInternalFrames

      public JInternalFrame[] getInternalFrames()
    • getCategoryPopupMenu

      public TitledPopupMenu getCategoryPopupMenu()
    • getContext

      public WorkbenchContext getContext()
    • getDesktopPane

      public JDesktopPane getDesktopPane()
    • getEnvelopeRenderingThreshold

      public int getEnvelopeRenderingThreshold()
    • getLayerNamePopupMenu

      public TitledPopupMenu getLayerNamePopupMenu()
    • getWMSLayerNamePopupMenu

      public TitledPopupMenu getWMSLayerNamePopupMenu()
    • getLayerViewPanelListener

      public LayerViewPanelListener getLayerViewPanelListener()
    • getNodeClassToPopupMenuMap

      public Map<Class<?>, JPopupMenu> getNodeClassToPopupMenuMap()
    • getLayerNamePanelListener

      public LayerNamePanelListener getLayerNamePanelListener()
    • getMaximumFeatureExtentForEnvelopeRenderingInPixels

      public int getMaximumFeatureExtentForEnvelopeRenderingInPixels()
    • getMinimumFeatureExtentForAnyRenderingInPixels

      public int getMinimumFeatureExtentForAnyRenderingInPixels()
    • getOutputFrame

      public HTMLFrame getOutputFrame()
    • getToolBar

      public WorkbenchToolBar getToolBar()
    • activateFrame

      public void activateFrame(JInternalFrame frame)
    • addInternalFrame

      public void addInternalFrame(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.
    • addInternalFrame

      public void addInternalFrame(JInternalFrame internalFrame, boolean alwaysOnTop, boolean autoUpdateToolBar)
    • addTaskFrame

      public TaskFrame addTaskFrame()
    • createTask

      public Task createTask()
    • addTaskFrame

      public TaskFrame addTaskFrame(Task task)
    • addTaskFrame

      public TaskFrame addTaskFrame(TaskFrame taskFrame)
    • getTaskFrames

      public List<TaskFrame> getTaskFrames()
      gather a list of open task frames and return them
    • getActiveTaskFrame

      public TaskFrame getActiveTaskFrame()
    • setActiveTaskFrame

      public void setActiveTaskFrame(TaskFrame taskFrame)
    • flash

      public void flash(HTMLFrame frame)
    • handleThrowable

      public void handleThrowable(Throwable t)
      Can be called regardless of whether the current thread is the AWT event dispatch thread.
      Specified by:
      handleThrowable in interface ErrorHandler
      Parameters:
      t - Description of the Parameter
    • handleThrowable

      public void handleThrowable(Throwable t, Component parent)
      show a modal error dialog and log the issue
    • toMessage

      public static String toMessage(Throwable t)
    • hasInternalFrame

      public boolean hasInternalFrame(JInternalFrame internalFrame)
    • removeInternalFrame

      public void removeInternalFrame(JInternalFrame internalFrame)
    • warnUser

      public void warnUser(String warning)
      Description copied from interface: LayerViewPanelContext
      Notifies the user about a minor issue. Subclasses may wish to simply forward the warning to #setStatusMessage.
      Specified by:
      warnUser in interface LayerViewPanelContext
    • zoomChanged

      public void zoomChanged(org.locationtech.jts.geom.Envelope modelEnvelope)
      Specified by:
      zoomChanged in interface ViewportListener
    • getChoosableStyleClasses

      public Set getChoosableStyleClasses()
      Fundamental Style classes (like BasicStyle, VertexStyle, and LabelStyle) cannot be removed, and are thus excluded from the choosable Style classes.
    • addChoosableStyleClass

      public void addChoosableStyleClass(Class choosableStyleClass)
    • addKeyboardShortcut

      public void addKeyboardShortcut(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. 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

      public PlugIn getKeyboardShortcutPlugin(KeyStroke key)
    • getKeyboardShortcuts

      public final Set<KeyStroke> getKeyboardShortcuts()
    • getInternalFrameCloseHandler

      public InternalFrameCloseHandler getInternalFrameCloseHandler()
    • setInternalFrameCloseHandler

      public void setInternalFrameCloseHandler(InternalFrameCloseHandler value)
    • addApplicationExitHandler

      public void addApplicationExitHandler(ApplicationExitHandler aeh)
      Adds an ApplicationExitHandler, wich will be executed if the WorkbenchFrame gets closing.
      Parameters:
      aeh - the ApplicationExitHandler to add
    • removeApplicationExitHandler

      public void removeApplicationExitHandler(ApplicationExitHandler aeh)
      Remove's the given ApplicationExitHandler.
      Parameters:
      aeh - the ApplicationExitHandler to remove
    • setTaskFrameFactory

      public void setTaskFrameFactory(ComponentFactory<TaskFrame> taskFrameFactory)
      Parameters:
      taskFrameFactory - the taskFrameFactory to set
    • saveWindowState

      public void saveWindowState()
    • initWindowLocation

      public Point initWindowLocation()
    • initWindowSize

      public Dimension initWindowSize()
    • restore

      public void restore()
    • getTaskListeners

      public ArrayList<TaskListener> getTaskListeners()
      Returns:
      the taskListeners
    • addTaskListener

      public void addTaskListener(TaskListener l)
      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

      public void removeTaskListener(TaskListener l)
      Remove's a TaskListener.
      Parameters:
      l - - The TaskListener to add.