com.ontimize.util.gis.client.gui.panels.alternativelayers
Class AlternativeLayersPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.ontimize.util.gis.client.gui.panels.alternativelayers.AlternativeLayersPanel
All Implemented Interfaces:
com.ontimize.gui.field.AccessForm, com.ontimize.gui.field.FormComponent, com.ontimize.gui.field.IdentifiedElement, com.ontimize.gui.i18n.Internationalization, com.ontimize.gui.SecureElement, LayerChangeListener, IGisClientComponent, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class AlternativeLayersPanel
extends javax.swing.JPanel
implements IGisClientComponent, com.ontimize.gui.field.FormComponent, com.ontimize.gui.field.IdentifiedElement, com.ontimize.gui.i18n.Internationalization, LayerChangeListener, com.ontimize.gui.field.AccessForm

Collapsible layers panel. Includes two basic containers, one with the layers check boxes list and theother with the areas bookmarking tool.
It is possible to add more containers to the current layers panel using the GIS library component InnerPanel.

Configuration parameters:

attributevalues defaultrequiredmeaning
containerbgcolorno The background for the main container color. A possible color for ColorConstants or a RGB value like: '150;230;23'
bgpaintno Paint value to use in this container. See
ColorConstants.paintNameToPaint(String)
closeiconno Path to close icon showed in container
openiconno Path to open icon showed in container
closehighlighticonno Path to highlighted close icon showed in container
openhighlighticonno Path to highlighted open icon showed in container
widthno Layers panel width in pixels
animatedyes/nonono Sets the animation of the two basic inner components enabled/disabled
savebboxiconno Path to "save bounding box" button icon
deletebookmarkiconno Path to "delete bookmark" button icon
zoomtobookmarkiconno Path to "zoom to bookmark" button icon
zoomtolayericonno Path to "zoom to layer bounding box" button icon
selectablecheckvisibleyes/noyesno Sets the "selectable" checkbox visibility
editablecheckvisibleyes/noyesno Sets the "editable" checkbox visibility
zoombuttonvisibleyes/noyesno Sets the "zoom to layer" button visibility
closedonstartupyes/nonono Sets the initial state of the main container

In addition the user can configure the layer list container and the bookmarks container adding to this configuration parameters
the parameters related to <@link InnerPanel> component.

Sample code ("recttitlecolor", "color" and "borderclass" are configuration parameters for the inner panels):

<com.ontimize.util.gis.client.gui.panels.alternativelayers.AlternativeLayersPanel
 bgpaint="exampleLinearGradientPaint" closeicon="com/example/images/mycloseicon.png"
 openicon="com/example/myopenicon" recttitlecolor="#ACA1A2" color="#CC000000"
 borderclass="com.ontimize.gui.container.MattedDeployableBorder"/>

See Also:
InnerPanel, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
(package private)  AddBookmarkLocationComponent addBookmarks
           
protected  com.ontimize.gui.container.Row bottomContainer
           
protected  java.util.List<java.awt.Component> checkboxesPopUpItems
           
protected  boolean closedOnStartup
           
protected static java.lang.String[] collapseParamsStrArray
           
protected  PanelsContainer container
           
protected  java.awt.Color contBgColor
           
(package private)  java.lang.String deleteBookmarkIconStr
           
protected  boolean editableCheckVisible
           
protected  boolean firstTimePaint
           
(package private)  java.awt.FontMetrics fm
           
protected  com.ontimize.gui.Form form
           
protected  IGisViewer gisViewer
           
protected  java.util.Hashtable<java.lang.String,java.lang.Object> innerCompParams
           
protected static java.lang.String[] innerCompParamsStrArray
           
protected  LayersBox layersBox
           
protected  InnerPanel layersTaskPane
           
protected static java.lang.String layersTaskPanelIconPath
           
protected  java.awt.Color lbBgColor
           
protected  BookmarksInnerPanel locationsTaskPane
           
protected static java.lang.String locationsTaskPanelIconPath
           
protected  EmptyPanel panel
           
protected  java.awt.Color panelsBG
           
protected  java.awt.Color panelsTitleBGEnd
           
protected  java.awt.Color panelsTitleBGStart
           
protected  java.util.Hashtable<java.lang.String,java.lang.Object> pContParams
           
(package private)  java.util.ResourceBundle res
           
(package private)  java.lang.String saveBBoxIconStr
           
protected  boolean selectableCheckVisible
           
protected  boolean zoomButtonVisible
           
(package private)  java.lang.String zoomToBookmarkStr
           
(package private)  java.lang.String zoomToLayerIconStr
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface com.ontimize.gui.field.FormComponent
DEBUG
 
Fields inherited from interface com.ontimize.gui.i18n.Internationalization
DEBUG_LANGUAGE
 
Fields inherited from interface com.ontimize.gui.SecureElement
DESACTIVATE_COMPONENT_BY_PERMISSION_TIP
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
AlternativeLayersPanel(java.util.Hashtable parameters)
           
 
Method Summary
 void add(java.awt.Component comp, java.lang.Object constraints)
           
 void addBookmark(BookmarkLocationComponent bookmark)
           
protected  void checkContainerParam(java.lang.String paramName, java.util.Hashtable params)
           
protected  void checkInnerParams(java.lang.String paramName, java.util.Hashtable params)
           
 java.lang.Object getAttribute()
           
 java.awt.Rectangle getComponentLimits()
          Get the component drawing limits, since the component it's not painted on all the extension of the panel.
 java.lang.Object getConstraints(java.awt.LayoutManager layoutManager)
           
 java.awt.Rectangle getContainerBounds()
           
 java.util.Vector getTextsToTranslate()
           
 void init(java.util.Hashtable params)
           
protected  void initGui()
           
 void initPermissions()
           
protected  void initPreferredLocationsComponent()
           
 boolean isEnabled()
           
 boolean isRestricted()
           
 void layerChanged(LayerChangeEvent event)
          Invoked on gis layers description changes
protected  void paintComponent(java.awt.Graphics g)
           
 void removeBookmark(BookmarkLocationComponent bookmark)
           
 void setComponentLocale(java.util.Locale locale)
           
 void setContainerBounds(java.awt.Rectangle bounds)
           
 void setEnabled(boolean enabled)
           
 void setGisViewer(IGisViewer gisViewer)
          Set the gis viewer instance for the actual component
 void setParentForm(com.ontimize.gui.Form parentForm)
           
 void setResourceBundle(java.util.ResourceBundle res)
           
protected  void setViewerToChildren(java.awt.Component comp)
           
 void setVisible(boolean visible)
          Sets the component visible
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

addBookmarks

AddBookmarkLocationComponent addBookmarks

saveBBoxIconStr

java.lang.String saveBBoxIconStr

zoomToBookmarkStr

java.lang.String zoomToBookmarkStr

deleteBookmarkIconStr

java.lang.String deleteBookmarkIconStr

zoomToLayerIconStr

java.lang.String zoomToLayerIconStr

closedOnStartup

protected boolean closedOnStartup

zoomButtonVisible

protected boolean zoomButtonVisible

selectableCheckVisible

protected boolean selectableCheckVisible

editableCheckVisible

protected boolean editableCheckVisible

res

java.util.ResourceBundle res

gisViewer

protected IGisViewer gisViewer

lbBgColor

protected java.awt.Color lbBgColor

layersTaskPanelIconPath

protected static final java.lang.String layersTaskPanelIconPath
See Also:
Constant Field Values

locationsTaskPanelIconPath

protected static final java.lang.String locationsTaskPanelIconPath
See Also:
Constant Field Values

collapseParamsStrArray

protected static java.lang.String[] collapseParamsStrArray

innerCompParamsStrArray

protected static java.lang.String[] innerCompParamsStrArray

panel

protected EmptyPanel panel

container

protected PanelsContainer container

layersTaskPane

protected InnerPanel layersTaskPane

locationsTaskPane

protected BookmarksInnerPanel locationsTaskPane

layersBox

protected LayersBox layersBox

bottomContainer

protected com.ontimize.gui.container.Row bottomContainer

contBgColor

protected java.awt.Color contBgColor

checkboxesPopUpItems

protected java.util.List<java.awt.Component> checkboxesPopUpItems

fm

java.awt.FontMetrics fm

firstTimePaint

protected boolean firstTimePaint

form

protected com.ontimize.gui.Form form

pContParams

protected java.util.Hashtable<java.lang.String,java.lang.Object> pContParams

