|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--com.klg.jclass.util.swing.AbstractSpinBox
|
+--com.klg.jclass.field.JCSpinField
A spin field allows the user to spin through a range of values. The range
of values shown in the spin field is determined by one of two mechanisms.
The upper and lower limits on the range can be determined by predefining
min and max values. The intermediate values are controlled by the
increment property. A pick list offers all the possible values that the spin
field can contain. This has precedence over the increment method.
Only one value at a time is shown in the spin field. Up and down arrow
buttons are used to change the value by “spinning.” The spin field has
access to the same validator functions as the text field.
| Nested Class Summary |
| Nested classes inherited from class com.klg.jclass.util.swing.AbstractSpinBox |
AbstractSpinBox.ArrowButton, AbstractSpinBox.MetalArrowButton, AbstractSpinBox.MetalBorder |
| Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
protected com.klg.jclass.field.Field |
field
|
protected boolean |
required
|
protected JTextField |
text
|
static String |
version
Contains the version number of the JClass product. |
| Fields inherited from class com.klg.jclass.util.swing.AbstractSpinBox |
arrowKeySpinningAllowed, buttonTimer, continuousScroll, currentButton, DECREMENT, downArrow, editable, editor, editorIsValidateRoot, INCREMENT, l, metalBorder, minimumHeight, NONE, renderer, renderPanel, rl, upArrow, userFont, valueListeners, valueModel |
| 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.klg.jclass.field.JCFieldComponent |
INVALID, UNDEREDIT, VALID |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
JCSpinField()
Constructs a JCSpinField. |
|
JCSpinField(Class c)
Constructs an empty JCSpinField, which expects an object of the
specified class. |
|
JCSpinField(Class c,
com.klg.jclass.field.validate.JCValidator v)
Constructs an empty JCSpinField, which expects an object of the
specified class (which uses the specified validator). |
|
JCSpinField(com.klg.jclass.util.value.JCValueModel m)
Constructs an empty JCSpinField, which uses the specified value model
to contain its value. |
|
JCSpinField(com.klg.jclass.util.value.JCValueModel m,
com.klg.jclass.field.validate.JCValidator v)
Constructs an empty JCSpinField, which uses the specified value model
to contain its value and which uses the specified validator. |
|
| Method Summary | |
void |
addNotify()
Initializes the field object. |
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list. |
void |
addValueListener(com.klg.jclass.util.value.JCValueListener listener)
Adds a listener for changes to the value. |
protected void |
checkArrowButtons()
Abstract method that check if arrows should be enabled or disabled. |
void |
commitEdit()
Commits the current field under edit. |
protected void |
createField(com.klg.jclass.field.validate.JCValidator validator)
|
protected Object |
doSpin(boolean spin_up)
Performs spinning given the direction. |
String |
getAbout()
Gets the value of the About property. |
com.klg.jclass.field.DataProperties |
getDataProperties()
Gets the Bean property which wraps the validator, data model, and Field
objects properties into one property. |
com.klg.jclass.field.JCInvalidInfo |
getInvalidInfo()
Returns the Invalid properties. |
boolean |
getSelectOnEnter()
Returns a flag indicating the selection status on entering the field. |
int |
getState()
Returns the state of the component: VALID, INVALID, or UNDER_EDIT. |
com.klg.jclass.field.validate.JCValidator |
getValidator()
Returns the validator currently in use. |
Object |
getValue()
Returns the value for the text field. |
com.klg.jclass.util.value.JCValueModel |
getValueModel()
Returns the data model being used by the field. |
boolean |
isRequired()
Returns true if the field is required. |
protected int |
preferredHeightOfView()
Returns the text field's preferred height. |
protected void |
processFocusLost(FocusEvent e)
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. |
void |
removeValueListener(com.klg.jclass.util.value.JCValueListener listener)
Removes a listener for changes to the value. |
void |
setAbout(String s)
Sets the value of the About property. |
void |
setBackground(Color background)
Sets the background of the spin field. |
void |
setDataProperties(com.klg.jclass.field.DataProperties dp)
Sets the Bean property which wraps the validator, data model, and Field
objects properties into one property. |
void |
setEditable(boolean aFlag)
Determines whether the JCSpinBox field is editable. |
void |
setForeground(Color foreground)
Sets the foreground of the spin field. |
void |
setInvalidInfo(com.klg.jclass.field.JCInvalidInfo info)
Sets the Invalid properties. |
void |
setLocale(Locale l)
Sets the locale being used by the spin field; sets it on the validator as well. |
void |
setRequired(boolean required)
Sets the required property for the current field. |
void |
setSelectOnEnter(boolean select)
Sets a flag to determines whether or the value in the field is selected when the component gains focus. |
void |
setValidator(com.klg.jclass.field.validate.JCValidator v)
Sets the validator to use. |
void |
setValue(Object value)
Sets the value for the text field. |
void |
setValueModel(com.klg.jclass.util.value.JCValueModel model)
Sets the data model being used by the field. |
protected Object |
spinDown()
Returns the new value generated when spinning down a notch. |
protected Object |
spinUp()
Returns the new value generated when spinning up a notch. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected com.klg.jclass.field.Field field
protected JTextField text
protected boolean required
public static final String version
| Constructor Detail |
public JCSpinField()
JCSpinField.
public JCSpinField(Class c)
JCSpinField, which expects an object of the
specified class.
c -
public JCSpinField(Class c,
com.klg.jclass.field.validate.JCValidator v)
JCSpinField, which expects an object of the
specified class (which uses the specified validator).
c - v - public JCSpinField(com.klg.jclass.util.value.JCValueModel m)
JCSpinField, which uses the specified value model
to contain its value.
m -
public JCSpinField(com.klg.jclass.util.value.JCValueModel m,
com.klg.jclass.field.validate.JCValidator v)
JCSpinField, which uses the specified value model
to contain its value and which uses the specified validator.
m - v - | Method Detail |
public com.klg.jclass.field.DataProperties getDataProperties()
Field
objects properties into one property.
getDataProperties in interface JCFieldComponentJCValidator,
JCValueModel,
JCInvalidInfopublic void setDataProperties(com.klg.jclass.field.DataProperties dp)
Field
objects properties into one property.
setDataProperties in interface JCFieldComponentdp - JCValidator,
JCValueModel,
JCInvalidInfopublic void addPropertyChangeListener(PropertyChangeListener listener)
PropertyChangeListener to the listener list.
addPropertyChangeListener in class JComponentlistener - the PropertyChangeListener to be addedpublic void removePropertyChangeListener(PropertyChangeListener listener)
PropertyChangeListener from the listener list.
This removes a PropertyChangeListener that was registered
for all properties.
removePropertyChangeListener in class JComponentlistener - the PropertyChangeListener to be removedpublic void addValueListener(com.klg.jclass.util.value.JCValueListener listener)
addValueListener in interface JCFieldComponentaddValueListener in class AbstractSpinBoxlistener - public void removeValueListener(com.klg.jclass.util.value.JCValueListener listener)
removeValueListener in interface JCFieldComponentremoveValueListener in class AbstractSpinBoxlistener - protected void createField(com.klg.jclass.field.validate.JCValidator validator)
public String getAbout()
About property.
The About property displays contact information for
Quest Software in the Bean box.
public void setAbout(String s)
About property.
The About property displays contact information for
Quest Software in the Bean box.
s - protected int preferredHeightOfView()
preferredHeightOfView in class AbstractSpinBoxpublic void setEditable(boolean aFlag)
JCSpinBox field is editable. An editable JCSpinBox
allows the user to type into the field or select an item from the list
to initialize the field, after which it can be edited. (The editing affects
only the field, the list item remains intact.) A non editable JCSpinBox
displays the selected item in the field, but the selection cannot be
modified.
setEditable in class AbstractSpinBoxaFlag - a boolean value, where true indicates that the field is editablepublic void addNotify()
addNotify in class JComponentpublic void setBackground(Color background)
setBackground in class AbstractSpinBoxbackground - public void setForeground(Color foreground)
setForeground in class AbstractSpinBoxforeground - protected void checkArrowButtons()
AbstractSpinBox
checkArrowButtons in class AbstractSpinBoxAbstractSpinBox.setArrowEnabled(javax.swing.JButton, boolean)protected Object doSpin(boolean spin_up)
spin_up - true means to spin up and false means to spin down
protected Object spinUp()
spinUp in class AbstractSpinBoxprotected Object spinDown()
spinDown in class AbstractSpinBoxprotected void processFocusLost(FocusEvent e)
processFocusLost in class AbstractSpinBoxpublic Object getValue()
getValue in interface JCFieldComponentpublic void setValue(Object value)
setValue in interface JCFieldComponentsetValue in class AbstractSpinBoxvalue - public com.klg.jclass.util.value.JCValueModel getValueModel()
getValueModel in interface JCFieldComponentgetValueModel in class AbstractSpinBoxJCValueModelpublic void setValueModel(com.klg.jclass.util.value.JCValueModel model)
setValueModel in interface JCFieldComponentsetValueModel in class AbstractSpinBoxmodel - JCValueModelpublic com.klg.jclass.field.validate.JCValidator getValidator()
getValidator in interface JCFieldComponentJCValidatorpublic void setValidator(com.klg.jclass.field.validate.JCValidator v)
setValidator in interface JCFieldComponentv - JCValidatorpublic com.klg.jclass.field.JCInvalidInfo getInvalidInfo()
Invalid properties. The Invalid properties are
beepOnInvalid, invalidForeground, invalidBackground,
defaultValue, and invalidPolicy.
getInvalidInfo in interface JCFieldComponentInvalid propertiespublic void setInvalidInfo(com.klg.jclass.field.JCInvalidInfo info)
Invalid properties. The Invalid properties are
beepOnInvalid, invalidForeground, invalidBackground,
defaultValue, and invalidPolicy.
setInvalidInfo in interface JCFieldComponentinfo - public int getState()
VALID, INVALID, or UNDER_EDIT.
getState in interface JCFieldComponentVALID, INVALID, or UNDER_EDITpublic boolean getSelectOnEnter()
getSelectOnEnter in interface JCFieldComponentsetSelectOnEnter(boolean)public void setSelectOnEnter(boolean select)
false.
setSelectOnEnter in interface JCFieldComponentselect - public void commitEdit()
commitEdit in interface JCFieldComponentpublic boolean isRequired()
true if the field is required.
isRequired in interface JCFieldComponenttrue if the field is requiredpublic void setRequired(boolean required)
setRequired in interface JCFieldComponentrequired - public void setLocale(Locale l)
setLocale in class AbstractSpinBoxl - the new locale to be usedComponent.setLocale(java.util.Locale)
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||