com.sun.electric.database
Class EditingPreferences

java.lang.Object
  extended by com.sun.electric.database.text.PrefPackage
      extended by com.sun.electric.database.EditingPreferences
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class EditingPreferences
extends PrefPackage

Class to mirror on a server a portion of client environment

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.electric.database.text.PrefPackage
PrefPackage.BooleanPref, PrefPackage.DoublePref, PrefPackage.IntegerPref, PrefPackage.LongPref, PrefPackage.StringPref
 
Field Summary
 int smartHorizontalPlacementArc
          what type of "smart" text placement should be done for horizontal Arcs.
 int smartHorizontalPlacementExport
          What type of "smart" horizontal text placement should be done for Exports.
 int smartVerticalPlacementArc
          What type of "smart" text placement should be done for vertical Arcs.
 int smartVerticalPlacementExport
          What type of "smart" vertical text placement should be done for Exports.
 
Fields inherited from class com.sun.electric.database.text.PrefPackage
TECH_NODE, USER_NODE
 
Constructor Summary
EditingPreferences(boolean factory, TechPool techPool)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 Dimension2D getAlignmentToGrid()
          Method to return the default alignment of objects to the grid.
 int getAlignmentToGridIndex()
          Method to return index of the current alignment.
 Dimension2D[] getAlignmentToGridVector()
          Method to return an array of five grid alignment values.
 java.lang.Integer getDefaultAngleIncrement(ArcProtoId apId)
           
 ImmutableArcInst getDefaultArc(ArcProtoId apId)
           
 PrimitiveNodeId getDefaultArcPinId(ArcProtoId apId)
           
 ImmutableNodeInst getDefaultNode(PrimitiveNodeId pnId)
           
 TextDescriptor getTextDescriptor(AbstractTextDescriptor.TextType textType, boolean display)
           
static EditingPreferences getThreadEditingPreferences()
           
 int hashCode()
           
 void putPrefs(java.util.prefs.Preferences prefRoot, boolean removeDefaults)
          Store annotated option fields of the subclass into the speciefied Preferences subtree.
 void putPrefs(java.util.prefs.Preferences prefRoot, boolean removeDefaults, EditingPreferences oldEp)
           
static EditingPreferences setThreadEditingPreferences(EditingPreferences ep)
           
 EditingPreferences withAlignment(Dimension2D[] dist, int current)
          Method to set the default alignment of objects to the grid.
 EditingPreferences withAlignmentReset()
           
 EditingPreferences withArcAngleIncrement(ArcProtoId apId, int angleIncrement)
           
 EditingPreferences withArcFlags(ArcProtoId apId, int flags)
           
 EditingPreferences withArcGridExtend(ArcProtoId apId, long gridExtend)
           
 EditingPreferences withArcPin(ArcProtoId apId, PrimitiveNodeId arcPinId)
           
 EditingPreferences withArcsReset()
           
 EditingPreferences withNodeSize(PrimitiveNodeId pnId, EPoint size)
           
 EditingPreferences withNodesReset()
           
 EditingPreferences withPlacementReset()
           
 EditingPreferences withSmartHorizontalPlacementArc(int smartHorizontalPlacementArc)
           
 EditingPreferences withSmartHorizontalPlacementExport(int smartHorizontalPlacementExport)
           
 EditingPreferences withSmartVerticalPlacementArc(int smartVerticalPlacementArc)
           
 EditingPreferences withSmartVerticalPlacementExport(int smartVerticalPlacementExport)
           
 EditingPreferences withTextDescriptor(AbstractTextDescriptor.TextType textType, TextDescriptor td)
           
 EditingPreferences withTextDescriptorsReset()
           
 
Methods inherited from class com.sun.electric.database.text.PrefPackage
getFactoryPrefRoot, getKey, getKey, getKey, getKey, getPrefRoot, withField
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

smartVerticalPlacementExport

public final int smartVerticalPlacementExport
What type of "smart" vertical text placement should be done for Exports. The values can be 0: no smart placement; 1: place text "inside"; 2: place text "outside". The default is 0.

See Also:
Constant Field Values

smartHorizontalPlacementExport

public final int smartHorizontalPlacementExport
What type of "smart" horizontal text placement should be done for Exports. The values can be 0: no smart placement; 1: place text "inside"; 2: place text "outside". The default is 0.

See Also:
Constant Field Values

smartVerticalPlacementArc

public final int smartVerticalPlacementArc
What type of "smart" text placement should be done for vertical Arcs. The values can be 0: place text inside; 1: place text to left; 2: place text to right. The default is 0.

See Also:
Constant Field Values

smartHorizontalPlacementArc

public final int smartHorizontalPlacementArc
what type of "smart" text placement should be done for horizontal Arcs. The values can be 0: place text inside; 1: place text above; 2: place text below. The default is 0.

See Also:
Constant Field Values
Constructor Detail

EditingPreferences

public EditingPreferences(boolean factory,
                          TechPool techPool)
Method Detail

putPrefs

public void putPrefs(java.util.prefs.Preferences prefRoot,
                     boolean removeDefaults)
Description copied from class: PrefPackage
Store annotated option fields of the subclass into the speciefied Preferences subtree.

Overrides:
putPrefs in class PrefPackage
Parameters:
prefRoot - the root of the Preferences subtree.
removeDefaults - remove from the Preferences subtree options which have factory default value.

putPrefs

public void putPrefs(java.util.prefs.Preferences prefRoot,
                     boolean removeDefaults,
                     EditingPreferences oldEp)

withNodeSize

public EditingPreferences withNodeSize(PrimitiveNodeId pnId,
                                       EPoint size)

withNodesReset

public EditingPreferences withNodesReset()

withArcFlags

public EditingPreferences withArcFlags(ArcProtoId apId,
                                       int flags)

withArcGridExtend

public EditingPreferences withArcGridExtend(ArcProtoId apId,
                                            long gridExtend)

withArcAngleIncrement

public EditingPreferences withArcAngleIncrement(ArcProtoId apId,
                                                int angleIncrement)

withArcPin

public EditingPreferences withArcPin(ArcProtoId apId,
                                     PrimitiveNodeId arcPinId)

withArcsReset

public EditingPreferences withArcsReset()

getDefaultNode

public ImmutableNodeInst getDefaultNode(PrimitiveNodeId pnId)

getDefaultArc

public ImmutableArcInst getDefaultArc(ArcProtoId apId)

getDefaultAngleIncrement

public java.lang.Integer getDefaultAngleIncrement(ArcProtoId apId)

getDefaultArcPinId

public PrimitiveNodeId getDefaultArcPinId(ArcProtoId apId)

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

getAlignmentToGrid

public Dimension2D getAlignmentToGrid()
Method to return the default alignment of objects to the grid. The default is (1,1), meaning that placement and movement should land on whole grid units.

Returns:
the default alignment of objects to the grid.

getAlignmentToGridIndex

public int getAlignmentToGridIndex()
Method to return index of the current alignment.

Returns:
the index of the current alignment.

getAlignmentToGridVector

public Dimension2D[] getAlignmentToGridVector()
Method to return an array of five grid alignment values.

Returns:
an array of five grid alignment values.

withAlignment

public EditingPreferences withAlignment(Dimension2D[] dist,
                                        int current)
Method to set the default alignment of objects to the grid.

Parameters:
dist - the array of grid alignment values.
current - the index in the array that is the current grid alignment.

withAlignmentReset

public EditingPreferences withAlignmentReset()

getTextDescriptor

public TextDescriptor getTextDescriptor(AbstractTextDescriptor.TextType textType,
                                        boolean display)

withTextDescriptor

public EditingPreferences withTextDescriptor(AbstractTextDescriptor.TextType textType,
                                             TextDescriptor td)

withTextDescriptorsReset

public EditingPreferences withTextDescriptorsReset()

withSmartVerticalPlacementExport

public EditingPreferences withSmartVerticalPlacementExport(int smartVerticalPlacementExport)

withSmartHorizontalPlacementExport

public EditingPreferences withSmartHorizontalPlacementExport(int smartHorizontalPlacementExport)

withSmartVerticalPlacementArc

public EditingPreferences withSmartVerticalPlacementArc(int smartVerticalPlacementArc)

withSmartHorizontalPlacementArc

public EditingPreferences withSmartHorizontalPlacementArc(int smartHorizontalPlacementArc)

withPlacementReset

public EditingPreferences withPlacementReset()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getThreadEditingPreferences

public static EditingPreferences getThreadEditingPreferences()

setThreadEditingPreferences

public static EditingPreferences setThreadEditingPreferences(EditingPreferences ep)