|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.ui.drawing.Glyph
public abstract class Glyph
Base (abstract) class for representing things that are drawn on the screen. Holds some basic attributes (but no positional attrs) and has a facility for recreating itself via xml.
| Field Summary | |
|---|---|
static String |
ATTR_BGCOLOR
_more_ |
static String |
ATTR_CHILDREN
_more_ |
static String |
ATTR_CLASS
_more_ |
static String |
ATTR_COLOR
_more_ |
static String |
ATTR_FILL
_more_ |
static String |
ATTR_HEIGHT
_more_ |
static String |
ATTR_IMAGE
_more_ |
static String |
ATTR_LINEWIDTH
_more_ |
static String |
ATTR_PARENT
_more_ |
static String |
ATTR_PTS
_more_ |
static String |
ATTR_STRETCHY
_more_ |
static String |
ATTR_TEXT
_more_ |
static String |
ATTR_TYPE
_more_ |
static String |
ATTR_WIDTH
_more_ |
int |
baseline
_more_ |
static int |
H_SEL_WIDTH
_more_ |
static Color |
highlightColor
_more_ |
static Hashtable |
idToGlyph
_more_ |
static int |
MIN_DISTANCE_TO_STRETCH
Some global consts |
static String |
PT_CENTER
_more_ |
static String |
PT_H_LEFT
_more_ |
static String |
PT_H_MIDDLE
_more_ |
static String |
PT_H_RIGHT
_more_ |
static String |
PT_LL
_more_ |
static String |
PT_LM
_more_ |
static String |
PT_LR
_more_ |
static String |
PT_ML
_more_ |
static String |
PT_MM
_more_ |
static String |
PT_MR
_more_ |
static String |
PT_P1
_more_ |
static String |
PT_P2
_more_ |
static String |
PT_PREFIX
_more_ |
static String |
PT_UL
_more_ |
static String |
PT_UM
_more_ |
static String |
PT_UR
_more_ |
static String |
PT_V_LOWER
_more_ |
static String |
PT_V_MIDDLE
_more_ |
static String |
PT_V_UPPER
_more_ |
static String[] |
RECTPOINTNAMES
_more_ |
static String[] |
RECTPOINTS
_more_ |
static int |
SEL_WIDTH
_more_ |
static String |
TAG_GLYPH
_more_ |
boolean |
underline
_more_ |
String |
url
_more_ |
| Constructor Summary | |
|---|---|
Glyph()
_more_ |
|
| Method Summary | |
|---|---|
void |
boundsChanged()
Hook for when the size or position of this glyph is changed |
boolean |
canStretch()
_more_ |
protected Object |
clone()
_more_ |
abstract double |
distance(int x,
int y)
_more_ |
static double |
distance(int x1,
int y1,
int x2,
int y2)
Utility method for distance between two points |
void |
doRemove()
_more_ |
static String |
flipY(String pt)
_more_ |
String |
getAttrs()
_more_ |
Color |
getBackground()
_more_ |
Color |
getBackground(Color dflt)
_more_ |
boolean |
getBeingCreated()
_more_ |
abstract Rectangle |
getBounds()
_more_ |
CanvasCommand |
getCreateCommand(DisplayCanvas canvas,
AWTEvent event,
int x,
int y)
_more_ |
static Cursor |
getCursor(String rectPoint)
_more_ |
boolean |
getFilled()
_more_ |
Color |
getForeground()
_more_ |
String |
getId()
_more_ |
int |
getLineWidth()
_more_ |
CanvasCommand |
getMoveCommand(DisplayCanvas canvas,
AWTEvent event,
int x,
int y)
_more_ |
boolean |
getPersistent()
_more_ |
static Point2D |
getPointOnRect(String pt,
Rectangle2D r)
_more_ |
static Point2D |
getPointOnRect(String pt,
Rectangle2D r,
Point2D point)
_more_ |
static String |
getRectPointName(String rectPoint)
_more_ |
Rectangle |
getRepaintBounds()
_more_ |
String |
getStretchPoint(int x,
int y)
_more_ |
static String |
getStretchPoint(RectangularShape r,
int x,
int y)
_more_ |
boolean |
getStretchy()
_more_ |
String |
getXml()
Return the string used to recreate me |
void |
initDone()
_more_ |
String |
makeAttr(String name,
String value)
_more_ |
abstract void |
moveBy(int x,
int y)
_more_ |
abstract void |
moveTo(int x,
int y)
_more_ |
void |
notifyChange()
_more_ |
void |
paint(Graphics g,
DisplayCanvas c)
_more_ |
void |
paintHighlight(Graphics g,
DisplayCanvas c)
_more_ |
void |
paintSelection(Graphics g,
DisplayCanvas c)
By default paint little black rectangles at the corners and the sides |
static void |
paintSelectionPoints(Graphics g,
RectangularShape r,
int size)
By default paint little black rectangles at the corners and the sides |
boolean |
pickable()
_more_ |
void |
processAttrs(String s)
A Glyph can write out a persistent copy of itself as a set of attribute/value pairs. |
void |
setAttr(String name,
String value)
set my named atttribute to value |
void |
setBackground(Color c)
_more_ |
void |
setBeingCreated(boolean b)
_more_ |
void |
setFilled(boolean c)
_more_ |
void |
setForeground(Color c)
_more_ |
void |
setId(String newId)
_more_ |
void |
setLineWidth(int value)
_more_ |
void |
setParent(CompositeGlyph newParent)
_more_ |
void |
setPoints(int[] p,
int cnt)
Hook for setting points from the attribute line |
void |
setStretchy(boolean b)
_more_ |
String |
stretchTo(int x,
int y,
String pt,
boolean correct)
_more_ |
static String |
stretchTo(Rectangle bounds,
int x,
int y,
String pt)
_more_ |
static String |
stretchTo(Rectangle bounds,
int x,
int y,
String pt,
boolean correct,
boolean symetric,
boolean equalSides)
_more_ |
static Rectangle |
toRect(RectangularShape r)
_more_ |
Point |
transformOutput(DisplayCanvas canvas,
Point r)
_more_ |
Rectangle |
transformOutput(DisplayCanvas canvas,
Rectangle r)
_more_ |
int |
transformOutputX(DisplayCanvas canvas,
int x)
_more_ |
int |
transformOutputY(DisplayCanvas canvas,
int x)
_more_ |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String TAG_GLYPH
public static final String ATTR_CLASS
public static final String PT_CENTER
public static final String PT_V_UPPER
public static final String PT_V_MIDDLE
public static final String PT_V_LOWER
public static final String PT_H_LEFT
public static final String PT_H_MIDDLE
public static final String PT_H_RIGHT
public static final String PT_UL
public static final String PT_UM
public static final String PT_UR
public static final String PT_ML
public static final String PT_MM
public static final String PT_MR
public static final String PT_LL
public static final String PT_LM
public static final String PT_LR
public static final String[] RECTPOINTS
public static final String[] RECTPOINTNAMES
public static final String PT_PREFIX
public static final String PT_P1
public static final String PT_P2
public static final String ATTR_CHILDREN
public static final String ATTR_COLOR
public static final String ATTR_BGCOLOR
public static final String ATTR_FILL
public static final String ATTR_HEIGHT
public static final String ATTR_IMAGE
public static final String ATTR_LINEWIDTH
public static final String ATTR_PARENT
public static final String ATTR_PTS
public static final String ATTR_STRETCHY
public static final String ATTR_TEXT
public static final String ATTR_TYPE
public static final String ATTR_WIDTH
public static Hashtable idToGlyph
public static final int MIN_DISTANCE_TO_STRETCH
public static final int SEL_WIDTH
public static final int H_SEL_WIDTH
public static final Color highlightColor
public boolean underline
public String url
public int baseline
| Constructor Detail |
|---|
public Glyph()
| Method Detail |
|---|
public static Cursor getCursor(String rectPoint)
rectPoint - _more_
public static String getRectPointName(String rectPoint)
rectPoint -
public static void paintSelectionPoints(Graphics g,
RectangularShape r,
int size)
g - The graphics to paint intor - The rectangle to decoratesize - Box sizepublic static String flipY(String pt)
pt -
public static Point2D getPointOnRect(String pt,
Rectangle2D r)
pt - r -
public static Rectangle toRect(RectangularShape r)
r - _more_
public static String getStretchPoint(RectangularShape r,
int x,
int y)
r - _more_x - y -
public static Point2D getPointOnRect(String pt,
Rectangle2D r,
Point2D point)
pt - The point specr - The rectanglepoint - The point to set
public static String stretchTo(Rectangle bounds,
int x,
int y,
String pt)
bounds - x - y - pt -
public static String stretchTo(Rectangle bounds,
int x,
int y,
String pt,
boolean correct,
boolean symetric,
boolean equalSides)
bounds - _more_x - y - pt - correct - symetric - _more_equalSides - _more_
public boolean getStretchy()
public void setStretchy(boolean b)
b - public void setBeingCreated(boolean b)
b - public boolean getBeingCreated()
public void initDone()
public void setId(String newId)
newId - public String getId()
public void doRemove()
public void setParent(CompositeGlyph newParent)
newParent - public boolean pickable()
public void notifyChange()
public CanvasCommand getCreateCommand(DisplayCanvas canvas,
AWTEvent event,
int x,
int y)
canvas - event - x - y -
public CanvasCommand getMoveCommand(DisplayCanvas canvas,
AWTEvent event,
int x,
int y)
canvas - event - x - y -
protected Object clone()
throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic boolean getPersistent()
public boolean canStretch()
public void boundsChanged()
public void setPoints(int[] p,
int cnt)
p - cnt - public void setForeground(Color c)
c - public Color getForeground()
public void setBackground(Color c)
c - public Color getBackground()
public Color getBackground(Color dflt)
dflt -
public void setLineWidth(int value)
value - public int getLineWidth()
public void setFilled(boolean c)
c - public boolean getFilled()
public void processAttrs(String s)
s -
public void setAttr(String name,
String value)
name - value - public String getXml()
public String makeAttr(String name,
String value)
name - value -
public String getAttrs()
public void paint(Graphics g,
DisplayCanvas c)
g - c -
public void paintSelection(Graphics g,
DisplayCanvas c)
g - c -
public void paintHighlight(Graphics g,
DisplayCanvas c)
g - c -
public abstract double distance(int x,
int y)
x - y -
public abstract void moveBy(int x,
int y)
x - y -
public abstract void moveTo(int x,
int y)
x - y - public abstract Rectangle getBounds()
public Rectangle getRepaintBounds()
public String getStretchPoint(int x,
int y)
x - y -
public String stretchTo(int x,
int y,
String pt,
boolean correct)
x - y - pt - correct -
public static double distance(int x1,
int y1,
int x2,
int y2)
x1 - y1 - x2 - y2 -
public int transformOutputX(DisplayCanvas canvas,
int x)
canvas - x -
public int transformOutputY(DisplayCanvas canvas,
int x)
canvas - x -
public Rectangle transformOutput(DisplayCanvas canvas,
Rectangle r)
canvas - r -
public Point transformOutput(DisplayCanvas canvas,
Point r)
canvas - r -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||