com.intel.gpe.gridbeans.plugins.swing
Class SwingGridBeanPanel

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.intel.gpe.gridbeans.plugins.swing.SwingGridBeanPanel
All Implemented Interfaces:
IDataSet, IGridBeanPanel, ISwingGridBeanPanel, IConfigurable, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class SwingGridBeanPanel
extends javax.swing.JPanel
implements ISwingGridBeanPanel

The base class for panels in Swing GridBean plygins

Author:
Alexander Lukichev
See Also:
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.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
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
SwingGridBeanPanel(Client client, java.lang.String name)
          Deprecated. 
SwingGridBeanPanel(Client client, java.lang.String name, INode node)
           
 
Method Summary
 void addChild(IConfigurable child)
          Deprecated. 
 java.lang.String getCaption()
          Get the caption of the tab
 java.awt.Component getComponent()
          Get the component to plug into the tabbed pane.
 java.lang.String getDescription(javax.xml.namespace.QName key)
          Get the description of the component.
 boolean getEnabled(javax.xml.namespace.QName key)
          Get the state of the component.
 java.lang.String getName()
          Deprecated. 
 INode getNode()
          Deprecated. 
 java.lang.Object getValue(javax.xml.namespace.QName key)
          Get the translated value of the component.
 boolean isValid(javax.xml.namespace.QName key, java.lang.StringBuffer buf)
          Check if the value of the component is valid.
 java.util.Set<javax.xml.namespace.QName> keySet()
          Get the set of the component names.
 void linkButton(javax.xml.namespace.QName key, javax.swing.JButton button)
          Helper method to bind a button
 void linkCheckBox(javax.xml.namespace.QName key, javax.swing.JCheckBox checkBox)
          Helper method to bind a check box
 void linkComboBox(javax.xml.namespace.QName key, javax.swing.JComboBox comboBox)
          Helper method to bind a combo box
 void linkJobNameTextField(javax.xml.namespace.QName key, javax.swing.JTextField textField)
          Helper method to bind a text field containing the job identifier (name)
 void linkLabel(javax.xml.namespace.QName key, javax.swing.JLabel label)
          Helper method to bind a label
 void linkList(javax.xml.namespace.QName key, javax.swing.JList list)
          Helper method to bind a list
 void linkTextEditor(javax.xml.namespace.QName key, TextEditor editor)
          Helper method to bind a text editor
 void linkTextEditor(javax.xml.namespace.QName key, TextEditor editor)
          Deprecated. Use linkTextEditor(QName, com.intel.gui.controls2.configurable.TextEditor) instead
 void linkTextField(javax.xml.namespace.QName key, javax.swing.JTextField textField)
          Helper method to bind a text field
 void linkTextFieldWithLabel(javax.xml.namespace.QName key, javax.swing.JTextField textField, javax.swing.JLabel label)
          Helper method to bind a text field with a label
 void load(IGridBeanModel model, Client client)
          Load data set component values from the GridBean model and the client object.
 void load(IPreferences preferences)
          Load the settings
 void setDescription(javax.xml.namespace.QName key, java.lang.String descr)
          Set the description of the specified component
 void setEnabled(javax.xml.namespace.QName key, boolean enabled)
          Set the enabled state of the component
 void setPossibleValues(javax.xml.namespace.QName key, java.util.List values)
          Set the possible values for the specified component
 void setValue(javax.xml.namespace.QName key, java.lang.Object value)
          Set the value of the component.
 void setValueTranslator(javax.xml.namespace.QName key, IValueTranslator translator)
          Set the translator for the specified component
 void setValueValidator(javax.xml.namespace.QName key, IValueValidator validator)
          Set the validator for the specified component
 void store(IGridBeanModel model)
          Store the component values in the GridBean model.
 void store(IPreferences preferences)
          Store the settings
 void updateValues(Client client)
           
 void validate(ErrorSet errors)
          Validate the contents of the panel.
 
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, 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, 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, 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
 

Constructor Detail

SwingGridBeanPanel

@Deprecated
public SwingGridBeanPanel(Client client,
                                     java.lang.String name)
Deprecated. 


SwingGridBeanPanel

public SwingGridBeanPanel(Client client,
                          java.lang.String name,
                          INode node)
Method Detail

linkJobNameTextField

public void linkJobNameTextField(javax.xml.namespace.QName key,
                                 javax.swing.JTextField textField)
                          throws DataSetException
Helper method to bind a text field containing the job identifier (name)

Parameters:
key - The name of the control (usually "name")
textField - The text field
Throws:
DataSetException

linkList

public void linkList(javax.xml.namespace.QName key,
                     javax.swing.JList list)
Helper method to bind a list

Parameters:
key - The name of the control
list - The list

linkTextField

public void linkTextField(javax.xml.namespace.QName key,
                          javax.swing.JTextField textField)
Helper method to bind a text field

Parameters:
key - The name of the control
textField - The text field

linkLabel

public void linkLabel(javax.xml.namespace.QName key,
                      javax.swing.JLabel label)
               throws DataSetException
Helper method to bind a label

Parameters:
key - The name of the control
label - The label
Throws:
DataSetException

linkButton

public void linkButton(javax.xml.namespace.QName key,
                       javax.swing.JButton button)
                throws DataSetException
Helper method to bind a button

Parameters:
key - The name of the control
button - The button
Throws:
DataSetException

linkTextEditor

public void linkTextEditor(javax.xml.namespace.QName key,
                           TextEditor editor)
                    throws DataSetException
Helper method to bind a text editor

Parameters:
key - The name of the control
editor - The text editor
Throws:
DataSetException

linkTextEditor

public void linkTextEditor(javax.xml.namespace.QName key,
                           TextEditor editor)
Deprecated. Use linkTextEditor(QName, com.intel.gui.controls2.configurable.TextEditor) instead

Helper method to bind a text editor

Parameters:
key - The name of the control
editor - The text editor

linkCheckBox

public void linkCheckBox(javax.xml.namespace.QName key,
                         javax.swing.JCheckBox checkBox)
Helper method to bind a check box

Parameters:
key - The name of the control
checkBox - The checkbox

linkTextFieldWithLabel

public void linkTextFieldWithLabel(javax.xml.namespace.QName key,
                                   javax.swing.JTextField textField,
                                   javax.swing.JLabel label)
                            throws DataSetException
Helper method to bind a text field with a label

Parameters:
key - The name of the control group
textField - The text field
label - The label
Throws:
DataSetException

linkComboBox

public void linkComboBox(javax.xml.namespace.QName key,
                         javax.swing.JComboBox comboBox)
Helper method to bind a combo box

Parameters:
key - The name of the control
comboBox - The combo box

getName

@Deprecated
public java.lang.String getName()
Deprecated. 

Implements IGridBeanPanel.getName()

Specified by:
getName in interface IGridBeanPanel
Overrides:
getName in class java.awt.Component
Returns:
The name of the tab

getCaption

public java.lang.String getCaption()
Description copied from interface: IGridBeanPanel
Get the caption of the tab

Specified by:
getCaption in interface IGridBeanPanel
Returns:

getComponent

public java.awt.Component getComponent()
Description copied from interface: ISwingGridBeanPanel
Get the component to plug into the tabbed pane.

Specified by:
getComponent in interface ISwingGridBeanPanel
Returns:
The component to be plugged into the tabbed pane

load

public void load(IPreferences preferences)
Description copied from interface: IConfigurable
Load the settings

Specified by:
load in interface IConfigurable

store

public void store(IPreferences preferences)
Description copied from interface: IConfigurable
Store the settings

Specified by:
store in interface IConfigurable

addChild

@Deprecated
public void addChild(IConfigurable child)
Deprecated. 

Description copied from interface: IConfigurable
Add dependent component To be removed in version 1.5.

Specified by:
addChild in interface IConfigurable

getNode

@Deprecated
public INode getNode()
Deprecated. 

Description copied from interface: IConfigurable
Get the settings pointer of the components. To be removed in version 1.5.

Specified by:
getNode in interface IConfigurable
Returns:

validate

public void validate(ErrorSet errors)
Description copied from interface: IGridBeanPanel
Validate the contents of the panel.

Specified by:
validate in interface IGridBeanPanel
Parameters:
errors - The set of the encountered errors

getEnabled

public boolean getEnabled(javax.xml.namespace.QName key)
                   throws DataSetException
Description copied from interface: IDataSet
Get the state of the component.

