|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pivot.wtk.skin.ComponentSkin
org.apache.pivot.wtk.skin.TextAreaSkin
public class TextAreaSkin
Text area skin.
Nested Class Summary | |
---|---|
class |
TextAreaSkin.DocumentView
Document view. |
class |
TextAreaSkin.ElementView
Abstract base class for element views. |
class |
TextAreaSkin.ImageNodeView
|
class |
TextAreaSkin.NodeView
Abstract base class for node views. |
class |
TextAreaSkin.ParagraphView
|
class |
TextAreaSkin.TextNodeView
Text node view. |
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.TextAreaListener |
---|
TextAreaListener.Adapter |
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentListener |
---|
ComponentListener.Adapter |
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentStateListener |
---|
ComponentStateListener.Adapter |
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseListener |
---|
ComponentMouseListener.Adapter |
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseButtonListener |
---|
ComponentMouseButtonListener.Adapter |
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentKeyListener |
---|
ComponentKeyListener.Adapter |
Field Summary |
---|
Fields inherited from class org.apache.pivot.wtk.skin.ComponentSkin |
---|
SHOW_TOOLTIP_TIMEOUT |
Constructor Summary | |
---|---|
TextAreaSkin()
|
Method Summary | |
---|---|
void |
documentChanged(TextArea textArea,
Document previousDocument)
Called when a text area's document has changed. |
void |
editableChanged(TextArea textArea)
Called when a text area's editable state has changed. |
void |
enabledChanged(Component component)
Called when a component's enabled state has changed. |
void |
focusedChanged(Component component,
Component obverseComponent)
Called when a component's focused state has changed. |
Color |
getBackgroundColor()
|
int |
getBaseline(int width,
int height)
Returns the baseline for a given width and height. |
Bounds |
getCharacterBounds(int offset)
Returns the bounds of the character at a given offset within the document. |
Color |
getColor()
|
Font |
getFont()
|
Color |
getInactiveColor()
|
Color |
getInactiveSelectionBackgroundColor()
|
Color |
getInactiveSelectionColor()
|
int |
getInsertionPoint(int x,
int y)
Returns the insertion point for a given location. |
Insets |
getMargin()
|
int |
getNextInsertionPoint(int x,
int from,
FocusTraversalDirection direction)
Returns the next insertion point given an x coordinate and a character offset. |
int |
getPreferredHeight(int width)
Returns the visual's preferred height given the provided width constraint. |
Dimensions |
getPreferredSize()
Returns the visual's unconstrained preferred size. |
int |
getPreferredWidth(int height)
Returns the visual's preferred width given the provided height constraint. |
int |
getRowCount()
Returns the total number of rows in the document. |
int |
getRowIndex(int offset)
Returns the row index of the character at a given offset within the document. |
Color |
getSelectionBackgroundColor()
|
Color |
getSelectionColor()
|
boolean |
getWrapText()
|
void |
install(Component component)
Associates a skin with a component. |
boolean |
isFocusable()
By default, components are focusable. |
boolean |
isOpaque()
By default, skins are assumed to be opaque. |
boolean |
keyPressed(Component component,
int keyCode,
Keyboard.KeyLocation keyLocation)
Called when a key has been pressed. |
boolean |
keyTyped(Component component,
char character)
Called when a key has been typed. |
void |
layout()
If the component on which the skin is installed is a container, lays out the container's children. |
boolean |
mouseDown(Component component,
Mouse.Button button,
int x,
int y)
Called when a mouse button is pressed over a component. |
boolean |
mouseMove(Component component,
int x,
int y)
Called when the mouse is moved over a component. |
boolean |
mouseUp(Component component,
Mouse.Button button,
int x,
int y)
Called when a mouse button is released over a component. |
void |
paint(Graphics2D graphics)
Paints the visual. |
void |
selectionChanged(TextArea textArea,
int previousSelectionStart,
int previousSelectionLength)
Called when a text area's selection state has changed. |
void |
setBackgroundColor(Color backgroundColor)
|
void |
setBackgroundColor(String backgroundColor)
|
void |
setColor(Color color)
|
void |
setColor(String color)
|
void |
setFont(Dictionary<String,?> font)
|
void |
setFont(Font font)
|
void |
setFont(String font)
|
void |
setInactiveColor(Color inactiveColor)
|
void |
setInactiveColor(String inactiveColor)
|
void |
setInactiveSelectionBackgroundColor(Color inactiveSelectionBackgroundColor)
|
void |
setInactiveSelectionBackgroundColor(String inactiveSelectionBackgroundColor)
|
void |
setInactiveSelectionColor(Color inactiveSelectionColor)
|
void |
setInactiveSelectionColor(String inactiveSelectionColor)
|
void |
setMargin(Dictionary<String,?> margin)
|
void |
setMargin(Insets margin)
|
void |
setMargin(int margin)
|
void |
setMargin(Number margin)
|
void |
setMargin(String margin)
|
void |
setSelectionBackgroundColor(Color selectionBackgroundColor)
|
void |
setSelectionBackgroundColor(String selectionBackgroundColor)
|
void |
setSelectionColor(Color selectionColor)
|
void |
setSelectionColor(String selectionColor)
|
void |
setWrapText(boolean wrapText)
|
Methods inherited from class org.apache.pivot.wtk.skin.ComponentSkin |
---|
cursorChanged, decodeFont, dragSourceChanged, dropTargetChanged, getBaseline, getComponent, getHeight, getWidth, invalidateComponent, keyReleased, locationChanged, menuHandlerChanged, mouseClick, mouseOut, mouseOver, mouseWheel, parentChanged, preferredHeightLimitsChanged, preferredSizeChanged, preferredWidthLimitsChanged, repaintComponent, repaintComponent, repaintComponent, repaintComponent, repaintComponent, setSize, sizeChanged, styleUpdated, tooltipTextChanged, visibleChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextAreaSkin()
Method Detail |
---|
public void install(Component component)
Skin
install
in interface Skin
install
in class ComponentSkin
component
- The component to which the skin is being attached.public boolean isFocusable()
ComponentSkin
isFocusable
in interface Skin
isFocusable
in class ComponentSkin
public int getPreferredWidth(int height)
ConstrainedVisual
getPreferredWidth
in interface ConstrainedVisual
height
- The height by which to constrain the preferred width, or -1
for no constraint.public int getPreferredHeight(int width)
ConstrainedVisual
getPreferredHeight
in interface ConstrainedVisual
width
- The width by which to constrain the preferred height, or -1
for no constraint.public Dimensions getPreferredSize()
ConstrainedVisual
getPreferredSize
in interface ConstrainedVisual
getPreferredSize
in class ComponentSkin
public int getBaseline(int width, int height)
ConstrainedVisual
getBaseline
in interface ConstrainedVisual
getBaseline
in class ComponentSkin
public void layout()
Skin
layout
in interface Skin
public void paint(Graphics2D graphics)
Visual
paint
in interface Visual
graphics
- The graphics context in which to paint the visual.public boolean isOpaque()
ComponentSkin
isOpaque
in interface Skin
isOpaque
in class ComponentSkin
public int getInsertionPoint(int x, int y)
TextArea.Skin
getInsertionPoint
in interface TextArea.Skin
public int getNextInsertionPoint(int x, int from, FocusTraversalDirection direction)
TextArea.Skin
getNextInsertionPoint
in interface TextArea.Skin
public int getRowIndex(int offset)
TextArea.Skin
getRowIndex
in interface TextArea.Skin
public int getRowCount()
TextArea.Skin
getRowCount
in interface TextArea.Skin
public Bounds getCharacterBounds(int offset)
TextArea.Skin
getCharacterBounds
in interface TextArea.Skin
public Color getColor()
public void setColor(Color color)
public final void setColor(String color)
public Color getInactiveColor()
public void setInactiveColor(Color inactiveColor)
public final void setInactiveColor(String inactiveColor)
public Color getBackgroundColor()
public void setBackgroundColor(Color backgroundColor)
public final void setBackgroundColor(String backgroundColor)
public Font getFont()
public void setFont(Font font)
public final void setFont(String font)
public final void setFont(Dictionary<String,?> font)
public Color getSelectionColor()
public void setSelectionColor(Color selectionColor)
public final void setSelectionColor(String selectionColor)
public Color getSelectionBackgroundColor()
public void setSelectionBackgroundColor(Color selectionBackgroundColor)
public final void setSelectionBackgroundColor(String selectionBackgroundColor)
public Color getInactiveSelectionColor()
public void setInactiveSelectionColor(Color inactiveSelectionColor)
public final void setInactiveSelectionColor(String inactiveSelectionColor)
public Color getInactiveSelectionBackgroundColor()
public void setInactiveSelectionBackgroundColor(Color inactiveSelectionBackgroundColor)
public final void setInactiveSelectionBackgroundColor(String inactiveSelectionBackgroundColor)
public Insets getMargin()
public void setMargin(Insets margin)
public final void setMargin(Dictionary<String,?> margin)
public final void setMargin(int margin)
public final void setMargin(Number margin)
public final void setMargin(String margin)
public boolean getWrapText()
public void setWrapText(boolean wrapText)
public boolean mouseMove(Component component, int x, int y)
ComponentMouseListener
mouseMove
in interface ComponentMouseListener
mouseMove
in class ComponentSkin
public boolean mouseDown(Component component, Mouse.Button button, int x, int y)
ComponentMouseButtonListener
mouseDown
in interface ComponentMouseButtonListener
mouseDown
in class ComponentSkin
public boolean mouseUp(Component component, Mouse.Button button, int x, int y)
ComponentMouseButtonListener
mouseUp
in interface ComponentMouseButtonListener
mouseUp
in class ComponentSkin
public boolean keyTyped(Component component, char character)
ComponentKeyListener
keyTyped
in interface ComponentKeyListener
keyTyped
in class ComponentSkin
public boolean keyPressed(Component component, int keyCode, Keyboard.KeyLocation keyLocation)
ComponentKeyListener
keyPressed
in interface ComponentKeyListener
keyPressed
in class ComponentSkin
public void enabledChanged(Component component)
ComponentStateListener
enabledChanged
in interface ComponentStateListener
enabledChanged
in class ComponentSkin
public void focusedChanged(Component component, Component obverseComponent)
ComponentStateListener
focusedChanged
in interface ComponentStateListener
focusedChanged
in class ComponentSkin
public void documentChanged(TextArea textArea, Document previousDocument)
TextAreaListener
documentChanged
in interface TextAreaListener
public void editableChanged(TextArea textArea)
TextAreaListener
editableChanged
in interface TextAreaListener
public void selectionChanged(TextArea textArea, int previousSelectionStart, int previousSelectionLength)
TextAreaSelectionListener
selectionChanged
in interface TextAreaSelectionListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |