com.jgoodies.skeleton.domain
Class Shaft

java.lang.Object
  extended by com.jgoodies.skeleton.domain.Model
      extended by com.jgoodies.skeleton.domain.Shaft
All Implemented Interfaces:
Serializable

public class Shaft
extends Model

Describes shafts and provides bound bean properties for the shaft and associated comments. Also holds a list of children: segments and flanges.

Version:
$Revision: 1.7 $
Author:
Karsten Lentzsch
See Also:
Segment, Flange, Serialized Form

Field Summary
static String PROPERTYNAME_ICE_CLASS
           
static String PROPERTYNAME_IDENTIFIER
           
static String PROPERTYNAME_INSPECTION
           
static String PROPERTYNAME_LENGTH
           
static String PROPERTYNAME_MACHINERY
           
static String PROPERTYNAME_MATERIAL
           
static String PROPERTYNAME_POWER
           
static String PROPERTYNAME_SPEED
           
 
Constructor Summary
Shaft(String identifier)
          Constructs a Shaft with the given identifier.
 
Method Summary
 void addComponent(Flange flange)
          Adds the given flange to this shaft's components.
 void addComponent(Segment segment)
          Adds the given segment to this shaft's components.
 List getComponents()
          Returns an unmodifiable List of this shaft's child components: segments and flanges.
 String getIceClass()
           
 String getIdentifier()
          Returns this shaft's identifier.
 String getInspection()
           
 long getLength()
           
 String getMachinery()
           
 String getMaterial()
           
 String getPower()
           
 String getSpeed()
           
 void removeComponent(Flange flange)
          Removes the given flange from this shaft's components.
 void removeComponent(Segment segment)
          Removes the given segment from this shaft's components.
 void setIceClass(String newIceClass)
           
 void setIdentifier(String newIdentifier)
           
 void setInspection(String newInspection)
           
 void setLength(long newLength)
           
 void setMachinery(String newMachinery)
           
 void setMaterial(String newMaterial)
           
 void setPower(String newPower)
           
 void setSpeed(String newSpeed)
           
 String toString()
          Returns a string representation for this shaft.
 
Methods inherited from class com.jgoodies.skeleton.domain.Model
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, equals, fireMultiplePropertiesChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROPERTYNAME_IDENTIFIER

public static final String PROPERTYNAME_IDENTIFIER
See Also:
Constant Field Values

PROPERTYNAME_POWER

public static final String PROPERTYNAME_POWER
See Also:
Constant Field Values

PROPERTYNAME_SPEED

public static final String PROPERTYNAME_SPEED
See Also:
Constant Field Values

PROPERTYNAME_MATERIAL

public static final String PROPERTYNAME_MATERIAL
See Also:
Constant Field Values

PROPERTYNAME_ICE_CLASS

public static final String PROPERTYNAME_ICE_CLASS
See Also:
Constant Field Values

PROPERTYNAME_LENGTH

public static final String PROPERTYNAME_LENGTH
See Also:
Constant Field Values

PROPERTYNAME_MACHINERY

public static final String PROPERTYNAME_MACHINERY
See Also:
Constant Field Values

PROPERTYNAME_INSPECTION

public static final String PROPERTYNAME_INSPECTION
See Also:
Constant Field Values
Constructor Detail

Shaft

public Shaft(String identifier)
Constructs a Shaft with the given identifier. The list of child components is empty.

Parameters:
identifier - the initial name
Method Detail

getComponents

public List getComponents()
Returns an unmodifiable List of this shaft's child components: segments and flanges.

Returns:
An unmodifiable List of this shaft's child components.

addComponent

public void addComponent(Segment segment)
Adds the given segment to this shaft's components.

Parameters:
segment - the segment to add

addComponent

public void addComponent(Flange flange)
Adds the given flange to this shaft's components.

Parameters:
flange - the flange to add

removeComponent

public void removeComponent(Segment segment)
Removes the given segment from this shaft's components.

Parameters:
segment - the segment to remove

removeComponent

public void removeComponent(Flange flange)
Removes the given flange from this shaft's components.

Parameters:
flange - the flange to remove

getIceClass

public String getIceClass()
Returns:
the ice class.

getIdentifier

public String getIdentifier()
Returns this shaft's identifier.

Returns:
the identifier.

getInspection

public String getInspection()
Returns:
the inspection.

getLength

public long getLength()
Returns:
the length.

getMachinery

public String getMachinery()
Returns:
the machinery.

getMaterial

public String getMaterial()
Returns:
the material.

getPower

public String getPower()
Returns:
the power.

getSpeed

public String getSpeed()
Returns:
the speed.

setIceClass

public void setIceClass(String newIceClass)
Parameters:
newIceClass - The ice class to set.

setIdentifier

public void setIdentifier(String newIdentifier)
Parameters:
newIdentifier - the identifier to set

setInspection

public void setInspection(String newInspection)
Parameters:
newInspection - The inspection to set.

setLength

public void setLength(long newLength)
Parameters:
newLength - The length to set.

setMachinery

public void setMachinery(String newMachinery)
Parameters:
newMachinery - The machinery to set.

setMaterial

public void setMaterial(String newMaterial)
Parameters:
newMaterial - The material to set.

setPower

public void setPower(String newPower)
Parameters:
newPower - The power to set.

setSpeed

public void setSpeed(String newSpeed)
Parameters:
newSpeed - The speed to set.

toString

public String toString()
Returns a string representation for this shaft. Currently it prints the class info and identifier.

Overrides:
toString in class Object
Returns:
a string representation for this shaft


Copyright © 2002-2008 JGoodies Karsten Lentzsch. All Rights Reserved.