org.sape.carbon.services.console
Class AttributePanel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--org.sape.carbon.services.console.AttributePanel
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable

public class AttributePanel
extends JPanel

This class represents one actionable attribute on an MBean. It provides a view into its metadata and a mechanism for altering the attribute value.

Copyright 2002 Sapient

Since:
carbon 1.0
Version:
$Revision: 1.6 $($Author: atayal $ / $Date: 2003/04/29 13:40:31 $)
Author:
Greg Hinkle, March 2002
See Also:
Serialized Form

Field Summary
private  javax.management.MBeanAttributeInfo attributeInfo
           
private  Throwable currentError
           
private  JTextArea descriptionValue
           
private  boolean dirty
           
private  JPanel editingPanel
           
private  AttributeCellEditor editor
           
private static Set GRAPH_TYPES
           
private  JButton graphButton
           
private  JPanel graphingPanel
           
private  JPanel infoPanel
           
 org.apache.commons.logging.Log log
           
private  javax.management.ObjectName objectName
           
private  javax.management.MBeanServer server
           
private  JCheckBox shouldGraphCheckbox
           
private  JLabel typeLabel
           
private static Map TYPES
           
private  JLabel typeValue
           
private  JLabel valueLabel
           
 
Fields inherited from class javax.swing.JPanel
 
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.Container
 
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
AttributePanel(javax.management.ObjectName objectName, javax.management.MBeanAttributeInfo attributeInfo, javax.management.MBeanServer server)
           
 
Method Summary
private static Class findType(String className)
           
 javax.management.MBeanAttributeInfo getAttributeInfo()
           
 String getFieldValue()
           
 String getTypeName(Class typeClass)
           
private  void graphButtonActionPerformed(ActionEvent evt)
           
private  void initComponents()
          This method is called from within the constructor to initialize the form.
 boolean isShouldGraph()
           
 void refresh()
           
private  void setValueButtonActionPerformed(ActionEvent evt)
           
private  void shouldGraphCheckboxActionPerformed(ActionEvent evt)
           
private  void updateInfoStatus()
           
 void valueTextFieldPropertyChange(PropertyChangeEvent evt)
           
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, 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, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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

log

public org.apache.commons.logging.Log log

objectName

private javax.management.ObjectName objectName

attributeInfo

private javax.management.MBeanAttributeInfo attributeInfo

server

private javax.management.MBeanServer server

dirty

private boolean dirty

currentError

private Throwable currentError

editor

private AttributeCellEditor editor

GRAPH_TYPES

private static final Set GRAPH_TYPES

TYPES

private static final Map TYPES

shouldGraphCheckbox

private JCheckBox shouldGraphCheckbox

infoPanel

private JPanel infoPanel

graphButton

private JButton graphButton

typeLabel

private JLabel typeLabel

typeValue

private JLabel typeValue

descriptionValue

private JTextArea descriptionValue

graphingPanel

private JPanel graphingPanel

editingPanel

private JPanel editingPanel

valueLabel

private JLabel valueLabel
Constructor Detail

AttributePanel

public AttributePanel(javax.management.ObjectName objectName,
                      javax.management.MBeanAttributeInfo attributeInfo,
                      javax.management.MBeanServer server)
Method Detail

refresh

public void refresh()

getTypeName

public String getTypeName(Class typeClass)

findType

private static Class findType(String className)
                       throws ClassNotFoundException
ClassNotFoundException

getAttributeInfo

public javax.management.MBeanAttributeInfo getAttributeInfo()

getFieldValue

public String getFieldValue()

isShouldGraph

public boolean isShouldGraph()

updateInfoStatus

private void updateInfoStatus()

initComponents

private void initComponents()
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.


setValueButtonActionPerformed

private void setValueButtonActionPerformed(ActionEvent evt)

valueTextFieldPropertyChange

public void valueTextFieldPropertyChange(PropertyChangeEvent evt)

shouldGraphCheckboxActionPerformed

private void shouldGraphCheckboxActionPerformed(ActionEvent evt)

graphButtonActionPerformed

private void graphButtonActionPerformed(ActionEvent evt)


Copyright 1999-2003 Sapient Corporation. All Rights Reserved.