|
[.hacks.] [.java.] |
||||||||
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 | +--java.awt.Panel | +--Awt | +--Caption
(#)Caption.java
Field Summary | |
protected boolean |
active
component states (used for implementing classes) |
protected java.awt.Rectangle |
activeRect
list of hrefs in this caption. maps rectangle to string |
protected java.lang.String |
caption
our contents |
protected boolean |
entered
|
protected java.util.Hashtable |
hrefs
list of hrefs in this caption. maps rectangle to string |
protected int |
iconDist
icon layout if any |
protected int |
iconPos
|
protected boolean |
invalid
is layout invalid ? |
protected int |
mode
Modes |
Fields inherited from class Awt |
actionListener, Background, bg, big, bim, Black, BlueMask, Bold, Bolditalic, borderDepth, borderType, BOTTOM, Brighter, Bulk, BULK, C, Center, CENTER, ColorMask, componentStates, Darker, E, East, EFFECT_MASK, Esc, FILL, Flat, FontMask, fonts, FontSize0, FontSizeMask, Foreground, GreenMask, Href, HREF, Hrefend, innerInsets, insets, Italic, itemListener, jvendor, jversion, Larger, LEFT, minimumDimension, MISC_MASK, Monospaced, N, NE, None, NONE, North, NorthEast, NorthWest, Null, NW, Plain, POSITION_MASK, Raised, RAISED, RedMask, RIGHT, S, SansSerif, SE, Serif, Smaller, South, SouthEast, SouthWest, Sunken, SUNKEN, SW, Tab0, TabMask, TabSizeMask, TOP, Uline, ULINE, W, West, White |
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 | |
Caption()
Constructor for an empty caption |
|
Caption(java.lang.String caption)
Standard constructor |
|
Caption(java.lang.String caption,
int mode)
Constructor with additional alignment specification |
Method Summary | |
void |
doHref(java.lang.String s,
int x,
int y,
int w,
int h)
Overwrite Awt.doHref() |
java.lang.String |
getCaption()
get current caption |
java.lang.String |
getHref()
get current Hyper reference if any |
java.lang.String |
getLabel()
get current caption (compat with java.awt.Label) |
int |
getMode()
get current mode |
java.lang.String |
getText()
get current caption (compat with java.awt.TextComponent) |
java.lang.String |
getTitle()
get current caption (compat with java.awt.Label) |
void |
invalidate()
Overwrite Awt.invalidate() |
boolean |
isActive()
get current state |
boolean |
isEntered()
get current state |
java.awt.Dimension |
measure()
calculate required sizes |
java.awt.Dimension |
measureCaption()
calculate Caption (Title) size including a fix one pixel border left/right two pixel top/bottom |
java.awt.Dimension |
measureIcon()
calculate Icon size - intended as a placeholder for implementing classes |
void |
mouseExited(java.awt.event.MouseEvent e)
implement java.awt.event.MouseListener |
void |
mouseMoved(java.awt.event.MouseEvent e)
implement java.awt.event.MouseListener |
void |
mousePressed(java.awt.event.MouseEvent e)
implement java.awt.event.MouseListener |
void |
paint(java.awt.Graphics g)
Overwirte paint to do the actual artwork ;-) |
void |
paintCaption(java.awt.Graphics g,
int x,
int y,
int w,
int h)
Paint the Caption (Title) |
void |
paintIcon(java.awt.Graphics g,
int x,
int y,
int w,
int h)
Paint the Icon |
void |
setActive(boolean a)
set current activity state |
void |
setCaption(java.lang.String c)
set a new caption |
void |
setEntered(boolean e)
set current entered state |
void |
setLabel(java.lang.String l)
set a new caption (compat with java.awt.Label) |
void |
setMode(int m)
set the mode |
void |
setText(java.lang.String t)
set a new caption (compat with java.awt.TextComponent) |
void |
setTitle(java.lang.String l)
set a new caption (compat with java.awt.Label) |
Methods inherited from class java.awt.Panel |
getAccessibleContext |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getListeners, getMaximumSize, insets, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.lang.String caption
protected int iconDist
protected int iconPos
protected boolean active
protected boolean entered
protected int mode
protected boolean invalid
protected java.util.Hashtable hrefs
protected java.awt.Rectangle activeRect
Constructor Detail |
public Caption()
public Caption(java.lang.String caption)
caption
- the textpublic Caption(java.lang.String caption, int mode)
caption
- the textmode
- the line modeMethod Detail |
public void setCaption(java.lang.String c)
public java.lang.String getCaption()
public void setLabel(java.lang.String l)
public java.lang.String getLabel()
public void setTitle(java.lang.String l)
public java.lang.String getTitle()
public void setText(java.lang.String t)
t
- the textpublic java.lang.String getText()
public void setMode(int m)
m
- the modepublic int getMode()
public void setActive(boolean a)
a
- the statepublic boolean isActive()
public void setEntered(boolean e)
e
- the statepublic boolean isEntered()
public void paint(java.awt.Graphics g)
paint
in class Awt
g
- Graphics object to usepublic void paintCaption(java.awt.Graphics g, int x, int y, int w, int h)
g
- Graphics object to usex
- x-position of describing recty
- y-position of describing rectw
- width of describing recth
- height of describing rectpublic void paintIcon(java.awt.Graphics g, int x, int y, int w, int h)
g
- Graphics object to usex
- x-position of describing recty
- y-position of describing rectw
- width of describing recth
- height of describing rectpublic java.awt.Dimension measureCaption()
public java.awt.Dimension measureIcon()
public java.awt.Dimension measure()
measure
in class Awt
public void invalidate()
invalidate
in class Awt
public void doHref(java.lang.String s, int x, int y, int w, int h)
doHref
in class Awt
s
- the href string (including href & text)x
- x pos of describing recty
- y pos of describing rectw
- width of describing recth
- height of describing rectpublic java.lang.String getHref()
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
mousePressed
in class Awt
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
mouseExited
in class Awt
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
mouseMoved
in class Awt
|
[.hacks.] [.java.] |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |