Interface ILcyApplicationPane

All Superinterfaces:
ILcdPropertyChangeSource

public interface ILcyApplicationPane extends ILcdPropertyChangeSource
Implementations of this interface are panes to put the java.awt.Components of the application in. So every gui element ( map, layercontrol, panels of addons, ... ) that needs to be displayed to the user will be in an ILcyApplicationPane.

To work with this pane - it is add your own components, set the layout, ... - use getAppContentPane to retrieve a regular java.awt.Container. Make sure that every operation on the content pane is performed in the event dispatch thread. See ILcyApplicationPaneFactory for more information. The idea of this interface is to make abstraction of the swing component used to represent the gui elements. Implementations can range from a dialog over a frame to a regular panel or anything else you can come up with. So one cannot make any assumptions on the looks or the size of an ILcyApplicationPane. Note that there is no operation to add an application pane to Lucy's environment. The creation of a pane will add it to the (visible) Lucy's environment right away. This means all swing operations (like add, remove, ...) on the content pane of an application pane need to be performed on the event dispatch thread (swing is designed to be single threaded).

See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The key representing the hint 'auto-hide' of an application pane.
    static final String
    The key representing the hint 'floating' of an application pane.
    static final String
    The key representing the location of the application pane when the application pane is floating.
    static final String
    The key representing the long description of an application pane.
    static final String
    The key representing the short description of an application pane.
    static final String
    The key representing the icon value of an application pane.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Brings the applicationpane to the front.
    boolean
    Returns true if this ILcyApplicationPane can be packed, false otherwise.
    void
    Disposes this ILcyApplicationPane and removes it from the user interface.
    Gets the AppContentPane.
    Returns the current size of this application pane.
    Returns the title of this ILcyApplicationPane.
    Gets one of this object's properties using the associated key.
    boolean
    Returns true if this ILcyApplicationPane is visible, false otherwise.
    boolean
    Returns true if this pane allows to be disposed, false otherwise.
    void
    Packs the ILcyApplicationPane.
    void
    putValue(String aKey, Object aValue)
    Sets one of this object's properties using the associated key.
    void
    setAppEnabled(boolean aEnabled)
    Sets the enabled attribute of the ILcyApplicationPane.
    void
    setAppSize(Dimension aDimension)
    Sets the size of the ILcyApplicationPane.
    void
    Sets the title of this ILcyApplicationPane.
    void
    setAppVisible(boolean aVisible)
    Sets the visible property of this ILcyApplicationPane.
    void
    setDisposable(boolean aDisposable)
    Sets if this pane can be disposed or not.
    void
    setResizable(boolean aResizable)
    Sets the Resizable attribute of the ILcyApplicationPane object.

    Methods inherited from interface com.luciad.util.ILcdPropertyChangeSource

    addPropertyChangeListener, removePropertyChangeListener
  • Field Details

    • SMALL_ICON

      static final String SMALL_ICON
      The key representing the icon value of an application pane. The value corresponding to this key must be an ILcdIcon.
      See Also:
    • SHORT_DESCRIPTION

      static final String SHORT_DESCRIPTION
      The key representing the short description of an application pane. The value corresponding to this key must be a String.
      See Also:
    • LONG_DESCRIPTION

      static final String LONG_DESCRIPTION
      The key representing the long description of an application pane. The value corresponding to this key must be a String.
      See Also:
    • HINT_AUTO_HIDE

      static final String HINT_AUTO_HIDE
      The key representing the hint 'auto-hide' of an application pane. The value corresponding to this key must be a Boolean. The value should be used to indicate if a docked application pane should automatically hide itself or not. It is optional in the sense that ILcyApplicationPane implementations are allowed to ignore this property.
      See Also:
    • HINT_FLOATING

      static final String HINT_FLOATING
      The key representing the hint 'floating' of an application pane. The value corresponding to this key must be a Boolean. The value should be used to indicate if the application pane is represented as a floating dialog (true) or a docked frame (false). It is optional in the sense that ILcyApplicationPane implementations are allowed to ignore this property.
      See Also:
    • HINT_FLOATING_LOCATION

      static final String HINT_FLOATING_LOCATION
      The key representing the location of the application pane when the application pane is floating. The value corresponding to this key must be a Point. It is optional in the sense that ILcyApplicationPane implementations are allowed to ignore this property.
      See Also:
  • Method Details

    • packApp

      void packApp()
      Packs the ILcyApplicationPane. It is, giving it its preferred size and laying out its subcomponents. Note that this is only possible if canPackApp returns true.
      See Also:
    • canPackApp

      boolean canPackApp()
      Returns true if this ILcyApplicationPane can be packed, false otherwise.
      Returns:
      true if this ILcyApplicationPane can be packed, false otherwise.
      See Also:
    • disposeApp

      void disposeApp()

      Disposes this ILcyApplicationPane and removes it from the user interface. This application pane should no longer be used after calling this method.

      The associated ILcyApplicationPaneOwner is notified.

      This method does not take isDisposable() into account, it is up the user of this class to verify if the application pane is disposable. This allows the application pane to be disposed regardless of the disposable property, which can for example be useful to programmatically clean application panes.

    • isDisposable

      boolean isDisposable()
      Returns true if this pane allows to be disposed, false otherwise.
      Returns:
      true if this pane allows to be disposed, false otherwise.
      See Also:
    • setDisposable

      void setDisposable(boolean aDisposable)

      Sets if this pane can be disposed or not.

      Note that disposeApp() does not respect this property, the properties primary use is to enable/disable a close action in the user interface.

      Parameters:
      aDisposable - True if this pane can be disposed, false otherwise.
      See Also:
    • setAppEnabled

      void setAppEnabled(boolean aEnabled)
      Sets the enabled attribute of the ILcyApplicationPane.
      Parameters:
      aEnabled - The new AppEnabled value
    • isAppVisible

      boolean isAppVisible()
      Returns true if this ILcyApplicationPane is visible, false otherwise.
      Returns:
      true if this ILcyApplicationPane is visible, false otherwise.
      See Also:
    • setAppVisible

      void setAppVisible(boolean aVisible)

      Sets the visible property of this ILcyApplicationPane. Make sure to set an application pane visible after it is created and initialized. If not, it might not be available in the user interface (depending on the implementation).

      Setting it invisible is mostly useful to temporarily 'hide' it, as it won't disposed and all resources are still in use when invisible.

      Parameters:
      aVisible - The new AppVisible value
      See Also:
    • setAppSize

      void setAppSize(Dimension aDimension)
      Sets the size of the ILcyApplicationPane. There is normally no need to use this method. Instead let Swing calculate proper sizes, based on the minimum, preferred and maximum sizes of the smallest components (such as text fields, check boxes etc.). This assures proper functioning, even on systems that have custom font or display settings.
      Parameters:
      aDimension - The new size
      See Also:
    • getAppSize

      Dimension getAppSize()
      Returns the current size of this application pane.
      Returns:
      the current size of this application pane.
      See Also:
    • setAppTitle

      void setAppTitle(String aTitle)
      Sets the title of this ILcyApplicationPane.
      Parameters:
      aTitle - The new title
      See Also:
    • getAppTitle

      String getAppTitle()
      Returns the title of this ILcyApplicationPane.
      Returns:
      the title of this ILcyApplicationPane.
      See Also:
    • getAppContentPane

      Container getAppContentPane()

      Gets the AppContentPane. The content pane is the visual part of this ILcyApplicationPane. It is used to add, remove, ... your own components. Make sure that every operation on the content pane is performed in the event dispatch thread. See ILcyApplicationPaneFactory for more information.

      Note that the implementation of this interface is free to choose the LayoutManager set on the returned Container. For example if you want to add a single Component to the application pane which takes all available space, you cannot assume that you can simply add the component. In this case, you could for example set a BorderLayout and add the component to the center:

      
           ILcyApplicationPane appPane = ... ;
           Component content = ... ;
      
           Container contentPane = appPane.getAppContentPane();
           //explicitly set a layout manager
           contentPane.setLayoutManager( new BorderLayout() );
           //ensure that the content takes all available space by adding it to the center
           contentPane.add( content, BorderLayout.CENTER );
         

      Returns:
      The AppContentPane
      See Also:
    • bringAppToFront

      void bringAppToFront()
      Brings the applicationpane to the front. Note that this method only makes sense if the pane is visible.
      See Also:
    • setResizable

      void setResizable(boolean aResizable)
      Sets the Resizable attribute of the ILcyApplicationPane object.
      Parameters:
      aResizable - The new Resizable value
    • putValue

      void putValue(String aKey, Object aValue)

      Sets one of this object's properties using the associated key. There are three predefined keys: SMALL_ICON, SHORT_DESCRIPTION and LONG_DESCRIPTION. Implementations of this interface can use these properties to show them in their user interface. For instance the icon set with the SMALL_ICON key could be shown in the tab of a tabbed pane.

      The type of the value is specified by the key. For instance, the key SMALL_ICON demands that the value is an ILcdIcon.

      If the value has changed, a PropertyChangeEvent is sent to listeners with aKey as the property name.

      Parameters:
      aKey - a String representing the key. This must not be null, but can otherwise be any String, ie. it is not restricted to being one of SMALL_ICON, SHORT_DESCRIPTION or LONG_DESCRIPTION.
      aValue - an Object value. This may be null.
      See Also:
    • getValue

      Object getValue(String aKey)
      Gets one of this object's properties using the associated key.
      Parameters:
      aKey - the String of the key for which you want to retrieve the value. This can be any String, ie. it is not restricted to being one of SMALL_ICON, SHORT_DESCRIPTION or LONG_DESCRIPTION.
      Returns:
      The Object value corresponding to aKey, or null if no value corresponding to aKey could be found. The type of this value is determined by the key. For instance, the SMALL_ICON key specifies that the returned value is an ILcdIcon.
      See Also: