mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
configurable jumper color
This commit is contained in:
Binary file not shown.
+12
-2
@@ -20,6 +20,8 @@ public class Jumper extends AbstractLeadedComponent<Void> {
|
|||||||
|
|
||||||
public static Color COLOR = Color.blue;
|
public static Color COLOR = Color.blue;
|
||||||
|
|
||||||
|
private Color color = COLOR;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawIcon(Graphics2D g2d, int width, int height) {
|
public void drawIcon(Graphics2D g2d, int width, int height) {
|
||||||
g2d.setStroke(ObjectCache.getInstance().fetchBasicStroke(3));
|
g2d.setStroke(ObjectCache.getInstance().fetchBasicStroke(3));
|
||||||
@@ -31,10 +33,18 @@ public class Jumper extends AbstractLeadedComponent<Void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@EditableProperty(name = "Color")
|
|
||||||
public Color getLeadColor(ComponentState componentState) {
|
public Color getLeadColor(ComponentState componentState) {
|
||||||
return componentState == ComponentState.SELECTED
|
return componentState == ComponentState.SELECTED
|
||||||
|| componentState == ComponentState.DRAGGING ? SELECTION_COLOR : COLOR;
|
|| componentState == ComponentState.DRAGGING ? SELECTION_COLOR : color;
|
||||||
|
}
|
||||||
|
|
||||||
|
@EditableProperty
|
||||||
|
public Color getColor() {
|
||||||
|
return color;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setColor(Color color) {
|
||||||
|
this.color = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Color getBodyColor() {
|
public Color getBodyColor() {
|
||||||
|
|||||||
Reference in New Issue
Block a user