|
||||||||||
| 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
ucar.unidata.ui.drawing.EditCanvas
public class EditCanvas
| Nested Class Summary | |
|---|---|
static class |
EditCanvas.ShapeDescriptor
Class ShapeDescriptor _more_ |
| 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 | |
|---|---|
static String |
CMD_ALIGN_BOTTOM
_more_ |
static String |
CMD_ALIGN_CENTER
_more_ |
static String |
CMD_ALIGN_LEFT
_more_ |
static String |
CMD_ALIGN_MIDDLE
_more_ |
static String |
CMD_ALIGN_PREFIX
_more_ |
static String |
CMD_ALIGN_RIGHT
_more_ |
static String |
CMD_ALIGN_TOP
_more_ |
static String |
CMD_EDIT_COPY
_more_ |
static String |
CMD_EDIT_CUT
_more_ |
static String |
CMD_EDIT_GROUP
_more_ |
static String |
CMD_EDIT_PASTE
_more_ |
static String |
CMD_EDIT_SELECTALL
_more_ |
static String |
CMD_EDIT_TOBACK
_more_ |
static String |
CMD_EDIT_TOFRONT
_more_ |
static String |
CMD_EDIT_UNGROUP
_more_ |
static String |
CMD_SNAP
|
static String |
CMD_SPACE_H
|
static String |
CMD_SPACE_V
|
static String |
CMD_ZOOMIN
_more_ |
static String |
CMD_ZOOMOUT
_more_ |
static String |
CMD_ZOOMRESET
_more_ |
| Fields inherited from class ucar.unidata.ui.drawing.DisplayCanvas |
|---|
canvasBg, CMD_CHANGE, CMD_CREATE, CMD_MOVE, CMD_REMOVE, CMD_TOBACK, CMD_TOFRONT, DEFAULT_CURSOR, glyphs, gridSpacing, HAND_CURSOR, highlightedGlyph, MOVE_CURSOR, NW_CURSOR, scaleFactor, showGrid, TEXT_CURSOR |
| 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 | |
|---|---|
EditCanvas()
_more_ |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent event)
_more_ |
List |
cloneGlyphs(List from)
_more_ |
void |
doAlign(String cmd)
Align the set of selected glyphs with the given command (e.g., align.top, align.bottom, etc.) |
void |
doCopy()
_more_ |
void |
doCut()
_more_ |
protected void |
doDoubleClick(Glyph nearestGlyph)
_more_ |
boolean |
doGroup()
|
protected Component |
doMakeContents()
_more_ |
List |
doMakeMenuItems(Glyph g,
List l)
/** _more_ |
Component |
doMakePalette()
Create the Glyph creation palette |
JToolBar |
doMakeToolbar(JToolBar toolbar)
_more_ |
void |
doPaste()
_more_ |
void |
doPaste(List l,
int x,
int y)
Paste the given vector of glyphs. |
void |
doToBack()
_more_ |
void |
doToFront()
_more_ |
protected void |
doZoomIn()
zoom in |
protected void |
doZoomOut()
zoom out |
void |
focusGained(FocusEvent e)
_more_ |
void |
focusLost(FocusEvent e)
_more_ |
boolean |
getHaveChanged()
_more_ |
protected JComponent |
getLabelComponent()
_more_ |
JMenuBar |
getMenuBar()
_more_ |
List |
getShapeDescriptors()
_more_ |
void |
group()
_more_ |
boolean |
haveCommand()
_more_ |
void |
initMenuBar(JMenuBar menuBar)
_more_ |
void |
keyPressed(KeyEvent evt)
_more_ |
void |
keyReleased(KeyEvent e)
_more_ |
void |
keyTyped(KeyEvent evt)
_more_ |
void |
loadXml(Element root)
_more_ |
EditCanvas.ShapeDescriptor |
makeDescriptor(String className,
String name,
String iconName,
String attrs)
_more_ |
JMenu |
makeEditMenu()
_more_ |
JMenu |
makeEditMenu(JMenu editMenu)
_more_ |
protected JMenuItem |
makeMenuItem(String label,
char mnem,
String command)
_more_ |
protected JMenuItem |
makeMenuItem(String label,
String command)
_more_ |
protected JMenuItem |
makeSelectionMenuItem(String label,
char mnem,
String command,
boolean enabled)
_more_ |
JMenu |
makeViewMenu()
_more_ |
JMenu |
makeViewMenu(JMenu viewMenu)
_more_ |
void |
mouseClicked(MouseEvent event)
Handle mouse click events. |
void |
mouseDragged(MouseEvent e)
_more_ |
void |
mouseEntered(MouseEvent e)
Handle mouse entered events. |
void |
mouseExited(MouseEvent e)
Handle mouse exited events. |
void |
mouseMoved(MouseEvent e)
Handle mouse moved events. |
void |
mousePressed(MouseEvent e)
_more_ |
boolean |
mousePressedInner(MouseEvent e)
_more_ |
void |
mouseReleased(MouseEvent e)
_more_ |
void |
notifyGlyphChanged(Glyph theGlyph,
String attr)
_more_ |
void |
notifyGlyphChangeDone(Glyph theGlyph,
String attr)
_more_ |
void |
notifyGlyphCreateComplete(Glyph g,
boolean diddleSelection,
boolean fromPaste)
_more_ |
void |
notifyGlyphMoveComplete(Glyph theGlyph)
_more_ |
void |
notifyGlyphMoved(Glyph theGlyph)
We have these hooks here so that derived classes can do things based on glyph events (e.g., tell the whiteboard server that a Glyph moved |
boolean |
okToPaintHighlight()
_more_ |
void |
paint(Graphics g)
Called from the base class. |
void |
selectAll()
_more_ |
void |
selectionChanged()
_more_ |
void |
setColor(Glyph g,
boolean foreground)
Set the color of the glyph from a color chooser dialog. |
void |
setColor(Glyph g,
boolean foreground,
Color newColor)
Set the color of the glyph from a color chooser dialog. |
void |
setCommand(CanvasCommand newCommand)
_more_ |
void |
setDefaultCursor()
_more_ |
void |
setHaveChanged(boolean v)
_more_ |
boolean |
showTextInPalette()
_more_ |
void |
snapToGrid()
|
void |
spaceH()
|
void |
spaceV()
|
void |
togglePressed(JToggleButton pressed)
_more_ |
void |
unGroup()
_more_ |
| Methods inherited from class ucar.unidata.ui.drawing.DisplayCanvas |
|---|
addGlyph, addSelection, clearAll, clearSelection, createGlyph, decreaseGridSpacing, doRemove, findGlyph, findGlyph, findGlyph, getContents, getGlyphs, getImage, getSelection, getShowGrid, glyphChanged, hasSelection, increaseGridSpacing, isFocusTraversable, isSelected, justRemoveGlyph, moveToBack, moveToFront, notifyGlyphCreateComplete, paintGrid, removeGlyph, removeSelection, repaint, select, setCanvasBackground, setGlyphs, setHighlight, setShowGrid, snap, transformInput, transformInput, transformInputX, transformInputY, transformOutput, transformOutput, transformOutputX, transformOutputY |
| 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_ZOOMIN
public static final String CMD_ZOOMOUT
public static final String CMD_ZOOMRESET
public static final String CMD_EDIT_CUT
public static final String CMD_EDIT_COPY
public static final String CMD_EDIT_PASTE
public static final String CMD_EDIT_SELECTALL
public static final String CMD_EDIT_GROUP
public static final String CMD_EDIT_UNGROUP
public static final String CMD_EDIT_TOFRONT
public static final String CMD_EDIT_TOBACK
public static final String CMD_ALIGN_PREFIX
public static final String CMD_ALIGN_TOP
public static final String CMD_ALIGN_CENTER
public static final String CMD_ALIGN_BOTTOM
public static final String CMD_ALIGN_LEFT
public static final String CMD_ALIGN_MIDDLE
public static final String CMD_ALIGN_RIGHT
public static final String CMD_SPACE_H
public static final String CMD_SPACE_V
public static final String CMD_SNAP
| Constructor Detail |
|---|
public EditCanvas()
| Method Detail |
|---|
public void setDefaultCursor()
public boolean okToPaintHighlight()
public void paint(Graphics g)
paint in class DisplayCanvasg - public boolean haveCommand()
public boolean getHaveChanged()
public void setHaveChanged(boolean v)
v - public void setCommand(CanvasCommand newCommand)
newCommand - public void notifyGlyphMoved(Glyph theGlyph)
notifyGlyphMoved in class DisplayCanvastheGlyph - public void notifyGlyphMoveComplete(Glyph theGlyph)
notifyGlyphMoveComplete in class DisplayCanvastheGlyph -
public void notifyGlyphChanged(Glyph theGlyph,
String attr)
theGlyph - attr -
public void notifyGlyphChangeDone(Glyph theGlyph,
String attr)
theGlyph - attr -
public void notifyGlyphCreateComplete(Glyph g,
boolean diddleSelection,
boolean fromPaste)
notifyGlyphCreateComplete in class DisplayCanvasg - diddleSelection - fromPaste - public void focusGained(FocusEvent e)
focusGained in interface FocusListenere - public void focusLost(FocusEvent e)
focusLost in interface FocusListenere - public void keyReleased(KeyEvent e)
keyReleased in interface KeyListenere - public void keyTyped(KeyEvent evt)
keyTyped in interface KeyListenerevt - public void keyPressed(KeyEvent evt)
keyPressed in interface KeyListenerevt -
protected JMenuItem makeSelectionMenuItem(String label,
char mnem,
String command,
boolean enabled)
label - mnem - command - enabled -
protected JMenuItem makeMenuItem(String label,
char mnem,
String command)
label - mnem - command -
protected JMenuItem makeMenuItem(String label,
String command)
label - command -
public JMenu makeEditMenu()
public JMenu makeViewMenu()
public void selectionChanged()
selectionChanged in class DisplayCanvaspublic JMenu makeEditMenu(JMenu editMenu)
editMenu -
public JMenu makeViewMenu(JMenu viewMenu)
viewMenu -
public boolean doGroup()
protected void doZoomIn()
protected void doZoomOut()
public void actionPerformed(ActionEvent event)
actionPerformed in interface ActionListenerevent - public void group()
public void unGroup()
public void doPaste(List l,
int x,
int y)
l - x - y - public void doPaste()
public List cloneGlyphs(List from)
from -
public void doToFront()
public void doToBack()
public void doCopy()
public void doCut()
public void selectAll()
public void spaceH()
public void spaceV()
public void doAlign(String cmd)
cmd - public void snapToGrid()
public List doMakeMenuItems(Glyph g,
List l)
g - l -
public void setColor(Glyph g,
boolean foreground)
g - Glyph to color.foreground - true if the color is for the foreground
public void setColor(Glyph g,
boolean foreground,
Color newColor)
g - Glyph to color.foreground - true if the color is for the foregroundnewColor - new Color for this Glyphpublic void mouseClicked(MouseEvent event)
mouseClicked in interface MouseListenerevent - MouseEventpublic void mouseEntered(MouseEvent e)
mouseEntered in interface MouseListenere - MouseEventpublic void mouseExited(MouseEvent e)
mouseExited in interface MouseListenere - MouseEventpublic void mouseMoved(MouseEvent e)
mouseMoved in interface MouseMotionListenere - MouseEventpublic List getShapeDescriptors()
public JMenuBar getMenuBar()
protected Component doMakeContents()
doMakeContents in class DisplayCanvasprotected JComponent getLabelComponent()
public void initMenuBar(JMenuBar menuBar)
menuBar - public void togglePressed(JToggleButton pressed)
pressed - public JToolBar doMakeToolbar(JToolBar toolbar)
toolbar -
public Component doMakePalette()
public boolean showTextInPalette()
public void mousePressed(MouseEvent e)
mousePressed in interface MouseListenere - protected void doDoubleClick(Glyph nearestGlyph)
nearestGlyph - _more_public boolean mousePressedInner(MouseEvent e)
e -
public void mouseDragged(MouseEvent e)
mouseDragged in interface MouseMotionListenere - public void loadXml(Element root)
root - public void mouseReleased(MouseEvent e)
mouseReleased in interface MouseListenere -
public EditCanvas.ShapeDescriptor makeDescriptor(String className,
String name,
String iconName,
String attrs)
className - _more_name - _more_iconName - _more_attrs - _more_
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||