org.joone.edit
Class CaseAwareTextDisplay
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Canvas
-
- org.joone.edit.CaseAwareTextDisplay
-
- All Implemented Interfaces:
- java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible
public class CaseAwareTextDisplay extends java.awt.Canvas implements java.io.SerializableIt is a subclass ofjava.awt.Canvasand displays text. It has several properties of various sorts. The font property is a simple (unbound) property that is inherited fromCanvas. The other properties inherited fromCanvasare foreground and background. This Bean overrides the property setters, converting them to bound and constrained properties. TheCaseAwareTextDisplayBean also implements some new bound properties: text, topMargin, leftMargin, and textCase. The text property contains the text to be shown starting at the pixel offsets indicated by the topMargin and leftMargin properties. The text is painted using the inherited font, foreground, and background properties. The textCase property is maintained by the Bean as an int and indicates whether the text is to be displayed as typed -- in uppercase, lowercase, or initial caps.- See Also:
JooneFileChooserEditor, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static intAS_ISstatic java.lang.StringBACKGROUNDstatic intFIRST_IN_CAPSstatic java.lang.StringFONTstatic java.lang.StringFOREGROUNDstatic java.lang.StringLEFT_MARGINstatic intLOWERCASEstatic java.lang.StringTEXTstatic java.lang.StringTEXT_CASEstatic java.lang.StringTOP_MARGINstatic intUPPERCASE
-
Constructor Summary
Constructors Constructor and Description CaseAwareTextDisplay()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddPropertyChangeListener(java.beans.PropertyChangeListener listener)voidaddVetoableChangeListener(java.beans.VetoableChangeListener vetoListener)intgetLeftMargin()java.lang.StringgetText()intgetTextCase()intgetTopMargin()voidpaint(java.awt.Graphics g)voidremovePropertyChangeListener(java.beans.PropertyChangeListener listener)voidremoveVetoableChangeListener(java.beans.VetoableChangeListener vetoListener)voidsetBackground(java.awt.Color newColor)voidsetForeground(java.awt.Color newColor)voidsetLeftMargin(int pixels)voidsetText(java.lang.String text)voidsetTextCase(int textCase)voidsetTopMargin(int pixels)-
Methods inherited from class java.awt.Canvas
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, update
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, revalidate, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
-
-
-
-
Field Detail
-
AS_IS
public static final int AS_IS
- See Also:
- Constant Field Values
-
UPPERCASE
public static final int UPPERCASE
- See Also:
- Constant Field Values
-
LOWERCASE
public static final int LOWERCASE
- See Also:
- Constant Field Values
-
FIRST_IN_CAPS
public static final int FIRST_IN_CAPS
- See Also:
- Constant Field Values
-
TEXT
public static final java.lang.String TEXT
- See Also:
- Constant Field Values
-
TOP_MARGIN
public static final java.lang.String TOP_MARGIN
- See Also:
- Constant Field Values
-
LEFT_MARGIN
public static final java.lang.String LEFT_MARGIN
- See Also:
- Constant Field Values
-
FOREGROUND
public static final java.lang.String FOREGROUND
- See Also:
- Constant Field Values
-
BACKGROUND
public static final java.lang.String BACKGROUND
- See Also:
- Constant Field Values
-
TEXT_CASE
public static final java.lang.String TEXT_CASE
- See Also:
- Constant Field Values
-
FONT
public static final java.lang.String FONT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getText
public java.lang.String getText()
-
setText
public void setText(java.lang.String text)
-
getTopMargin
public int getTopMargin()
-
setTopMargin
public void setTopMargin(int pixels)
-
getLeftMargin
public int getLeftMargin()
-
setLeftMargin
public void setLeftMargin(int pixels)
-
setForeground
public void setForeground(java.awt.Color newColor)
- Overrides:
setForegroundin classjava.awt.Component
-
setBackground
public void setBackground(java.awt.Color newColor)
- Overrides:
setBackgroundin classjava.awt.Component
-
getTextCase
public int getTextCase()
-
setTextCase
public void setTextCase(int textCase)
-
paint
public void paint(java.awt.Graphics g)
- Overrides:
paintin classjava.awt.Canvas
-
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
- Overrides:
addPropertyChangeListenerin classjava.awt.Component
-
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
- Overrides:
removePropertyChangeListenerin classjava.awt.Component
-
addVetoableChangeListener
public void addVetoableChangeListener(java.beans.VetoableChangeListener vetoListener)
-
removeVetoableChangeListener
public void removeVetoableChangeListener(java.beans.VetoableChangeListener vetoListener)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG