public class ActivityBarRenderer<A extends Activity> extends ActivityRenderer<A>
Modifier and Type | Class and Description |
---|---|
static class |
ActivityBarRenderer.TextPosition |
Constructor and Description |
---|
ActivityBarRenderer(GraphicsBase<?> graphics,
String name) |
Modifier and Type | Method and Description |
---|---|
javafx.beans.property.BooleanProperty |
autoFixTextProperty() |
javafx.beans.property.DoubleProperty |
barHeightProperty() |
protected ActivityBounds |
drawActivity(ActivityRef<A> activityRef,
Position position,
javafx.scene.canvas.GraphicsContext gc,
double x,
double y,
double w,
double h,
boolean selected,
boolean hover,
boolean highlighted,
boolean pressed) |
protected void |
drawBackground(ActivityRef<A> activityRef,
Position position,
javafx.scene.canvas.GraphicsContext gc,
double x,
double y,
double w,
double h,
boolean selected,
boolean hover,
boolean highlighted,
boolean pressed) |
protected void |
drawBorder(ActivityRef<A> activityRef,
Position position,
javafx.scene.canvas.GraphicsContext gc,
double x,
double y,
double w,
double h,
boolean selected,
boolean hover,
boolean highlighted,
boolean pressed) |
protected void |
drawText(ActivityRef<A> activityRef,
String text,
ActivityBarRenderer.TextPosition position,
javafx.scene.canvas.GraphicsContext gc,
double x,
double y,
double w,
double h,
boolean selected,
boolean hover,
boolean highlighted,
boolean pressed) |
javafx.beans.property.ObjectProperty<javafx.scene.text.Font> |
fontProperty() |
double |
getBarHeight() |
javafx.scene.text.Font |
getFont() |
javafx.scene.paint.Paint |
getTextFill() |
protected javafx.scene.paint.Paint |
getTextFill(boolean selected,
boolean hover,
boolean highlighted,
boolean pressed) |
javafx.scene.paint.Paint |
getTextFillHighlight() |
javafx.scene.paint.Paint |
getTextFillHover() |
javafx.scene.paint.Paint |
getTextFillPressed() |
javafx.scene.paint.Paint |
getTextFillSelected() |
double |
getTextGap() |
javafx.beans.property.BooleanProperty |
glossyProperty() |
boolean |
isAutoFixText() |
boolean |
isGlossy() |
protected boolean |
isTextVisible(String text,
ActivityBarRenderer.TextPosition position,
double availableWidth)
Determines if the given text for the given position will be drawn or not
depending on the available width.
|
void |
setAutoFixText(boolean auto) |
void |
setBarHeight(double height) |
void |
setFont(javafx.scene.text.Font font) |
void |
setGlossy(boolean glossy) |
void |
setTextFill(javafx.scene.paint.Paint fill) |
void |
setTextFillHighlight(javafx.scene.paint.Paint fill) |
void |
setTextFillHover(javafx.scene.paint.Paint fill) |
void |
setTextFillPressed(javafx.scene.paint.Paint fill) |
void |
setTextFillSelected(javafx.scene.paint.Paint fill) |
void |
setTextGap(double gap) |
javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> |
textFillHighlightProperty() |
javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> |
textFillHoverProperty() |
javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> |
textFillPressedProperty() |
javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> |
textFillProperty() |
javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> |
textFillSelectedProperty() |
javafx.beans.property.DoubleProperty |
textGapProperty() |
cornerRadiusProperty, cornersRoundedProperty, draw, getCornerRadius, getLineWidth, getStroke, getStroke, getStrokeHighlight, getStrokeHover, getStrokePressed, getStrokeSelected, isCornersRounded, lineWidthProperty, setCornerRadius, setCornersRounded, setLineWidth, setStroke, setStrokeHighlight, setStrokeHover, setStrokePressed, setStrokeSelected, strokeHighlightProperty, strokeHoverProperty, strokePressedProperty, strokeProperty, strokeSelectedProperty
fillHighlightProperty, fillHoverProperty, fillPressedProperty, fillProperty, fillSelectedProperty, getFill, getFill, getFillHighlight, getFillHover, getFillPressed, getFillSelected, getPadding, paddingProperty, setFill, setFillHighlight, setFillHover, setFillPressed, setFillSelected, setPadding
alphaProperty, disableRedrawAfterPropertyChange, enabledProperty, enableRedrawAfterPropertyChange, getAlpha, getGraphics, getLocation, getName, getTimeAt, isEnabled, isSnapToPixel, redrawObservable, setAlpha, setEnabled, setSnapToPixel, snapPositionX, snapPositionY, snapSizeX, snapSizeY, snapSpaceX, snapSpaceY, snapToPixelProperty
public ActivityBarRenderer(GraphicsBase<?> graphics, String name)
protected ActivityBounds drawActivity(ActivityRef<A> activityRef, Position position, javafx.scene.canvas.GraphicsContext gc, double x, double y, double w, double h, boolean selected, boolean hover, boolean highlighted, boolean pressed)
drawActivity
in class ActivityRenderer<A extends Activity>
protected void drawBackground(ActivityRef<A> activityRef, Position position, javafx.scene.canvas.GraphicsContext gc, double x, double y, double w, double h, boolean selected, boolean hover, boolean highlighted, boolean pressed)
drawBackground
in class ActivityRenderer<A extends Activity>
protected void drawBorder(ActivityRef<A> activityRef, Position position, javafx.scene.canvas.GraphicsContext gc, double x, double y, double w, double h, boolean selected, boolean hover, boolean highlighted, boolean pressed)
drawBorder
in class ActivityRenderer<A extends Activity>
protected void drawText(ActivityRef<A> activityRef, String text, ActivityBarRenderer.TextPosition position, javafx.scene.canvas.GraphicsContext gc, double x, double y, double w, double h, boolean selected, boolean hover, boolean highlighted, boolean pressed)
protected boolean isTextVisible(String text, ActivityBarRenderer.TextPosition position, double availableWidth)
text
- the text to drawposition
- the text positionavailableWidth
- the availble width of the entire activityprotected javafx.scene.paint.Paint getTextFill(boolean selected, boolean hover, boolean highlighted, boolean pressed)
public final javafx.beans.property.DoubleProperty barHeightProperty()
public final double getBarHeight()
public final void setBarHeight(double height)
public final javafx.beans.property.DoubleProperty textGapProperty()
public final void setTextGap(double gap)
public final double getTextGap()
public final javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> textFillProperty()
public final void setTextFill(javafx.scene.paint.Paint fill)
public final javafx.scene.paint.Paint getTextFill()
public final javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> textFillHoverProperty()
public final void setTextFillHover(javafx.scene.paint.Paint fill)
public final javafx.scene.paint.Paint getTextFillHover()
public final javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> textFillHighlightProperty()
public final void setTextFillHighlight(javafx.scene.paint.Paint fill)
public final javafx.scene.paint.Paint getTextFillHighlight()
public final javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> textFillPressedProperty()
public final void setTextFillPressed(javafx.scene.paint.Paint fill)
public final javafx.scene.paint.Paint getTextFillPressed()
public final javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> textFillSelectedProperty()
public final void setTextFillSelected(javafx.scene.paint.Paint fill)
public final javafx.scene.paint.Paint getTextFillSelected()
public final javafx.beans.property.ObjectProperty<javafx.scene.text.Font> fontProperty()
public final void setFont(javafx.scene.text.Font font)
public final javafx.scene.text.Font getFont()
public final javafx.beans.property.BooleanProperty glossyProperty()
public final void setGlossy(boolean glossy)
public final boolean isGlossy()
public final javafx.beans.property.BooleanProperty autoFixTextProperty()
public final void setAutoFixText(boolean auto)
public final boolean isAutoFixText()
Copyright © 2020 Dirk Lemmermann Software & Consulting. All rights reserved.