org.jpop.gui
Class ItemValue

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended byorg.jpop.gui.ItemValue
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public abstract class ItemValue
extends javax.swing.JPanel

Makes the appropriate chooser for the item selected

Version:
1.0
Author:
dsm
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static int ARRAY_TYPE
          The different types of control that can be created with this object
static int BOOL_TYPE
          The different types of control that can be created with this object
static int COLOR_TYPE
          The different types of control that can be created with this object
static int DIRECTORY_TYPE
          The different types of control that can be created with this object
static int FILE_TYPE
          The different types of control that can be created with this object
static int ICON_TYPE
          The different types of control that can be created with this object
static java.lang.String IMG_CLASSPATH
          The path to the img/ directory
static int INT_TYPE
          The different types of control that can be created with this object
static int MULTILINE_TYPE
          The different types of control that can be created with this object
static int POINT_TYPE
          The different types of control that can be created with this object
static int SELECT_TYPE
          The different types of control that can be created with this object
static int SIZE_TYPE
          The different types of control that can be created with this object
static int STRING_TYPE
          The different types of control that can be created with this object
 
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
ItemValue(int fieldType, java.lang.String name, java.lang.Object value)
          Constructor for ItemValue
 
Method Summary
 java.lang.String getCurrentImage()
          Gets the current image attribute of the ItemValue object
 java.lang.String getValue()
          Gets the value attribute of the ItemValue object
static void main(java.lang.String[] args)
          The main program for the ItemValue class
 void multilineEditorCancel()
          When Cancel is pressed in the multiline editor
 void multilineEditorOK()
          When OK is pressed in the multiline editor
 void selectNextimage()
          When in Icon mode this allows the next image to be selected,
 void selectPreviousImg()
          When in Icon mode this allows the previous image to be selected,
 void selectValChanged()
           
 void setSelectVal(java.lang.Object value)
           
 void setValue(java.lang.Object o)
          Sets the value attribute of the ItemValue object
 void showColorChooser()
          Shows the color chooser dialog
 java.io.File showFileDialog()
          Displays the choose file dialog
 void showMultilineEditor()
          Shows the multiline editor dialog
abstract  void valueChanged()
          This gets fired when the value of the field changes
 
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

IMG_CLASSPATH

public static final java.lang.String IMG_CLASSPATH
The path to the img/ directory

See Also:
Constant Field Values

STRING_TYPE

public static final int STRING_TYPE
The different types of control that can be created with this object

See Also:
Constant Field Values

BOOL_TYPE

public static final int BOOL_TYPE
The different types of control that can be created with this object

See Also:
Constant Field Values

INT_TYPE

public static final int INT_TYPE
The different types of control that can be created with this object

See Also:
Constant Field Values

COLOR_TYPE

public static final int COLOR_TYPE
The different types of control that can be created with this object

See Also:
Constant Field Values

SIZE_TYPE

public static final int SIZE_TYPE
The different types of control that can be created with this object

See Also:
Constant Field Values

FILE_TYPE

public static final int FILE_TYPE
The different types of control that can be created with this object

See Also:
Constant Field Values

POINT_TYPE

public static final int POINT_TYPE
The different types of control that can be created with this object

See Also:
Constant Field Values

ICON_TYPE

public static final int ICON_TYPE
The different types of control that can be created with this object

See Also:
Constant Field Values

MULTILINE_TYPE

public static final int MULTILINE_TYPE
The different types of control that can be created with this object

See Also:
Constant Field Values

ARRAY_TYPE

public static final int ARRAY_TYPE
The different types of control that can be created with this object

See Also:
Constant Field Values

DIRECTORY_TYPE

public static final int DIRECTORY_TYPE
The different types of control that can be created with this object

See Also:
Constant Field Values

SELECT_TYPE

public static final int SELECT_TYPE
The different types of control that can be created with this object

See Also:
Constant Field Values
Constructor Detail

ItemValue

public ItemValue(int fieldType,
                 java.lang.String name,
                 java.lang.Object value)
Constructor for ItemValue

Parameters:
fieldType - The type of filed this Item is. Any one of: STRING_TYPE, BOOL_TYPE, INT_TYPE, COLOR_TYPE, SIZE_TYPE , FILE_TYPE, POINT_TYPE
name - The name of the item. Will be used in anything that needs a string, for example the check boxes for Bool values. can't be null
value - the intial value of the filed
Method Detail

main

public static void main(java.lang.String[] args)
The main program for the ItemValue class

Parameters:
args - The command line arguments

selectValChanged

public void selectValChanged()

setValue

public void setValue(java.lang.Object o)
Sets the value attribute of the ItemValue object

Parameters:
o - The new value

getCurrentImage

public java.lang.String getCurrentImage()
Gets the current image attribute of the ItemValue object

Returns:
The currentImage value

getValue

public java.lang.String getValue()
Gets the value attribute of the ItemValue object

Returns:
The value value

valueChanged

public abstract void valueChanged()
This gets fired when the value of the field changes


multilineEditorCancel

public void multilineEditorCancel()
When Cancel is pressed in the multiline editor


setSelectVal

public void setSelectVal(java.lang.Object value)

multilineEditorOK

public void multilineEditorOK()
When OK is pressed in the multiline editor


selectNextimage

public void selectNextimage()
When in Icon mode this allows the next image to be selected,


selectPreviousImg

public void selectPreviousImg()
When in Icon mode this allows the previous image to be selected,


showColorChooser

public void showColorChooser()
Shows the color chooser dialog


showFileDialog

public java.io.File showFileDialog()
Displays the choose file dialog

Returns:
the file selected

showMultilineEditor

public void showMultilineEditor()
Shows the multiline editor dialog