innerCompParams

protected java.util.Hashtable<java.lang.String,java.lang.Object> innerCompParams

panelsBG

protected java.awt.Color panelsBG

panelsTitleBGStart

protected java.awt.Color panelsTitleBGStart

panelsTitleBGEnd

protected java.awt.Color panelsTitleBGEnd
Constructor Detail

AlternativeLayersPanel

public AlternativeLayersPanel(java.util.Hashtable parameters)
                       throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

setContainerBounds

public void setContainerBounds(java.awt.Rectangle bounds)

add

public void add(java.awt.Component comp,
                java.lang.Object constraints)
Overrides:
add in class java.awt.Container

initGui

protected void initGui()

getContainerBounds

public java.awt.Rectangle getContainerBounds()

getConstraints

public java.lang.Object getConstraints(java.awt.LayoutManager layoutManager)
Specified by:
getConstraints in interface com.ontimize.gui.field.FormComponent

init

public void init(java.util.Hashtable params)
          throws java.lang.Exception
Specified by:
init in interface com.ontimize.gui.field.FormComponent
Throws:
java.lang.Exception

checkContainerParam

protected void checkContainerParam(java.lang.String paramName,
                                   java.util.Hashtable params)

checkInnerParams

protected void checkInnerParams(java.lang.String paramName,
                                java.util.Hashtable params)

getTextsToTranslate

public java.util.Vector getTextsToTranslate()
Specified by:
getTextsToTranslate in interface com.ontimize.gui.i18n.Internationalization

setComponentLocale

public void setComponentLocale(java.util.Locale locale)
Specified by:
setComponentLocale in interface com.ontimize.gui.i18n.Internationalization

setResourceBundle

public void setResourceBundle(java.util.ResourceBundle res)
Specified by:
setResourceBundle in interface com.ontimize.gui.i18n.Internationalization

getAttribute

public java.lang.Object getAttribute()
Specified by:
getAttribute in interface com.ontimize.gui.field.IdentifiedElement

initPermissions

public void initPermissions()
Specified by:
initPermissions in interface com.ontimize.gui.SecureElement

isRestricted

public boolean isRestricted()
Specified by:
isRestricted in interface com.ontimize.gui.SecureElement

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface com.ontimize.gui.field.FormComponent
Overrides:
isEnabled in class java.awt.Component

setEnabled

public void setEnabled(boolean enabled)
Specified by:
setEnabled in interface com.ontimize.gui.field.FormComponent
Overrides:
setEnabled in class javax.swing.JComponent

setVisible

public void setVisible(boolean visible)
Description copied from interface: IGisClientComponent
Sets the component visible

Specified by:
setVisible in interface com.ontimize.gui.field.FormComponent
Specified by:
setVisible in interface IGisClientComponent
Overrides:
setVisible in class javax.swing.JComponent

paintComponent

protected void paintComponent(java.awt.Graphics g)
Overrides:
paintComponent in class javax.swing.JComponent

getComponentLimits

public java.awt.Rectangle getComponentLimits()
Description copied from interface: IGisClientComponent
Get the component drawing limits, since the component it's not painted on all the extension of the panel. This method is used principally in events management

Specified by:
getComponentLimits in interface IGisClientComponent
Returns:
component painting area

setGisViewer

public void setGisViewer(IGisViewer gisViewer)
Description copied from interface: IGisClientComponent
Set the gis viewer instance for the actual component

Specified by:
setGisViewer in interface IGisClientComponent
Parameters:
gisViewer - Gis viewer instanceof

setViewerToChildren

protected void setViewerToChildren(java.awt.Component comp)

initPreferredLocationsComponent

protected void initPreferredLocationsComponent()

addBookmark

public void addBookmark(BookmarkLocationComponent bookmark)

removeBookmark

public void removeBookmark(BookmarkLocationComponent bookmark)

layerChanged

public void layerChanged(LayerChangeEvent event)
Description copied from interface: LayerChangeListener
Invoked on gis layers description changes

Specified by:
layerChanged in interface LayerChangeListener
Parameters:
event - Gis viewer layer description change

setParentForm

public void setParentForm(com.ontimize.gui.Form parentForm)
Specified by:
setParentForm in interface com.ontimize.gui.field.AccessForm