Skip to content
Snippets Groups Projects
Commit d7d0f357 authored by Irina LEE's avatar Irina LEE
Browse files

added show/hide in module (eln)

parent 7fdc06d5
No related branches found
No related tags found
1 merge request!72Syscams
......@@ -96,6 +96,7 @@ public class ELNModule extends TGCScalableWithInternalComponent implements Swall
int w;
Font f = g.getFont();
Font fold = f;
MainGUI mgui = getTDiagramPanel().getMainGUI();
if (myColor == null) {
myColor = Color.white;
......@@ -138,10 +139,14 @@ public class ELNModule extends TGCScalableWithInternalComponent implements Swall
w = g.getFontMetrics().stringWidth(value);
if (w > (width - 2 * textX)) {
g.setFont(f.deriveFont(Font.BOLD));
g.drawString(value, x + textX + 1, y + currentFontSize + textX);
if (mgui.getHidden() == false) {
g.drawString(value, x + textX + 1, y + currentFontSize + textX);
}
} else {
g.setFont(f.deriveFont(Font.BOLD));
g.drawString(value, x + (width - w)/2, y + currentFontSize + textX);
if (mgui.getHidden() == false) {
g.drawString(value, x + (width - w)/2, y + currentFontSize + textX);
}
}
g.setFont(fold);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment