smaller font size for splitter pin descriptions

This commit is contained in:
hneemann 2017-12-18 08:37:33 +01:00
parent 4e50918f09
commit 0817ad347e
2 changed files with 6 additions and 2 deletions

View File

@ -89,6 +89,10 @@ public class Style {
* Used to draw the pin description text
*/
public static final Style SHAPE_PIN = new Style(LINETHIN, false, Color.GRAY, 18, null);
/**
* Used to draw the pin description text for splitters
*/
public static final Style SHAPE_SPLITTER = new Style(LINETHIN, false, Color.GRAY, 12, null);
/**
* Used to draw the pin description text
*/

View File

@ -58,12 +58,12 @@ public class SplitterShape implements Shape {
public void drawTo(Graphic graphic, Style heighLight) {
for (int i = 0; i < inputs.size(); i++) {
Vector pos = new Vector(-2, i * SIZE - 3);
graphic.drawText(pos, pos.add(2, 0), inputs.get(i).getName(), Orientation.RIGHTBOTTOM, Style.SHAPE_PIN);
graphic.drawText(pos, pos.add(2, 0), inputs.get(i).getName(), Orientation.RIGHTBOTTOM, Style.SHAPE_SPLITTER);
graphic.drawLine(new Vector(0, i * SIZE), new Vector(SIZE2, i * SIZE), Style.NORMAL);
}
for (int i = 0; i < outputs.size(); i++) {
Vector pos = new Vector(SIZE + 2, i * SIZE - 3);
graphic.drawText(pos, pos.add(2, 0), outputs.get(i).getName(), Orientation.LEFTBOTTOM, Style.SHAPE_PIN);
graphic.drawText(pos, pos.add(2, 0), outputs.get(i).getName(), Orientation.LEFTBOTTOM, Style.SHAPE_SPLITTER);
graphic.drawLine(new Vector(SIZE, i * SIZE), new Vector(SIZE2, i * SIZE), Style.NORMAL);
}