Specified by:
getEnabled in interface IDataSet
Parameters:
key - The name of the component
Returns:
The enabled state of the component
Throws:
DataSetException

setEnabled

public void setEnabled(javax.xml.namespace.QName key,
                       boolean enabled)
                throws DataSetException
Description copied from interface: IDataSet
Set the enabled state of the component

Specified by:
setEnabled in interface IDataSet
Parameters:
key - The name of the component
enabled - The enabled state of the component
Throws:
DataSetException

keySet

public java.util.Set<javax.xml.namespace.QName> keySet()
Description copied from interface: IDataSet
Get the set of the component names.

Specified by:
keySet in interface IDataSet
Returns:
The set of the component names

getValue

public java.lang.Object getValue(javax.xml.namespace.QName key)
                          throws DataSetException,
                                 TranslationException
Description copied from interface: IDataSet
Get the translated value of the component.

Specified by:
getValue in interface IDataSet
Parameters:
key - The name of the component
Returns:
The translated value
Throws:
DataSetException
TranslationException - If translation failed

setValue

public void setValue(javax.xml.namespace.QName key,
                     java.lang.Object value)
              throws DataSetException,
                     TranslationException
Description copied from interface: IDataSet
Set the value of the component. The value is translated to the user's representation and then the GUI component is assigned with it.

Specified by:
setValue in interface IDataSet
Parameters:
key - The name of the component
value - The value
Throws:
DataSetException
TranslationException - If translation failed

setValueTranslator

public void setValueTranslator(javax.xml.namespace.QName key,
                               IValueTranslator translator)
                        throws DataSetException
Description copied from interface: IDataSet
Set the translator for the specified component

Specified by:
setValueTranslator in interface IDataSet
Parameters:
key - The name of the component
translator - The translator
Throws:
DataSetException

setValueValidator

public void setValueValidator(javax.xml.namespace.QName key,
                              IValueValidator validator)
                       throws DataSetException
Description copied from interface: IDataSet
Set the validator for the specified component

Specified by:
setValueValidator in interface IDataSet
Parameters:
key - The name of the component
validator - The validator
Throws:
DataSetException

setDescription

public void setDescription(javax.xml.namespace.QName key,
                           java.lang.String descr)
                    throws DataSetException
Description copied from interface: IDataSet
Set the description of the specified component

Specified by:
setDescription in interface IDataSet
Parameters:
key - The name of the component
descr - The description
Throws:
DataSetException

setPossibleValues

public void setPossibleValues(javax.xml.namespace.QName key,
                              java.util.List values)
                       throws DataSetException,
                              TranslationException
Description copied from interface: IDataSet
Set the possible values for the specified component

Specified by:
setPossibleValues in interface IDataSet
Parameters:
key - The name of the component
values - The list of the possible values
Throws:
DataSetException
TranslationException

load

public void load(IGridBeanModel model,
                 Client client)
          throws DataSetException,
                 TranslationException
Description copied from interface: IDataSet
Load data set component values from the GridBean model and the client object. Experimental code.

Specified by:
load in interface IDataSet
Parameters:
model - The GridBean model
client - The client
Throws:
DataSetException
TranslationException - If translation of any value failed

store

public void store(IGridBeanModel model)
           throws DataSetException,
                  TranslationException
Description copied from interface: IDataSet
Store the component values in the GridBean model.

Specified by:
store in interface IDataSet
Parameters:
model - The GridBean model
Throws:
DataSetException
TranslationException - If translation of any value failed

isValid

public boolean isValid(javax.xml.namespace.QName key,
                       java.lang.StringBuffer buf)
                throws DataSetException
Description copied from interface: IDataSet
Check if the value of the component is valid.

Specified by:
isValid in interface IDataSet
Parameters:
key - The name of the component
buf - The reason of the failure of validation check is appended here
Returns:
true if the value of the specified component is valid
Throws:
DataSetException

getDescription

public java.lang.String getDescription(javax.xml.namespace.QName key)
                                throws DataSetException
Description copied from interface: IDataSet
Get the description of the component.

Specified by:
getDescription in interface IDataSet
Parameters:
key - The name of the component
Returns:
The description of the specified component
Throws:
DataSetException

updateValues

public void updateValues(Client client)


Copyright © 2008. All Rights Reserved.