Class Preferences

java.lang.Object
de.saar.chorus.ubench.Preferences
All Implemented Interfaces:
Cloneable

public class Preferences extends Object implements Cloneable
This contains several preferences for layouting and solving graphs and a master object containing the general used preferences. Every JDomGraph has a Preferences object of its own and has to be repaintet, if its preferences are not aligned to the global master preferences. The global preferences concerning layout and solving can be changed by using the menu checkboxes of the JDomGraphMenu. The default values are true for showing labels and automatical solving and false for automatical window fitting.
Author:
Alexander Koller
  • Constructor Details

    • Preferences

      public Preferences()
      Creating a new Preferences object with the default values.
  • Method Details

    • setLabelType

      public void setLabelType(LayoutOptions.LabelType lt)
      accessor methods
    • getLabelType

      public LayoutOptions.LabelType getLabelType()
    • isFitWindowToGraph

      public static boolean isFitWindowToGraph()
    • setFitWindowToGraph

      public static void setFitWindowToGraph(boolean findWindowToGraph)
    • setLayoutType

      public void setLayoutType(Preferences.LayoutType lt)
    • getLayoutType

      public Preferences.LayoutType getLayoutType()
    • isRemoveRedundantEdges

      public static boolean isRemoveRedundantEdges()
    • setRemoveRedundandEdges

      public static void setRemoveRedundandEdges(boolean removeRedundandEdges)
    • setFitToWindow

      public static void setFitToWindow(boolean fit)
      Set to true, fitWindow will cause the visible and all further opened graphs to be zoomed out if they oversize their tab. Default: false.
      Parameters:
      fit -
    • isAutoCount

      public static boolean isAutoCount()
      Returns:
      true if all graphs are automatically solved
    • setAutoCount

      public static void setAutoCount(boolean xautoCount)
      This can enable or disable the automatical solving / counting of solved forms. If disabled, a menu item for "manual" solving / solved form counting should get enabled! Default: true (automatical counting)
      Parameters:
      xautoCount -
    • isFitToWindow

      public static boolean isFitToWindow()
      Returns:
      true if the graphs shall be fitted into their tab
    • getInstance

      public static Preferences getInstance()
      Returns the master Preferences object which is a new one if there is no master yet.
      Returns:
      the master Preferences object
    • clone

      public Preferences clone()
      Clones this.
      Overrides:
      clone in class Object
      Returns:
      a clone of this Preferences
    • copyTo

      public void copyTo(Preferences second)
      Copies these preferences to a second given Preferences object.
      Parameters:
      second - the Preferences to copy the values to