|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
ucar.unidata.ui.drawing.DisplayCanvas
public class DisplayCanvas
Class DisplayCanvas
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected Color |
canvasBg
_more_ |
static String |
CMD_CHANGE
_more_ |
static String |
CMD_CREATE
_more_ |
static String |
CMD_MOVE
_more_ |
static String |
CMD_REMOVE
_more_ |
static String |
CMD_TOBACK
_more_ |
static String |
CMD_TOFRONT
_more_ |
static Cursor |
DEFAULT_CURSOR
_more_ |
protected List |
glyphs
_more_ |
int |
gridSpacing
|
static Cursor |
HAND_CURSOR
_more_ |
protected Glyph |
highlightedGlyph
_more_ |
static Cursor |
MOVE_CURSOR
_more_ |
static Cursor |
NW_CURSOR
_more_ |
protected double |
scaleFactor
The scaling |
boolean |
showGrid
|
static Cursor |
TEXT_CURSOR
_more_ |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| 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 | |
|---|---|
DisplayCanvas()
_more_ |
|
| Method Summary | |
|---|---|
void |
addGlyph(Glyph g)
_more_ |
void |
addSelection(Glyph g)
_more_ |
void |
clearAll()
_more_ |
void |
clearSelection()
_more_ |
Glyph |
createGlyph(String glyphClass,
int x,
int y)
_more_ |
void |
decreaseGridSpacing()
|
protected Component |
doMakeContents()
_more_ |
void |
doRemove(Glyph g)
_more_ |
Glyph |
findGlyph(int x,
int y)
_more_ |
static Glyph |
findGlyph(List glyphs,
int x,
int y,
double threshold)
_more_ |
Glyph |
findGlyph(String id)
_more_ |
Component |
getContents()
_more_ |
protected List |
getGlyphs()
_more_ |
Image |
getImage(String path)
_more_ |
List |
getSelection()
_more_ |
boolean |
getShowGrid()
Get the ShowGrid property. |
void |
glyphChanged(Glyph g)
_more_ |
boolean |
hasSelection()
_more_ |
void |
increaseGridSpacing()
|
boolean |
isFocusTraversable()
_more_ |
boolean |
isSelected(Glyph g)
_more_ |
void |
justRemoveGlyph(Glyph g)
_more_ |
void |
moveToBack(Glyph theGlyph)
_more_ |
void |
moveToFront(Glyph theGlyph)
_more_ |
void |
notifyGlyphCreateComplete(Glyph g)
_more_ |
void |
notifyGlyphCreateComplete(Glyph g,
boolean diddleSelection,
boolean fromPaste)
_more_ |
void |
notifyGlyphMoveComplete(Glyph theGlyph)
_more_ |
void |
notifyGlyphMoved(Glyph theGlyph)
_more_ |
void |
paint(Graphics g)
_more_ |
void |
paintGrid(Graphics g)
|
void |
removeGlyph(Glyph g)
_more_ |
void |
removeSelection(Glyph g)
_more_ |
void |
repaint(Glyph g)
_more_ |
void |
select(Rectangle r)
_more_ |
void |
selectionChanged()
_more_ |
void |
setCanvasBackground(Color c)
_more_ |
protected void |
setGlyphs(List newGlyphs)
_more_ |
void |
setHighlight(Glyph g)
_more_ |
void |
setShowGrid(boolean value)
Set the ShowGrid property. |
int |
snap(int p)
|
Point |
transformInput(Point r)
_more_ |
Rectangle |
transformInput(Rectangle r)
_more_ |
int |
transformInputX(int x)
_more_ |
int |
transformInputY(int x)
_more_ |
Point |
transformOutput(Point r)
_more_ |
Rectangle |
transformOutput(Rectangle r)
_more_ |
int |
transformOutputX(int x)
_more_ |
int |
transformOutputY(int x)
_more_ |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String CMD_CREATE
public static final String CMD_TOFRONT
public static final String CMD_TOBACK
public static final String CMD_CHANGE
public static final String CMD_REMOVE
public static final String CMD_MOVE
public static final Cursor DEFAULT_CURSOR
public static final Cursor HAND_CURSOR
public static final Cursor MOVE_CURSOR
public static final Cursor TEXT_CURSOR
public static final Cursor NW_CURSOR
public int gridSpacing
public boolean showGrid
protected double scaleFactor
protected Color canvasBg
protected List glyphs
protected Glyph highlightedGlyph
| Constructor Detail |
|---|
public DisplayCanvas()
| Method Detail |
|---|
public void setCanvasBackground(Color c)
c - _more_protected List getGlyphs()
protected void setGlyphs(List newGlyphs)
newGlyphs - public boolean isFocusTraversable()
isFocusTraversable in class Componentpublic Component getContents()
public int snap(int p)
public void setShowGrid(boolean value)
value - The new value for ShowGridpublic boolean getShowGrid()
public void increaseGridSpacing()
public void decreaseGridSpacing()
protected Component doMakeContents()
public void paintGrid(Graphics g)
public void paint(Graphics g)
paint in class JComponentg -
public Glyph createGlyph(String glyphClass,
int x,
int y)
glyphClass - x - y -
public void repaint(Glyph g)
g - public void addGlyph(Glyph g)
g - public void select(Rectangle r)
r - public void selectionChanged()
public boolean hasSelection()
public void addSelection(Glyph g)
g - public boolean isSelected(Glyph g)
g -
public List getSelection()
public void clearSelection()
public void clearAll()
public void notifyGlyphMoved(Glyph theGlyph)
theGlyph - public void notifyGlyphMoveComplete(Glyph theGlyph)
theGlyph -
public void notifyGlyphCreateComplete(Glyph g,
boolean diddleSelection,
boolean fromPaste)
g - diddleSelection - fromPaste - public void notifyGlyphCreateComplete(Glyph g)
g - public void removeSelection(Glyph g)
g - public void justRemoveGlyph(Glyph g)
g - public void removeGlyph(Glyph g)
g - public void doRemove(Glyph g)
g - public void setHighlight(Glyph g)
g - public void glyphChanged(Glyph g)
g - public Image getImage(String path)
path -
public Glyph findGlyph(String id)
id -
public Glyph findGlyph(int x,
int y)
x - y -
public static Glyph findGlyph(List glyphs,
int x,
int y,
double threshold)
glyphs - x - y - threshold -
public void moveToFront(Glyph theGlyph)
theGlyph - public void moveToBack(Glyph theGlyph)
theGlyph - public int transformInputX(int x)
x -
public int transformInputY(int x)
x -
public int transformOutputX(int x)
x -
public int transformOutputY(int x)
x -
public Rectangle transformOutput(Rectangle r)
r -
public Rectangle transformInput(Rectangle r)
r -
public Point transformOutput(Point r)
r -
public Point transformInput(Point r)
r -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||