Search in sources :

Example 6 with ColorSet

use of com.android.tools.sherpa.drawing.ColorSet in project android by JetBrains.

the class DrawConnection method paint.

@Override
public void paint(Graphics2D g, SceneContext sceneContext) {
    ColorSet color = sceneContext.getColorSet();
    g.setColor(color.getConstraints());
    draw(g, color, myConnectionType, mySource, mySourceDirection, myDest, myDestDirection, myDestType, myMargin, myMarginDistance, myIsMarginReference, myBias);
}
Also used : ColorSet(com.android.tools.sherpa.drawing.ColorSet)

Example 7 with ColorSet

use of com.android.tools.sherpa.drawing.ColorSet in project android by JetBrains.

the class DrawHorizontalNotch method paint.

@Override
public void paint(Graphics2D g, SceneContext sceneContext) {
    ColorSet colorSet = sceneContext.getColorSet();
    Color background = colorSet.getFrames();
    g.setColor(background);
    Stroke stroke = g.getStroke();
    g.setStroke(DrawConnectionUtils.sDashedStroke);
    g.drawLine(x, y, x + width, y);
    g.setStroke(stroke);
}
Also used : ColorSet(com.android.tools.sherpa.drawing.ColorSet)

Example 8 with ColorSet

use of com.android.tools.sherpa.drawing.ColorSet in project android by JetBrains.

the class DrawResize method paint.

@Override
public void paint(Graphics2D g, SceneContext sceneContext) {
    ColorSet colorSet = sceneContext.getColorSet();
    Color background = colorSet.getSelectedFrames();
    g.setColor(background);
    g.fillRect(x, y, width, height);
}
Also used : ColorSet(com.android.tools.sherpa.drawing.ColorSet)

Example 9 with ColorSet

use of com.android.tools.sherpa.drawing.ColorSet in project android by JetBrains.

the class DrawVerticalNotch method paint.

@Override
public void paint(Graphics2D g, SceneContext sceneContext) {
    ColorSet colorSet = sceneContext.getColorSet();
    Color background = colorSet.getFrames();
    g.setColor(background);
    Stroke stroke = g.getStroke();
    g.setStroke(DrawConnectionUtils.sDashedStroke);
    g.drawLine(x, y, x, y + height);
    g.setStroke(stroke);
}
Also used : ColorSet(com.android.tools.sherpa.drawing.ColorSet)

Example 10 with ColorSet

use of com.android.tools.sherpa.drawing.ColorSet in project android by JetBrains.

the class DrawLasso method paint.

@Override
public void paint(Graphics2D g, SceneContext sceneContext) {
    ColorSet colorSet = sceneContext.getColorSet();
    Color background = colorSet.getFrames();
    g.setColor(background);
    String valueWidth = String.valueOf(width);
    DrawConnectionUtils.drawHorizontalMarginIndicator(g, valueWidth, false, x, x + width, y - GAP);
    String valueHeight = String.valueOf(height);
    DrawConnectionUtils.drawVerticalMarginIndicator(g, valueHeight, false, x - GAP, y, y + height);
    Stroke stroke = g.getStroke();
    g.setStroke(DrawConnectionUtils.sDashedStroke);
    g.drawRect(x, y, width, height);
    g.setStroke(stroke);
}
Also used : ColorSet(com.android.tools.sherpa.drawing.ColorSet)

Aggregations

ColorSet (com.android.tools.sherpa.drawing.ColorSet)14 SimpleAttributeSet (javax.swing.text.SimpleAttributeSet)1 StyledDocument (javax.swing.text.StyledDocument)1