|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.AbstractButton
javax.swing.JToggleButton
com.ontimize.util.gis.client.gui.panels.components.BasicToolbarButton
public class BasicToolbarButton
Gis client component used to add new buttons to the basic gis toolbar.
The xml configuration for this component is equal to the Ontimize form buttons.
Example code to add new buttons to the basic gis toolbar:
<com.ontimize.util.gis.client.gui.panels.BasicToolbar
attr="windPointsToolbar" edition="no">
<com.ontimize.util.gis.client.gui.panels.components.BasicToolbarButton
attr="buttonA" text="SelectArea"
icon="com/ontimize/gui/images/select.png" />
<com.ontimize.util.gis.client.gui.panels.components.BasicToolbarButton
attr="buttonB" text="ApplyFilter"
icon="com/ontimize/gui/images/filter.png" />
</com.ontimize.util.gis.client.gui.panels.BasicToolbar>
<com.ontimize.util.gis.client.gui.panels.components.BasicToolbarButton
attr="buttonC" text="ShowLegend"
icon="com/ontimize/util/gis/client/gui/images/legends.png"
actionClass="com.ontimize.util.gis.client.gui.panels.actions.ShowLegendAction"
stateChangeListener="com.ontimize.util.gis.client.gui.panels.components.DisableOnEditionListener" />
To get the reference of this buttons from the form interaction manager use the following code:
protected BasicToolbarButton buttonA = null;
...
Object obj = managedForm.getDataFieldReference("buttonA");
if (obj != null && obj instanceof BasicToolbarButton) {
buttonA = ((BasicToolbarButton) obj);
}
Button,
StateChangeEvent,
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JToggleButton |
|---|
javax.swing.JToggleButton.AccessibleJToggleButton, javax.swing.JToggleButton.ToggleButtonModel |
| Nested classes/interfaces inherited from class javax.swing.AbstractButton |
|---|
javax.swing.AbstractButton.AccessibleAbstractButton, javax.swing.AbstractButton.ButtonChangeListener |
| 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 | |
|---|---|
protected java.lang.String |
actionClassPath
|
protected java.lang.Object |
attribute
|
protected boolean |
enabled
The condition to indicate when field is active. |
protected IGisViewer |
gisViewer
|
protected java.lang.String |
iconPath
|
protected boolean |
isEnabled
|
protected boolean |
modifiable
|
static java.lang.String |
PARAM_ACTION_CLASS
|
static java.lang.String |
PARAM_ATTR
|
static java.lang.String |
PARAM_ICON
|
static java.lang.String |
PARAM_STATE_CHANGE_LISTENER
|
static java.lang.String |
PARAM_TEXT
|
static java.lang.String |
PARAM_TIP
|
protected com.ontimize.gui.Form |
parentForm
The reference to parent form. |
protected com.ontimize.security.FormPermission |
permissionActivate
The reference to activate permission. |
protected com.ontimize.security.FormPermission |
permissionVisible
The reference to visible permission in form. |
protected boolean |
required
|
protected boolean |
restricted
The restricted condition. |
protected StateChangeListener |
stateListener
|
protected java.lang.String |
stateListenerClass
|
protected java.lang.String |
tipText
|
protected java.lang.String |
titleText
|
protected java.lang.Object |
value
|
| Fields inherited from class javax.swing.AbstractButton |
|---|
actionListener, BORDER_PAINTED_CHANGED_PROPERTY, changeEvent, changeListener, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, itemListener, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, model, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY |
| 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 javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
BasicToolbarButton()
|
|
BasicToolbarButton(java.util.Hashtable<java.lang.String,java.lang.Object> parameters)
|
|
BasicToolbarButton(java.lang.String title)
|
|
| Method Summary | |
|---|---|
protected boolean |
checkEnabledPermission()
Check enabled permission. |
protected boolean |
checkVisiblePermission()
Return the visible permission condition. |
void |
enableButton(boolean b)
|
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)
|
IGisViewer |
getGisViewer()
|
java.util.Vector |
getTextsToTranslate()
|
void |
init(java.util.Hashtable params)
|
void |
initPermissions()
|
boolean |
isRestricted()
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
setAttribute(java.lang.Object attribute)
|
void |
setComponentLocale(java.util.Locale locale)
|
void |
setEnabled(boolean enabled)
|
void |
setGisViewer(IGisViewer gisViewer)
Set the gis viewer instance for the actual component |
void |
setParentForm(com.ontimize.gui.Form form)
|
void |
setResourceBundle(java.util.ResourceBundle bundle)
|
void |
setStateChangeListener(StateChangeListener stateListener)
|
void |
setVisible(boolean visible)
Sets the component visible |
void |
stateChanged(StateChangeEvent event)
Invoked when the gis viewer state changes |
void |
updateUI()
|
| Methods inherited from class javax.swing.JToggleButton |
|---|
getAccessibleContext, getUIClassID, paramString |
| Methods inherited from class javax.swing.AbstractButton |
|---|
actionPropertyChanged, addActionListener, addChangeListener, addImpl, addItemListener, checkHorizontalKey, checkVerticalKey, configurePropertiesFromAction, createActionListener, createActionPropertyChangeListener, createChangeListener, createItemListener, doClick, doClick, fireActionPerformed, fireItemStateChanged, fireStateChanged, getAction, getActionCommand, getActionListeners, getChangeListeners, getDisabledIcon, getDisabledSelectedIcon, getDisplayedMnemonicIndex, getHideActionText, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getItemListeners, getLabel, getMargin, getMnemonic, getModel, getMultiClickThreshhold, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, init, isBorderPainted, isContentAreaFilled, isFocusPainted, isRolloverEnabled, isSelected, paintBorder, removeActionListener, removeChangeListener, removeItemListener, removeNotify, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setDisplayedMnemonicIndex, setFocusPainted, setHideActionText, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabel, setLayout, setMargin, setMnemonic, setMnemonic, setModel, setMultiClickThreshhold, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setUI, setVerticalAlignment, setVerticalTextPosition |
| 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, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, 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, add, addContainerListener, 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, 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, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, 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 |
| Methods inherited from interface com.ontimize.gui.field.FormComponent |
|---|
isEnabled |
| Field Detail |
|---|
public static final java.lang.String PARAM_ATTR
public static final java.lang.String PARAM_TEXT
public static final java.lang.String PARAM_ICON
public static final java.lang.String PARAM_TIP
public static final java.lang.String PARAM_ACTION_CLASS
public static final java.lang.String PARAM_STATE_CHANGE_LISTENER
protected IGisViewer gisViewer
protected StateChangeListener stateListener
protected java.lang.Object attribute
protected java.lang.String titleText
protected java.lang.String iconPath
protected java.lang.String actionClassPath
protected java.lang.String stateListenerClass
protected java.lang.String tipText
protected boolean required
protected boolean modifiable
protected java.lang.Object value
protected com.ontimize.security.FormPermission permissionVisible
protected com.ontimize.security.FormPermission permissionActivate
protected com.ontimize.gui.Form parentForm
protected boolean restricted
protected boolean enabled
protected boolean isEnabled
| Constructor Detail |
|---|
public BasicToolbarButton()
public BasicToolbarButton(java.util.Hashtable<java.lang.String,java.lang.Object> parameters)
throws java.lang.Exception
java.lang.Exceptionpublic BasicToolbarButton(java.lang.String title)
| Method Detail |
|---|
public void mouseEntered(java.awt.event.MouseEvent e)
public void mouseExited(java.awt.event.MouseEvent e)
public void updateUI()
updateUI in class javax.swing.JToggleButtonpublic void stateChanged(StateChangeEvent event)
StateChangeListener
stateChanged in interface StateChangeListenerevent - Gis viewer state change event containing the actual and
the previous gis viewer statespublic void setGisViewer(IGisViewer gisViewer)
IGisClientComponent
setGisViewer in interface IGisClientComponentgisViewer - Gis viewer instanceofpublic IGisViewer getGisViewer()
public java.lang.Object getConstraints(java.awt.LayoutManager layoutManager)
getConstraints in interface com.ontimize.gui.field.FormComponentpublic java.util.Vector getTextsToTranslate()
getTextsToTranslate in interface com.ontimize.gui.i18n.Internationalizationpublic void setComponentLocale(java.util.Locale locale)
setComponentLocale in interface com.ontimize.gui.i18n.Internationalizationpublic void setResourceBundle(java.util.ResourceBundle bundle)
setResourceBundle in interface com.ontimize.gui.i18n.Internationalization
public void init(java.util.Hashtable params)
throws java.lang.Exception
init in interface com.ontimize.gui.field.FormComponentjava.lang.Exceptionpublic void setAttribute(java.lang.Object attribute)
public java.lang.Object getAttribute()
getAttribute in interface com.ontimize.gui.field.IdentifiedElementpublic void initPermissions()
initPermissions in interface com.ontimize.gui.SecureElementprotected boolean checkVisiblePermission()
protected boolean checkEnabledPermission()
public boolean isRestricted()
isRestricted in interface com.ontimize.gui.SecureElementpublic void enableButton(boolean b)
public void setStateChangeListener(StateChangeListener stateListener)
public void setVisible(boolean visible)
IGisClientComponent
setVisible in interface com.ontimize.gui.field.FormComponentsetVisible in interface IGisClientComponentsetVisible in class javax.swing.JComponentpublic void setEnabled(boolean enabled)
setEnabled in interface com.ontimize.gui.field.FormComponentsetEnabled in class javax.swing.AbstractButtonpublic java.awt.Rectangle getComponentLimits()
IGisClientComponent
getComponentLimits in interface IGisClientComponentpublic void setParentForm(com.ontimize.gui.Form form)
setParentForm in interface com.ontimize.gui.field.AccessForm
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||