public class EventsRenderer extends Renderer
Note this also contains systems for coloring data in old schemes, such as the colorSpecifier interface and textSpecifier. These should not be used when a dataset will be sufficient.Events[:,BUNDLE_1=4] where the columns are: BUNDLE_1=startTime,stopTime,Color,Message startTime,stopTime are in some time location unit. stopTime may also be an offset from startTime (e.g. seconds) Color is an int, that is either 0xRRGGBB or 0xAARRGGBB. Message is any datum, so typically an enumeration unit is used.
Schemes.eventsList()
Modifier and Type | Class and Description |
---|---|
static interface |
EventsRenderer.ColorSpecifier |
static interface |
EventsRenderer.TextSpecifier |
Modifier and Type | Field and Description |
---|---|
static EventsRenderer.TextSpecifier |
DEFAULT_TEXT_SPECIFIER |
protected java.lang.String |
fontSize
fontSize allows the font to be rescaled.
|
protected boolean |
orbitMode
orbitMode true means don't show times, draw bars with 1-pixel breaks
|
static java.lang.String |
PROP_COLOR |
static java.lang.String |
PROP_COLOR_SPECIFIER |
static java.lang.String |
PROP_FONTSIZE |
static java.lang.String |
PROP_GANTTMODE |
static java.lang.String |
PROP_LINESTYLE |
static java.lang.String |
PROP_LINETHICK |
static java.lang.String |
PROP_MODE |
static java.lang.String |
PROP_OPAQUE |
static java.lang.String |
PROP_ORBITMODE |
static java.lang.String |
PROP_ROTATELABEL
rotate the label counter clockwise to make more room in orbitMode.
|
static java.lang.String |
PROP_SHOWLABELS |
protected boolean |
showLabels
true means draw the event label next to the bar.
|
bottomDecorator, colorBar, control, CONTROL_KEY_COLOR, CONTROL_KEY_COLOR_TABLE, CONTROL_KEY_DRAW_ERROR, CONTROL_KEY_FILL_COLOR, CONTROL_KEY_FILL_DIRECTION, CONTROL_KEY_FILL_TEXTURE, CONTROL_KEY_FONT_SIZE, CONTROL_KEY_LINE_STYLE, CONTROL_KEY_LINE_THICK, CONTROL_KEY_MODULO_X, CONTROL_KEY_MODULO_Y, CONTROL_KEY_REFERENCE, CONTROL_KEY_SPECIAL_COLORS, CONTROL_KEY_SYMBOL, CONTROL_KEY_SYMBOL_SIZE, drawLegendLabel, ds, firstValidIndex, id, lastException, lastValidIndex, legendLabel, MARKER_DATASET, MARKER_X_AXIS_RANGE, MARKER_Y_AXIS_RANGE, needWorkMarkers, PROP_ACTIVE, PROP_BOTTOMDECORATOR, PROP_COLORBAR, PROP_CONTROL, PROP_DRAWLEGENDLABEL, PROP_ID, PROP_LEGENDLABEL, PROP_RECORDFILE, PROP_TOPDECORATOR, propertyChangeSupport, renderException, topDecorator
Constructor and Description |
---|
EventsRenderer() |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptContext(int x,
int y)
Returns true if the render will accept the context for a point.
|
static QDataSet |
doAutorange(QDataSet ds)
return bounding cube
|
java.awt.Color |
getColor() |
EventsRenderer.ColorSpecifier |
getColorSpecifier() |
java.lang.String |
getControl()
get the string which summarizes the state of the renderer.
|
java.lang.String |
getFontSize() |
PsymConnector |
getLineStyle() |
java.lang.String |
getLineThick()
the line thickness, examples include "5pt" and "0.1em"
|
javax.swing.Icon |
getListIcon()
An icon can be provided that will be shown in a list
along with the textual description of the element.
|
java.lang.String |
getMode() |
int |
getRenderTimeLimitMs() |
int |
getRotateLabel() |
EventsRenderer.TextSpecifier |
getTextSpecifier()
Getter for property textSpecifier.
|
protected void |
installRenderer() |
boolean |
isGanttMode() |
boolean |
isOpaque() |
boolean |
isOrbitMode() |
boolean |
isShowLabels() |
void |
render(java.awt.Graphics2D g1,
DasAxis xAxis,
DasAxis yAxis)
Render is called whenever the image needs to be refreshed or the content
has changed.
|
void |
setColor(java.awt.Color color)
set the color to use when the data doesn't specify a color.
|
void |
setColorSpecifier(EventsRenderer.ColorSpecifier spec)
set this to be an object implementing ColorSpecifier interface, if more than
one color is to be used when drawing the bars.
|
void |
setControl(java.lang.String s)
set the control string which contains a number of properties.
|
void |
setDataSet(QDataSet ds)
Set the dataset to be plotted.
|
void |
setFontSize(java.lang.String fontSize) |
void |
setGanttMode(boolean ganttMode) |
void |
setLineStyle(PsymConnector lineStyle) |
void |
setLineThick(java.lang.String lineThick) |
void |
setMode(java.lang.String mode)
if non-empty, then use this named mode
|
void |
setOpaque(boolean opaque) |
void |
setOrbitMode(boolean orbitMode) |
void |
setRenderTimeLimitMs(int renderTimeLimitMs) |
void |
setRotateLabel(int rotateLabel) |
void |
setShowLabels(boolean showLabels) |
void |
setTextSpecifier(EventsRenderer.TextSpecifier textSpecifier)
Setter for property textSpecifier.
|
protected void |
uninstallRenderer() |
acceptsDataSet, addPropertyChangeListener, addPropertyChangeListener, addToStats, decodeDatum, decodeFillStyle, decodePlotSymbolConnectorControl, decodePlotSymbolControl, drawListIcon, encodeBooleanControl, encodeColorControl, encodeDatum, encodeFillStyle, encodePlotSymbolConnectorControl, encodePlotSymbolControl, formatControl, getAffineTransform, getBooleanControl, getBottomDecorator, getColorBar, getColorControl, getConsumedDataSet, getControl, getDataLoader, getDataSet, getDataSetDescriptor, getDataSetID, getDatumControl, getDoubleArrayControl, getDoubleControl, getId, getIntegerControl, getInternalDataSet, getLastException, getLegendLabel, getListLabel, getParent, getRenderCount, getStatsFile, getTopDecorator, getUpdateCount, getXmemento, getYmemento, hasControl, incrementRenderCount, incrementUpdateCount, invalidateParentCacheImage, isActive, isDrawLegendLabel, isDumpDataSet, isTableDataSet, parseControl, parseLayoutString, postException, postMessage, postMessage, refresh, refreshImage, removePropertyChangeListener, removePropertyChangeListener, renderException, resetCounters, setActive, setBottomDecorator, setColorBar, setDataSetDescriptor, setDataSetID, setDataSetLoader, setDrawLegendLabel, setDumpDataSet, setException, setId, setLastException, setLegendLabel, setParent, setStatsFile, setTopDecorator, setUpFont, setUpFont, update, updateCacheImage, updateImmediately, updatePlotImage
public static final java.lang.String PROP_COLOR
public static final EventsRenderer.TextSpecifier DEFAULT_TEXT_SPECIFIER
public static final java.lang.String PROP_LINESTYLE
public static final java.lang.String PROP_LINETHICK
public static final java.lang.String PROP_OPAQUE
protected boolean showLabels
public static final java.lang.String PROP_SHOWLABELS
public static final java.lang.String PROP_MODE
protected boolean orbitMode
public static final java.lang.String PROP_ORBITMODE
public static final java.lang.String PROP_GANTTMODE
public static final java.lang.String PROP_ROTATELABEL
protected java.lang.String fontSize
public static final java.lang.String PROP_FONTSIZE
public static final java.lang.String PROP_COLOR_SPECIFIER
public static QDataSet doAutorange(QDataSet ds)
ds
- public boolean acceptContext(int x, int y)
Renderer
acceptContext
in class Renderer
x
- the x coordinate in the canvas coordinate system.y
- the y coordinate in the canvas coordinate system.protected void installRenderer()
installRenderer
in class Renderer
protected void uninstallRenderer()
uninstallRenderer
in class Renderer
public void render(java.awt.Graphics2D g1, DasAxis xAxis, DasAxis yAxis)
Renderer
public void setDataSet(QDataSet ds)
Renderer
setDataSet
in class Renderer
public javax.swing.Icon getListIcon()
Displayable
null
if there
is no icon available, or a roughly 16x16 pixel icon.getListIcon
in interface Displayable
getListIcon
in class Renderer
public void setControl(java.lang.String s)
Renderer
setControl
in class Renderer
s
- the controletc
public java.lang.String getControl()
Renderer
getControl
in class Renderer
public java.awt.Color getColor()
public PsymConnector getLineStyle()
public void setLineStyle(PsymConnector lineStyle)
public java.lang.String getLineThick()
public void setLineThick(java.lang.String lineThick)
public boolean isOpaque()
public void setOpaque(boolean opaque)
public void setColor(java.awt.Color color)
color
- public int getRenderTimeLimitMs()
public void setRenderTimeLimitMs(int renderTimeLimitMs)
public boolean isShowLabels()
public void setShowLabels(boolean showLabels)
public java.lang.String getMode()
public void setMode(java.lang.String mode)
mode
- public boolean isOrbitMode()
public void setOrbitMode(boolean orbitMode)
public boolean isGanttMode()
public void setGanttMode(boolean ganttMode)
public int getRotateLabel()
public void setRotateLabel(int rotateLabel)
public java.lang.String getFontSize()
public void setFontSize(java.lang.String fontSize)
public void setColorSpecifier(EventsRenderer.ColorSpecifier spec)
spec
- the color specifier.public EventsRenderer.ColorSpecifier getColorSpecifier()
public EventsRenderer.TextSpecifier getTextSpecifier()
public void setTextSpecifier(EventsRenderer.TextSpecifier textSpecifier)
textSpecifier
- New value of property textSpecifier.