com.esri.arcgis.beans.ui
Class AbstractGeneralPanel

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.esri.arcgis.beans.ui.AbstractGeneralPanel
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
GlobeBeanGeneralPanel, MapBeanGeneralPanel, PageLayoutBeanGeneralPanel, SceneBeanGeneralPanel, SymbologyBeanGeneralPanel, TOCBeanGeneralPanel, ToolbarBeanGeneralPanel

public abstract class AbstractGeneralPanel
extends JPanel

This class defines a framework to create a general property UI used in in the Customizer of an ArcGIS object bean.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  JButton m_bntFileBrowser
           
protected  JCheckBox m_chkEnableArrowKey
           
protected  JCheckBox m_chkEnabled
           
protected  JCheckBox m_chkEnableOLEDropEvent
           
protected  JCheckBox m_chkShowMapTips
           
protected  JCheckBox m_chkShowScrollBars
           
protected  File m_currentDir
           
protected  JFileChooser m_fileChooser
           
protected  JTextField m_fldMapDocFilename
           
protected  JPanel m_leftStylePanel
           
protected  JPanel m_loadDocumentPanel
           
protected  PropertyChangeSupport m_propertyChangeSupport
           
protected  JPanel m_rightCheckboxPanel
           
protected  StyleComponent m_scAppearance
           
protected  StyleComponent m_scBorderStyle
           
protected  StyleComponent m_scMousePointer
           
protected  StyleComponent m_scTooltipStyle
           
protected  JPanel m_upBaseGeneralPanel
           
 
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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
AbstractGeneralPanel()
          Default constructor
 
Method Summary
protected  void addCheckBox(JCheckBox checkBox)
          Adds a CheckBox on the right side panel
protected  void addCheckBox(JCheckBox checkBox, int gap)
          Adds a CheckBox on the right side panel with a specificed gap
protected  void addGeneralComponent(JComponent comp, int gap)
          Adds an JComponent to the panel.
protected  void addLoadDocument(String label, int gap)
          The methods will adds a panel, it have called addGeneralComponent method.
protected  void addMapFileBrowser()
           
protected  void addStyleComponent(JComponent styleComp, int gap)
          Adds a StyleComponet to the panel on the left side with a specified gap.
protected  void addStyleComponent(StyleComponent styleComp)
          Adds a StyleComponet to the panel on the left side.
 int getAppearance()
          Gets the appearance style
 int getBorderStyle()
          Gets the border style
 String getDocumentFilename()
          Returns the document file name
 int getMousePointer()
          Returns the mouse pointer
 Dimension getPreferredSize()
          Gets the preferred size of this component.
 String getText()
          Returns name of the panel
 int getTipStyle()
          Returns the tip style
 boolean isEnableArrowKey()
          Return true if the arrow key is enabled, otherwise false
 boolean isEsriEnabled()
           
 boolean isOleDropEnabled()
          Return true if the OLE drop event enabled.
 boolean isShowMapTips()
          Return true if the map tips is shown, otherwise false
protected  void openFileBrowser()
           
 void setAppearance(int appearance)
          Sets appearance style
 void setBorderStyle(int style)
          Sets the border style
 void setDocumentFilename(String doc)
          Sets the document file name
 void setEnableArrowKey(boolean enabled)
          Sets arrow key ebabled/disenabled.
 void setEsriEnabled(boolean enabled)
           
 void setMousePointer(int pointer)
          Sets mouse pointer
 void setOleDropEnabled(boolean enabled)
          Sets the OLE drop event enabled/disable
 void setPropertyChangeSupport(PropertyChangeSupport pcs)
          Sets a reference to a shared PropertyChangeSupport object.
 void setShowMapTips(boolean enabled)
          Sets if showing the map tips.
 void setTipStyle(int style)
          Sets the tip style.
protected abstract  void updateAppearance()
          Updates the apppearance style.
protected abstract  void updateBorderStyle()
          Updates the border style.
protected  void updateDocumentFilename()
          The method is called when the document text field is changed.
protected  void updateEsriEnable()
          The method is called when mouse pointer combox is changed.
protected  void updateKeyIntercept()
          The method is called when key intercept combox is changed.
protected  void updateMousePointer()
          The method is called when mouse pointer combox is changed.
protected  void updateTipStyle()
          The method is called when tip style combox is changed.
 
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, 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, paintComponent, 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, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, 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, 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
 

Field Detail

m_propertyChangeSupport

protected PropertyChangeSupport m_propertyChangeSupport

m_fileChooser

protected JFileChooser m_fileChooser

m_currentDir

protected File m_currentDir

m_upBaseGeneralPanel

protected JPanel m_upBaseGeneralPanel

m_leftStylePanel

protected JPanel m_leftStylePanel

m_rightCheckboxPanel

protected JPanel m_rightCheckboxPanel

m_scBorderStyle

protected StyleComponent m_scBorderStyle

m_scAppearance

protected StyleComponent m_scAppearance

m_scMousePointer

protected StyleComponent m_scMousePointer

m_scTooltipStyle

protected StyleComponent m_scTooltipStyle

m_chkEnabled

protected JCheckBox m_chkEnabled

m_chkEnableOLEDropEvent

protected JCheckBox m_chkEnableOLEDropEvent

m_chkEnableArrowKey

protected JCheckBox m_chkEnableArrowKey

m_chkShowMapTips

protected JCheckBox m_chkShowMapTips

m_chkShowScrollBars

protected JCheckBox m_chkShowScrollBars

m_loadDocumentPanel

protected JPanel m_loadDocumentPanel

m_fldMapDocFilename

protected JTextField m_fldMapDocFilename

m_bntFileBrowser

protected JButton m_bntFileBrowser
Constructor Detail

AbstractGeneralPanel

public AbstractGeneralPanel()
Default constructor

Method Detail

setPropertyChangeSupport

public void setPropertyChangeSupport(PropertyChangeSupport pcs)
Sets a reference to a shared PropertyChangeSupport object.

Parameters:
pcs - PropertyChangeSupport

setBorderStyle

public void setBorderStyle(int style)
Sets the border style

Parameters:
style - int an enumerative integer

getBorderStyle

public int getBorderStyle()
Gets the border style

Returns:
int an enumerative integer

setAppearance

public void setAppearance(int appearance)
Sets appearance style

Parameters:
appearance - int an enumerative integer

getAppearance

public int getAppearance()
Gets the appearance style

Returns:
int an enumerative integer

setMousePointer

public void setMousePointer(int pointer)
Sets mouse pointer

Parameters:
pointer - int - an enumerative integer

getMousePointer

public int getMousePointer()
Returns the mouse pointer

Returns:
int - an enumerative integer

setTipStyle

public void setTipStyle(int style)
Sets the tip style.

Parameters:
style - int - an enumerative integer

getTipStyle

public int getTipStyle()
Returns the tip style

Returns:
int - an enumerative integer

setEsriEnabled

public void setEsriEnabled(boolean enabled)
Parameters:
enabled - boolean

isEsriEnabled

public boolean isEsriEnabled()
Returns:
boolean

setOleDropEnabled

public void setOleDropEnabled(boolean enabled)
Sets the OLE drop event enabled/disable

Parameters:
enabled - boolean true/false

isOleDropEnabled

public boolean isOleDropEnabled()
Return true if the OLE drop event enabled.

Returns:
boolean - true/false

setEnableArrowKey

public void setEnableArrowKey(boolean enabled)
Sets arrow key ebabled/disenabled.

Parameters:
enabled - boolean

isEnableArrowKey

public boolean isEnableArrowKey()
Return true if the arrow key is enabled, otherwise false

Returns:
boolean - true/false

setShowMapTips

public void setShowMapTips(boolean enabled)
Sets if showing the map tips.

Parameters:
enabled - boolean - true/false

isShowMapTips

public boolean isShowMapTips()
Return true if the map tips is shown, otherwise false

Returns:
boolean - true/false

setDocumentFilename

public void setDocumentFilename(String doc)
Sets the document file name

Parameters:
doc - String - absolute file name path

getDocumentFilename

public String getDocumentFilename()
Returns the document file name

Returns:
String - the absolute file name path

getText

public String getText()
Returns name of the panel

Returns:
String a String object

getPreferredSize

public Dimension getPreferredSize()
Gets the preferred size of this component.

Overrides:
getPreferredSize in class JComponent
Returns:
Dimension

addStyleComponent

protected void addStyleComponent(StyleComponent styleComp)
Adds a StyleComponet to the panel on the left side.

Parameters:
styleComp - StyleComponent, default gap is 10.

addStyleComponent

protected void addStyleComponent(JComponent styleComp,
                                 int gap)
Adds a StyleComponet to the panel on the left side with a specified gap.

Parameters:
styleComp - StyleComponent a StyleComponent
gap - int an integer

addCheckBox

protected void addCheckBox(JCheckBox checkBox)
Adds a CheckBox on the right side panel

Parameters:
checkBox - JCheckBox a JCheckBox, default gap is 0

addCheckBox

protected void addCheckBox(JCheckBox checkBox,
                           int gap)
Adds a CheckBox on the right side panel with a specificed gap

Parameters:
checkBox - JCheckBox a JCheckbox
gap - int an integer

addGeneralComponent

protected void addGeneralComponent(JComponent comp,
                                   int gap)
Adds an JComponent to the panel. The component will be placed along the Y-AXIS direction.

Parameters:
comp - JComponent a JComponent
gap - int an integer

addLoadDocument

protected void addLoadDocument(String label,
                               int gap)
The methods will adds a panel, it have called addGeneralComponent method. The panel is composed of : ----------------------------------------------------------------- | JLabel : | | [ JTextField ] [JButton] | | | -----------------------------------------------------------------

Parameters:
label - String a String for label
gap - - an integer to specify the gap to the next component.

addMapFileBrowser

protected void addMapFileBrowser()

openFileBrowser

protected void openFileBrowser()

updateBorderStyle

protected abstract void updateBorderStyle()
Updates the border style. Subclass will supply the necessary implementation if its bean has border style.


updateAppearance

protected abstract void updateAppearance()
Updates the apppearance style. Subclass will supply the necessary implementation if its bean has idfferent appearance style.


updateMousePointer

protected void updateMousePointer()
The method is called when mouse pointer combox is changed. Overrides the methdod in the subclass if necessary.


updateTipStyle

protected void updateTipStyle()
The method is called when tip style combox is changed. Overrides the methdod in the subclass if necessary.


updateEsriEnable

protected void updateEsriEnable()
The method is called when mouse pointer combox is changed. Overrides the methdod in the subclass if necessary.


updateKeyIntercept

protected void updateKeyIntercept()
The method is called when key intercept combox is changed. Overrides the methdod in the subclass if necessary.


updateDocumentFilename

protected void updateDocumentFilename()
The method is called when the document text field is changed. Overrides the methdo in the subclass if necessary.