Search in sources :

Example 1 with LineThickness

use of com.efficios.jabberwocky.views.timegraph.model.render.LineThickness in project lttng-scope by lttng.

the class StateRectangle method updatePaint.

public void updatePaint() {
    /* Set a special paint for multi-state intervals */
    if (fInterval.isMultiState()) {
        Paint multiStatePaint = fWidget.getDebugOptions().multiStatePaint.get();
        fBaseColor = multiStatePaint;
        fSelectedColor = multiStatePaint;
    } else {
        fBaseColor = JfxColorFactory.getColorFromDef(fInterval.getColorDefinition().get());
        fSelectedColor = JfxColorFactory.getDerivedColorFromDef(fInterval.getColorDefinition().get());
    }
    setFill(fBaseColor);
    /* Update the line thickness */
    LineThickness lt = fInterval.getLineThickness().get();
    double height = getHeightFromThickness(lt);
    setHeight(height);
    /* We need to adjust the y position too */
    setY(computeY(height));
}
Also used : LineThickness(com.efficios.jabberwocky.views.timegraph.model.render.LineThickness) Paint(javafx.scene.paint.Paint)

Aggregations

LineThickness (com.efficios.jabberwocky.views.timegraph.model.render.LineThickness)1 Paint (javafx.scene.paint.Paint)1