|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.openswing.swing.client.BaseInputControl
Title: OpenSwing Framework
Description: Class that could be used as bease class for an input control.
Copyright: Copyright (C) 2006 Mauro Carniel
This file is part of OpenSwing Framework. This library is free software; you can redistribute it and/or modify it under the terms of the (LGPL) Lesser General Public License as published by the Free Software Foundation; GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. The author may be contacted at: maurocarniel@tin.it
Nested Class Summary |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Field Summary |
Fields inherited from class javax.swing.JComponent |
TOOL_TIP_TEXT_KEY, 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 | |
BaseInputControl()
Constructor. |
Method Summary | |
void |
addValueChangedListener(ValueChangeListener listener)
Add a value changed listener to this input control. |
java.lang.String |
getAttributeName()
Link the input control to the form which contains it and with the specified the attribute. |
javax.swing.JComponent |
getBindingComponent()
|
java.awt.Font |
getFont()
|
LabelControl |
getLinkLabel()
|
int |
getTextAlignment()
|
java.lang.String |
getToolTipText()
|
java.lang.Object |
getValue()
|
ValueChangeListener[] |
getValueChangeListeners()
|
boolean |
isCanCopy()
|
boolean |
isChanged()
|
boolean |
isEnabled()
|
boolean |
isEnabledOnEdit()
|
boolean |
isEnabledOnInsert()
|
boolean |
isRequired()
|
void |
removeValueChangedListener(ValueChangeListener listener)
Remove a value changed listener from this input control. |
void |
requestFocus()
|
void |
setAttributeName(java.lang.String attributeName)
Link the input control to the form which contains it and with the specified the attribute. |
void |
setCanCopy(boolean canCopy)
Define if the input control value is duplicated when user has clicked on COPY button. |
void |
setChanged(boolean changed)
Define if the input control value is changed. |
void |
setEnabled(boolean enabled)
Set current input control abilitation. |
void |
setEnabledOnEdit(boolean enabled)
Define if the input control is enabled on EDIT mode, false otherwise |
void |
setEnabledOnInsert(boolean enabled)
Define if the input control is enabled on INSERT mode. |
void |
setFont(java.awt.Font font)
Set the specified font. |
void |
setLinkLabel(LabelControl linkedLabel)
Link the input control label to the specified label. |
void |
setRequired(boolean required)
Define mandatory property of the input control. |
void |
setTextAlignment(int alignment)
Set column text horizontal alignement. |
void |
setToolTipText(java.lang.String toolTipText)
Set a tooltip text. |
void |
setValue(java.lang.Object value)
Set value to the input control. |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, 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, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, 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, 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, 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 |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.openswing.swing.client.InputControl |
addFocusListener, removeFocusListener |
Constructor Detail |
public BaseInputControl()
Method Detail |
public javax.swing.JComponent getBindingComponent()
public final void addValueChangedListener(ValueChangeListener listener)
addValueChangedListener
in interface InputControl
listener
- value changed listener to addpublic final void removeValueChangedListener(ValueChangeListener listener)
removeValueChangedListener
in interface InputControl
listener
- value changed listener to removepublic final void setLinkLabel(LabelControl linkedLabel)
setLinkLabel
in interface InputControl
linkedLabel
- label used when showing error messages related to the input controlpublic final LabelControl getLinkLabel()
getLinkLabel
in interface InputControl
public final boolean isRequired()
isRequired
in interface InputControl
public final java.awt.Font getFont()
getFont
in interface java.awt.MenuContainer
public final void setFont(java.awt.Font font)
font
- Font to setpublic final void setToolTipText(java.lang.String toolTipText)
toolTipText
- tool tip text entry in the dictionarypublic final java.lang.String getToolTipText()
public final void setRequired(boolean required)
public final boolean isEnabledOnInsert()
isEnabledOnInsert
in interface InputControl
true
if the input control is enabled on INSERT mode, false
otherwisepublic final void setEnabledOnInsert(boolean enabled)
setEnabledOnInsert
in interface InputControl
enabled
- true
if the input control is enabled on INSERT mode, false
otherwisepublic final boolean isEnabledOnEdit()
isEnabledOnEdit
in interface InputControl
true
if the input control is enabled on EDIT mode, false
otherwisepublic final void setEnabledOnEdit(boolean enabled)
false
otherwise
setEnabledOnEdit
in interface InputControl
enabled
- mandatory property of the input controlpublic final boolean isCanCopy()
isCanCopy
in interface InputControl
public final void setCanCopy(boolean canCopy)
setCanCopy
in interface InputControl
canCopy
- define if the input control value is duplicated when user has clicked on COPY buttonpublic final void setAttributeName(java.lang.String attributeName)
setAttributeName
in interface InputControl
attributeName
- attribute name to which link the input controlpublic final java.lang.String getAttributeName()
getAttributeName
in interface InputControl
public void setEnabled(boolean enabled)
setEnabled
in interface InputControl
public boolean isEnabled()
isEnabled
in interface InputControl
public java.lang.Object getValue()
getValue
in interface InputControl
public void setValue(java.lang.Object value)
setValue
in interface InputControl
value
- value to set into the input controlpublic final boolean isChanged()
isChanged
in interface InputControl
true
if the input control value is changed, false
otherwisepublic final void setChanged(boolean changed)
setChanged
in interface InputControl
changed
- true
if the input control value is changed, false
otherwisepublic final ValueChangeListener[] getValueChangeListeners()
getValueChangeListeners
in interface InputControl
public void requestFocus()
public final int getTextAlignment()
public final void setTextAlignment(int alignment)
alignment
- column text horizontal alignement; possible values: "SwingConstants.LEFT", "SwingConstants.RIGHT", "SwingConstants.CENTER".
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |