org.robokind.api.motion.jointgroup
Interface JointGroup<Id,G extends JointGroup,J extends Joint>

Type Parameters:
Id - Joint Id Type used by this JointGroup
G - JointGroup Type of child JointGroups
J - Joint Type used by this JointGroup
All Superinterfaces:
org.robokind.api.common.property.PropertyChangeSource
All Known Implementing Classes:
AbstractJointGroup, RobotJointGroup

public interface JointGroup<Id,G extends JointGroup,J extends Joint>
extends org.robokind.api.common.property.PropertyChangeSource

JointGroups give a hierarchical view of a set of Joints. This is especially useful in the user interface for creating a Tree of Joints. A JointGroup provides a name, a list of Joints and a list of child JointGroups.

Author:
Matthew Stevenson

Field Summary
static String PROP_ADD_JOINT_GROUP
          Property String for adding a child JointGroup
static String PROP_ADD_JOINT_ID
          Property String for adding a JointId
static String PROP_ENABLED
          Property String for enabled
static String PROP_JOINT_CHANGED
          Property String for changing a joint
static String PROP_NAME
          Property String for name
static String PROP_REMOVE_JOINT_GROUP
          Property String for removing a child JointGroup
static String PROP_REMOVE_JOINT_ID
          Property String for removing a JointId
static String PROP_STRUCTURE_CHANGED
          Property String for changing the structure of this JointGroup
 
Method Summary
 void addGroup(G group)
          Add a child JointGroup.
 void addJointId(Id jointId)
          Adds a JointId to this JointGroup.
 boolean getEnabled()
          Returns the enabled state
 int getGroupCount()
          Return the number of child JointGroups.
 J getJoint(int index)
          Returns the Joint at the given index.
 int getJointCount()
          Returns the number of JointIds for this JointGroup.
 G getJointGroup(int index)
          Returns the child JointGroup at the given index.
 List<G> getJointGroups()
          Returns a List of the children JointGroups.
 Id getJointId(int index)
          Returns the JointId at the given index.
 List<Id> getJointIds()
          Returns a List of JointIds for this JointGroup
 List<J> getJoints()
          Returns the Joints belonging to this JointGroup.
 String getName()
          Returns the name to use
 void insertGroup(G group, int index)
          Add a child JointGroup at the given index.
 void insertJointId(Id jointId, int index)
          Adds a JointId to this JointGroup at the given index.
 void removeGroup(G group)
          Removes a child JointGroup.
 void removeGroupAt(int index)
          Removes a child JointGroup at the given index.
 void removeJointId(Id jointId)
          Removes a JointId
 void removeJointIdAt(int index)
          Removes the JointId with the given index.
 void setEnabled(boolean enabled)
          Sets the enabled state of the JointGroup
 void setName(String name)
          Sets the name of the JointGroup
 
Methods inherited from interface org.robokind.api.common.property.PropertyChangeSource
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
 

Field Detail

PROP_NAME

static final String PROP_NAME
Property String for name

See Also:
Constant Field Values

PROP_ENABLED

static final String PROP_ENABLED
Property String for enabled

See Also:
Constant Field Values

PROP_ADD_JOINT_ID

static final String PROP_ADD_JOINT_ID
Property String for adding a JointId

See Also:
Constant Field Values

PROP_REMOVE_JOINT_ID

static final String PROP_REMOVE_JOINT_ID
Property String for removing a JointId

See Also:
Constant Field Values

PROP_JOINT_CHANGED

static final String PROP_JOINT_CHANGED
Property String for changing a joint

See Also:
Constant Field Values

PROP_ADD_JOINT_GROUP

static final String PROP_ADD_JOINT_GROUP
Property String for adding a child JointGroup

See Also:
Constant Field Values

PROP_REMOVE_JOINT_GROUP

static final String PROP_REMOVE_JOINT_GROUP
Property String for removing a child JointGroup

See Also:
Constant Field Values

PROP_STRUCTURE_CHANGED

static final String PROP_STRUCTURE_CHANGED
Property String for changing the structure of this JointGroup

See Also:
Constant Field Values
Method Detail

setName

void setName(String name)
Sets the name of the JointGroup

Parameters:
name - new name to use

getName

String getName()
Returns the name to use

Returns:
the name to use

setEnabled

void setEnabled(boolean enabled)
Sets the enabled state of the JointGroup

Parameters:
enabled - enabled state to use

getEnabled

boolean getEnabled()
Returns the enabled state

Returns:
the enabled state

addJointId

void addJointId(Id jointId)
Adds a JointId to this JointGroup. If the given id already exists in this JointGroup, it is ignored.

Parameters:
jointId - the id to add

insertJointId

void insertJointId(Id jointId,
                   int index)
Adds a JointId to this JointGroup at the given index. If the given id already exists in this JointGroup, it is ignored.

Parameters:
jointId - the id to add
index - index at which to insert the Joint Id

removeJointId

void removeJointId(Id jointId)
Removes a JointId

Parameters:
jointId - id to remove

removeJointIdAt

void removeJointIdAt(int index)
Removes the JointId with the given index.

Parameters:
index - position of the JointId in this JointGroup's JointIds

getJointIds

List<Id> getJointIds()
Returns a List of JointIds for this JointGroup

Returns:
a List of JointIds for this JointGroup

getJointId

Id getJointId(int index)
Returns the JointId at the given index.

Parameters:
index - position of the JointId in the JointGroup's JointIds
Returns:
the JointId at the given index

getJoint

J getJoint(int index)
Returns the Joint at the given index.

Parameters:
index - index of the desired Joint
Returns:
Joint at the given index

getJoints

List<J> getJoints()
Returns the Joints belonging to this JointGroup.

Returns:
Joints belonging to this JointGroup

getJointCount

int getJointCount()
Returns the number of JointIds for this JointGroup.

Returns:
the number of JointIds for this JointGroup

addGroup

void addGroup(G group)
Add a child JointGroup.

Parameters:
group - child JointGroup to add

insertGroup

void insertGroup(G group,
                 int index)
Add a child JointGroup at the given index.

Parameters:
group - child JointGroup to add
index - position to add the child

removeGroup

void removeGroup(G group)
Removes a child JointGroup.

Parameters:
group - the child to remove

removeGroupAt

void removeGroupAt(int index)
Removes a child JointGroup at the given index.

Parameters:
index - position of the child to remove

getJointGroups

List<G> getJointGroups()
Returns a List of the children JointGroups.

Returns:
a List of the children JointGroups

getJointGroup

G getJointGroup(int index)
Returns the child JointGroup at the given index.

Parameters:
index - position to the child to remove
Returns:
the child JointGroup removed

getGroupCount

int getGroupCount()
Return the number of child JointGroups.

Returns:
the number of child JointGroups


Copyright © 2011-2013. All Rights Reserved.