@@ -91,6 +91,7 @@ public class CircuitComponent extends JComponent implements ChangedListener, Lib
9191 ATTR_LIST .add (Keys .IS_GENERIC );
9292 }
9393
94+
9495 /**
9596 * @return returns the list of circuit attributes
9697 */
@@ -148,6 +149,7 @@ public static ArrayList<Key> getAttrList() {
148149 private boolean toolTipHighlighted = false ;
149150 private NetList toolTipNetList ;
150151 private String lastUsedTunnelName ;
152+ private boolean presentingMode ;
151153
152154 /**
153155 * Creates a new instance
@@ -589,13 +591,13 @@ public String getToolTipText(MouseEvent event) {
589591 Vector pos = getPosVector (event );
590592 VisualElement ve = circuit .getElementAt (pos );
591593 if (ve != null ) {
594+ if (presentingMode )
595+ return null ;
596+
592597 Pin p = ve .getPinAt (raster (pos ));
593598 if (p != null )
594599 return createPinToolTip (p );
595600
596- if (Settings .getInstance ().get (Keys .SETTINGS_NOTOOLTIPS ))
597- return null ;
598-
599601 try {
600602 ElementTypeDescription etd = library .getElementType (ve .getElementName ());
601603 String tt = etd .getDescription (ve .getElementAttributes ());
@@ -880,13 +882,13 @@ protected void paintComponent(Graphics g) {
880882 gr2 .setColor (ColorScheme .getSelected ().getColor (ColorKey .BACKGROUND ));
881883 gr2 .fillRect (0 , 0 , getWidth (), getHeight ());
882884
883- if (scaleX > 0.3 && Settings .getInstance ().get (Keys .SETTINGS_GRID ))
885+ if (scaleX > 0.3 && Settings .getInstance ().get (Keys .SETTINGS_GRID ) && ! presentingMode )
884886 drawGrid (gr2 );
885887
886888 gr2 .transform (transform );
887889
888890 long time = System .currentTimeMillis ();
889- getCircuitOrShallowCopy ().drawTo (gr , highLighted , highLightStyle , modelSync );
891+ getCircuitOrShallowCopy ().drawTo (gr , highLighted , highLightStyle , modelSync , presentingMode );
890892 time = System .currentTimeMillis () - time ;
891893
892894 boolean scaleHasChanged = lastScaleX != scaleX ;
@@ -1037,7 +1039,7 @@ public void setCircuit(Circuit circuit) {
10371039 */
10381040 public void fitCircuit () {
10391041 GraphicMinMax gr = new GraphicMinMax ();
1040- getCircuitOrShallowCopy ().drawTo (gr );
1042+ getCircuitOrShallowCopy ().drawTo (gr , presentingMode );
10411043
10421044 AffineTransform newTrans = new AffineTransform ();
10431045 if (gr .getMin () != null && getWidth () != 0 && getHeight () != 0 ) {
@@ -1503,6 +1505,23 @@ public void setCopy(Circuit circuit) {
15031505 shallowCopy = circuit ;
15041506 }
15051507
1508+ /**
1509+ * Sets the hide tests flag
1510+ *
1511+ * @param presentingMode if true, tests are hidden
1512+ */
1513+ public void setPresentingMode (boolean presentingMode ) {
1514+ this .presentingMode = presentingMode ;
1515+ graphicHasChanged ();
1516+ }
1517+
1518+ /**
1519+ * @return the "tests are hidden" flag
1520+ */
1521+ public boolean getPresentingMode () {
1522+ return presentingMode ;
1523+ }
1524+
15061525 private final class PlusMinusAction extends ToolTipAction {
15071526 private final int delta ;
15081527
0 commit comments