public class DLabel extends Displayable implements VectorData
Displayable.DataPackage, Displayable.DoEdit, Displayable.DoEdits, Displayable.DoTransforms, Displayable.SliderListener| Modifier and Type | Field and Description |
|---|---|
static int |
ARROW |
static int |
DOT |
static int |
TEXT |
alpha, annotation, at, color, COMPOSITE_ADD, COMPOSITE_COLOR_YCBCR, COMPOSITE_DIFFERENCE, COMPOSITE_MULTIPLY, COMPOSITE_NORMAL, COMPOSITE_SUBTRACT, compositeModes, height, hs_linked, last_color, layer, linked_props, linked_props_origins, locked, props, TAG_ATTR1, TAG_ATTR2, title, visible, width| Constructor and Description |
|---|
DLabel(Project project,
long id,
HashMap<String,String> ht,
HashMap<Displayable,String> ht_links)
To reconstruct from an XML entry.
|
DLabel(Project project,
long id,
String text,
float width,
float height,
int type,
String font_name,
int font_style,
int font_size,
boolean locked,
AffineTransform at)
For reconstruction purposes.
|
DLabel(Project project,
String text,
double x,
double y) |
| Modifier and Type | Method and Description |
|---|---|
void |
adjustProperties()
Shows a dialog to adjust properties of this object.
|
boolean |
apply(Layer la,
Area roi,
CoordinateTransform ict)
Applies the 2D transform @ict (which is expected to operate on the
world coordinates version of the data contained here) only to the
data that falls within the @param roi (in world coords), and then
recomputes the bounding box and affine transform (to a translation
or identity).
|
boolean |
apply(VectorDataTransform vdt) |
DLabel |
clone(Project pr,
boolean copy_id)
Performs a deep copy of this object, except for the Layer pointer.
|
void |
edit() |
static void |
exportDTD(StringBuilder sb_header,
HashSet<String> hs,
String indent) |
void |
exportXML(StringBuilder sb_body,
String indent,
XMLOptions options)
The oid is this objects' id, whereas the 'id' tag will be the id of the wrapper Thing object.
|
void |
flush() |
Rectangle |
getBoundingBox(Rectangle r)
Saves one allocation, returns the same Rectangle, modified (or a new one if null).
|
Font |
getFont() |
Polygon |
getPerimeter()
Subclasses can override this method to provide the exact contour, otherwise it returns the transformed bounding box of the data.
|
Polygon |
getPerimeter(int w,
int n,
int e,
int s)
Returns the perimeter enlarged in all West, North, East and South directions, in pixels.
|
String |
getShortTitle()
Sublcasses can override this method to provide a proper String, otherwise calls getTitle()
|
int |
getType() |
boolean |
isDeletable() |
void |
keyPressed(KeyEvent ke) |
void |
mouseDragged(MouseEvent me,
Layer layer,
int x_p,
int y_p,
int x_d,
int y_d,
int x_d_old,
int y_d_old) |
void |
mousePressed(MouseEvent me,
Layer layer,
int x_p,
int y_p,
double mag) |
void |
mouseReleased(MouseEvent me,
Layer layer,
int x_p,
int y_p,
int x_d,
int y_d,
int x_r,
int y_r) |
void |
paint(Graphics2D g,
Rectangle srcRect,
double magnification,
boolean active,
int channels,
Layer active_layer,
List<Layer> layers) |
void |
setText(String title,
boolean update) |
void |
setTitle(String title)
Does not accept null or zero-length titles.
|
void |
setType(int type) |
String |
toString()
Minimal info that identifies this object as unique, for display on a JTree node.
|
areThereLayerCrossLinks, canSendTo, clone, clone, commonDTDChildren, contains, contains, deselect, destroy, displacePoints, exportDTD, exportSVG, findById, findNearestPoint, findNearestPoint, getAffineTransform, getAffineTransformCopy, getAlpha, getAnnotation, getArea, getAreaAt, getAreaForBucket, getBoundingBox, getBoundingBox, getBounds, getBounds, getBucketable, getColor, getComposite, getComposite, getCompositeMode, getHeight, getIntersection, getLayer, getLayerIds, getLayerSet, getLayersWithData, getLinked, getLinked, getLinkedBox, getLinkedGroup, getLinkedProperties, getLinkedProperties, getLinkedProperty, getLinkedProperty, getMinimalBoundingBox, getNameId, getProperties, getProperty, getProperty, getTitle, getWidth, getX, getXMLSafeValue, getXMLSafeValue, getY, hasLinkedGroupWithinLayer, hasProperties, intersects, intersects, intersects, intersects, inverseTransformPoint, isLinked, isLinked, isLinked, isLocked, isLocked2, isOnlyLinkedTo, isOnlyLinkedTo, isOutOfRepaintingClip, isOutOfRepaintingClip, isRoughlyInside, isVisible, link, link, linkPatches, makeAdjustPropertiesDialog, measure, mouseWheelMoved, paintAsBox, paintOffscreen, paintSnapshot, preConcatenate, prePaint, preTransform, processAdjustPropertiesDialog, remove, remove2, removeLinkedProperties, removeLinkedPropertiesFromOrigins, repaint, restXML, rotate, rotate, rotatePoints, scale, scale, scalePoints, setAffineTransform, setAlpha, setAlpha, setAnnotation, setColor, setCompositeMode, setDimensions, setDimensions, setLayer, setLayer, setLinkedProperties, setLinkedProperty, setLocation, setLocked, setProperty, setVisible, setVisible, snapTo, softRemove, transform, transformPoint, transformPoint, transformPoints, transformPoints, transformPoints, transformPoints, transformPoints, transformPoints, transformPoints, transformPoints, transformPoints, transformRectangle, translate, translate, unlink, unlink, unlinkAll, updateBucket, updateInDatabase, xmlError, xmlErroraddToDatabase, getId, getInfo, getProject, getUniqueIdentifier, removeFromDatabase, updateInDatabasepublic static final int TEXT
public static final int ARROW
public static final int DOT
public DLabel(Project project, long id, String text, float width, float height, int type, String font_name, int font_style, int font_size, boolean locked, AffineTransform at)
public int getType()
public Font getFont()
public void flush()
public void setTitle(String title)
DisplayablesetTitle in class Displayablepublic void setText(String title, boolean update)
public String getShortTitle()
DBObjectgetShortTitle in class Displayablepublic String toString()
DisplayabletoString in class Displayablepublic void setType(int type)
public void paint(Graphics2D g, Rectangle srcRect, double magnification, boolean active, int channels, Layer active_layer, List<Layer> layers)
paint in interface Paintablepaint in class Displayablepublic Rectangle getBoundingBox(Rectangle r)
getBoundingBox in class Displayablepublic Polygon getPerimeter()
DisplayablegetPerimeter in class Displayablepublic Polygon getPerimeter(int w, int n, int e, int s)
getPerimeter in class Displayablepublic void mousePressed(MouseEvent me, Layer layer, int x_p, int y_p, double mag)
mousePressed in class Displayablepublic void mouseDragged(MouseEvent me, Layer layer, int x_p, int y_p, int x_d, int y_d, int x_d_old, int y_d_old)
mouseDragged in class Displayablepublic void mouseReleased(MouseEvent me, Layer layer, int x_p, int y_p, int x_d, int y_d, int x_r, int y_r)
mouseReleased in class Displayablepublic boolean isDeletable()
isDeletable in class Displayablepublic void keyPressed(KeyEvent ke)
keyPressed in class Displayablepublic void edit()
public void exportXML(StringBuilder sb_body, String indent, XMLOptions options)
DisplayableexportXML in class Displayablepublic static void exportDTD(StringBuilder sb_header, HashSet<String> hs, String indent)
public void adjustProperties()
DisplayableadjustProperties in class Displayablepublic DLabel clone(Project pr, boolean copy_id)
clone in class Displayablepublic boolean apply(Layer la, Area roi, CoordinateTransform ict) throws Exception
VectorDataapply in interface VectorDatala - Only data at this Layer may be transformed.roi - Only data inside this world-coordinates Area may be transformed.ict - The transform to apply to the data that is in @param la and within @param roi.Exceptionpublic boolean apply(VectorDataTransform vdt) throws Exception
apply in interface VectorDataExceptionCopyright © 2015–2021 Fiji. All rights reserved.