|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--ui.StyledText
Nested Class Summary | |
protected class |
StyledText.TextSettings
|
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface ui.UiEffects |
CENTER, EMBLOSSED, ENGRAVED, FLAT, JUSTIFY, LEFT, LOWERED, NONE, RAISED, RIGHT, ROUNDED, SHADOW, TEXT_LOWERED, TEXT_NORMAL, TEXT_OUTLINE, TEXT_RAISED, TEXT_SHADOW, TEXT_SUB |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
StyledText(java.lang.String text)
|
|
StyledText(java.lang.String text,
int width,
int height)
|
|
StyledText(java.lang.String text,
int width,
int height,
java.awt.Font font,
int fontStyles)
|
Method Summary | |
void |
append(java.lang.String text)
|
protected void |
drawTextLine(java.awt.Graphics g,
java.lang.String line,
int startX,
int startY,
java.util.Vector stylesVector)
Rita upp en textrad vid avgivna koordinater. |
java.awt.Dimension |
getMinimumSize()
Gets the minumum dimensions for this text field. |
java.awt.Dimension |
getPreferredSize()
Gets the preferred size of this text field. |
java.lang.String |
getText()
|
java.awt.Color |
getTextColor()
|
void |
paint(java.awt.Graphics g)
|
protected java.lang.String |
paramString()
Returns the parameter string representing the state of this text field. |
void |
resetFont(java.awt.Font font,
int fontStyles)
Ändra den aktuella fonten och nollställ alla fontinställningar. |
void |
setMargins(int vMargin,
int hMargin)
Ändra marginalerna |
void |
setText(java.lang.String text)
|
void |
setTextColor(java.awt.Color textColor)
|
void |
update(java.awt.Graphics g)
|
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, 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, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, 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, isOpaque, 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, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public StyledText(java.lang.String text, int width, int height, java.awt.Font font, int fontStyles)
public StyledText(java.lang.String text, int width, int height)
public StyledText(java.lang.String text)
Method Detail |
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class java.awt.Component
public java.awt.Dimension getMinimumSize()
getMinimumSize
in class java.awt.Component
public void setText(java.lang.String text)
public java.lang.String getText()
public void append(java.lang.String text)
public void setTextColor(java.awt.Color textColor)
public java.awt.Color getTextColor()
public void resetFont(java.awt.Font font, int fontStyles)
font
- Den nya fonten.fontStyles
- Extra fontinställningar.UiEffects
public void setMargins(int vMargin, int hMargin)
vMargin
- Avståndet från vänster & höger till texten.hMargin
- Avståndet från topp & botten till texten.public void update(java.awt.Graphics g)
update
in class java.awt.Component
public void paint(java.awt.Graphics g)
paint
in class java.awt.Component
protected void drawTextLine(java.awt.Graphics g, java.lang.String line, int startX, int startY, java.util.Vector stylesVector)
g
- Den grafiska kontexten att rita på.line
- Textraden.UiEffects
protected java.lang.String paramString()
paramString
in class java.awt.Component
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |