public class DasAnnotation extends DasCanvasComponent
| Modifier and Type | Class and Description |
|---|---|
static class |
DasAnnotation.DatumPairPointDescriptor
create a PointDescriptor using and x and y Datum.
|
static interface |
DasAnnotation.PointDescriptor
something to point at
|
DasCanvasComponent.CanvasComponentActionjavax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PROP_ANCHORBORDERTYPE |
static java.lang.String |
PROP_ANCHOROFFSET |
static java.lang.String |
PROP_ANCHORPOSITION |
static java.lang.String |
PROP_ANCHORTYPE |
static java.lang.String |
PROP_ARROWSTYLE |
static java.lang.String |
PROP_BORDERTYPE |
static java.lang.String |
PROP_FONT_SIZE
the font size in pixels.
|
static java.lang.String |
PROP_OVERRIDECOLORS |
static java.lang.String |
PROP_POINTATX |
static java.lang.String |
PROP_POINTATY |
static java.lang.String |
PROP_SHOWARROW |
static java.lang.String |
PROP_TEXT |
static java.lang.String |
PROP_TEXTCOLOR |
static java.lang.String |
PROP_URL |
static java.lang.String |
PROP_XRANGE |
static java.lang.String |
PROP_YRANGE |
mouseAdapter, PROPERTIES_ACTIONlistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
DasAnnotation(java.lang.String string)
Create the annotation
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptContext(int x,
int y)
returns true if the component is suitable context for the point.
|
boolean |
contains(int x,
int y)
This item should only accept mouse events on the bubble
|
java.awt.Shape |
getActiveRegion()
returns the active region of the canvas component, which is not necessarily the bounds.
|
BorderType |
getAnchorBorderType() |
java.lang.String |
getAnchorOffset() |
AnchorPosition |
getAnchorPosition()
get the location within the box where the annotation will be drawn.
|
AnchorType |
getAnchorType() |
Arrow.HeadStyle |
getArrowStyle()
get the arrow style
|
BorderType |
getBorderType()
the border type
|
float |
getFontSize()
the font size in points.
|
DasAnnotation.PointDescriptor |
getPointAt()
return the thing we are pointing at.
|
Datum |
getPointAtX() |
Datum |
getPointAtY() |
java.lang.String |
getText()
get the text, which can be Granny Text.
|
java.awt.Color |
getTextColor() |
java.lang.String |
getUrl() |
DatumRange |
getXrange() |
DatumRange |
getYrange() |
protected void |
installComponent()
currently does nothing.
|
boolean |
isOverrideColors() |
boolean |
isShowArrow() |
void |
paintComponent(java.awt.Graphics g1) |
void |
resize()
Called by the DasCanvas layout manager to request this component
to set its bounds.
|
void |
setAnchorBorderType(BorderType anchorBorderType) |
void |
setAnchorOffset(java.lang.String anchorOffset)
the offset in x and y for the text bubble from the anchor.
|
void |
setAnchorPosition(AnchorPosition anchorPosition)
set the location within the box where the annotation will be drawn.
|
void |
setAnchorType(AnchorType anchorType) |
void |
setArrowStyle(Arrow.HeadStyle newarrowStyle)
set the arrow style to BIG,SMALL,DRAFTING.
|
void |
setBorderType(BorderType newborderType)
set the border type to NONE, rounded rectangle, etc.
|
void |
setFontSize(float fontSize)
override the canvas font size.
|
void |
setOverrideColors(boolean overrideColors)
true will use the colors specified, otherwise the canvas colors are used.
|
void |
setPlot(DasPlot p) |
void |
setPointAt(DasAnnotation.PointDescriptor p)
set the thing to point at.
|
void |
setPointAtX(Datum pointAtX) |
void |
setPointAtY(Datum pointAtY) |
void |
setShowArrow(boolean showArrow) |
void |
setText(java.lang.String string)
Set the text, which can be Granny Text, or image URL.
|
void |
setTextColor(java.awt.Color textColor)
the color of the text, or if transparent then the border
color should be used.
|
void |
setUrl(java.lang.String url)
set the URL to the location of a png or jpg file.
|
void |
setXrange(DatumRange xrange) |
void |
setYrange(DatumRange yrange) |
addMouseModule, coalesceEvents, getActions, getCanvas, getColumn, getDasMouseInputAdapter, getDasName, getEmSize, getFont, getRow, processDasUpdateEvent, processEvent, removeMouseModule, setColumn, setDasName, setRow, showProperties, toString, uninstallComponent, update, updateImmediatelyaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUIadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCyclepublic static final java.lang.String PROP_TEXT
public static final java.lang.String PROP_URL
public static final java.lang.String PROP_FONT_SIZE
public static final java.lang.String PROP_BORDERTYPE
public static final java.lang.String PROP_ANCHORPOSITION
public static final java.lang.String PROP_XRANGE
public static final java.lang.String PROP_YRANGE
public static final java.lang.String PROP_POINTATX
public static final java.lang.String PROP_POINTATY
public static final java.lang.String PROP_SHOWARROW
public static final java.lang.String PROP_ANCHORBORDERTYPE
public static final java.lang.String PROP_ANCHORTYPE
public static final java.lang.String PROP_ARROWSTYLE
public static final java.lang.String PROP_OVERRIDECOLORS
public static final java.lang.String PROP_TEXTCOLOR
public static final java.lang.String PROP_ANCHOROFFSET
public DasAnnotation(java.lang.String string)
string - the message, which may contain %p which will be replaced with a label.public void setText(java.lang.String string)
string - the textGrannyTextRendererpublic java.lang.String getText()
GrannyTextRendererpublic java.lang.String getUrl()
public void setUrl(java.lang.String url)
url - public void resize()
DasCanvasComponentresize in class DasCanvasComponentpublic java.awt.Shape getActiveRegion()
DasCanvasComponentgetActiveRegion in class DasCanvasComponentpublic boolean acceptContext(int x,
int y)
DasCanvasComponentacceptContext in class DasCanvasComponentx - the x location on the canvas, with (0,0) being the upper-left corner.y - the y location on the canvas, with (0,0) being the upper-left corner.public boolean contains(int x,
int y)
contains in class javax.swing.JComponentx - y - public void paintComponent(java.awt.Graphics g1)
paintComponent in class javax.swing.JComponentpublic void setPointAt(DasAnnotation.PointDescriptor p)
p - the thing.public DasAnnotation.PointDescriptor getPointAt()
protected void installComponent()
DasCanvasComponentinstallComponent in class DasCanvasComponentpublic float getFontSize()
public void setFontSize(float fontSize)
fontSize - New value of property fontSize.public BorderType getBorderType()
public void setBorderType(BorderType newborderType)
newborderType - the border typepublic AnchorPosition getAnchorPosition()
public void setAnchorPosition(AnchorPosition anchorPosition)
anchorPosition - public void setPlot(DasPlot p)
public DatumRange getXrange()
public void setXrange(DatumRange xrange)
public DatumRange getYrange()
public void setYrange(DatumRange yrange)
public Datum getPointAtX()
public void setPointAtX(Datum pointAtX)
public Datum getPointAtY()
public void setPointAtY(Datum pointAtY)
public boolean isShowArrow()
public void setShowArrow(boolean showArrow)
public BorderType getAnchorBorderType()
public void setAnchorBorderType(BorderType anchorBorderType)
public AnchorType getAnchorType()
public void setAnchorType(AnchorType anchorType)
public Arrow.HeadStyle getArrowStyle()
public void setArrowStyle(Arrow.HeadStyle newarrowStyle)
newarrowStyle - the arrow stylepublic boolean isOverrideColors()
public void setOverrideColors(boolean overrideColors)
overrideColors - public java.awt.Color getTextColor()
public void setTextColor(java.awt.Color textColor)
textColor - public java.lang.String getAnchorOffset()
public void setAnchorOffset(java.lang.String anchorOffset)
anchorOffset -