|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectalgoanim.primitives.Primitive
algoanim.primitives.ArrayPrimitive
algoanim.primitives.StringArray
public class StringArray
| Field Summary | |
|---|---|
protected StringArrayGenerator |
generator
The related IntArrayGenerator, which is responsible for
generating the appropriate scriptcode for operations performed on this
object. |
| Fields inherited from class algoanim.primitives.ArrayPrimitive |
|---|
length |
| Fields inherited from class algoanim.primitives.Primitive |
|---|
gen |
| Constructor Summary | |
|---|---|
StringArray(StringArrayGenerator sag,
Node upperLeftCorner,
java.lang.String[] arrayData,
java.lang.String name,
ArrayDisplayOptions display,
ArrayProperties iap)
Instantiates the StringArray and calls the create() method
of the associated StringArrayGenerator. |
|
| Method Summary | |
|---|---|
java.lang.String[] |
getData()
Returns the internal data of this StringArray. |
java.lang.String |
getData(int i)
Returns the data of the internal array at index
i. |
ArrayProperties |
getProperties()
Returns the properties of this StringArray. |
Node |
getUpperLeft()
Returns the upper left corner of this StringArray. |
void |
highlightCell(int from,
int to,
Timing offset,
Timing duration)
Highlights a range of array cells. |
void |
highlightCell(int position,
Timing offset,
Timing duration)
Highlights the array cell at a given position after a distinct offset. |
void |
highlightElem(int from,
int to,
Timing offset,
Timing duration)
Highlights a range of array elements. |
void |
highlightElem(int position,
Timing offset,
Timing duration)
Highlights the array element at a given position after a distinct offset. |
void |
put(int where,
java.lang.String what,
Timing t,
Timing d)
Puts the value what at position where. |
void |
setName(java.lang.String newName)
Sets the name of this Primitive. |
void |
swap(int what,
int with,
Timing t,
Timing d)
Swaps the elements at index what and with. |
void |
unhighlightCell(int from,
int to,
Timing offset,
Timing duration)
Unhighlights a range of array cells. |
void |
unhighlightCell(int position,
Timing offset,
Timing duration)
Unhighlights the array cell at a given position after a distinct offset. |
void |
unhighlightElem(int from,
int to,
Timing offset,
Timing duration)
Unhighlights a range of array elements. |
void |
unhighlightElem(int position,
Timing offset,
Timing duration)
Unhighlights the array element at a given position after a distinct offset. |
| Methods inherited from class algoanim.primitives.ArrayPrimitive |
|---|
getLength |
| Methods inherited from class algoanim.primitives.Primitive |
|---|
changeColor, exchange, getDisplayOptions, getName, hide, hide, moveBy, moveTo, moveVia, rotate, rotate, show, show |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected StringArrayGenerator generator
IntArrayGenerator, which is responsible for
generating the appropriate scriptcode for operations performed on this
object.
| Constructor Detail |
|---|
public StringArray(StringArrayGenerator sag,
Node upperLeftCorner,
java.lang.String[] arrayData,
java.lang.String name,
ArrayDisplayOptions display,
ArrayProperties iap)
StringArray and calls the create() method
of the associated StringArrayGenerator.
sag - the appropriate code Generator.upperLeftCorner - the upper left corner of this StringArray.arrayData - the internal data of this StringArray.name - the name of this StringArray.display - [optional] the DisplayOptions for this
StringArray.iap - [optional] the properties of this StringArray.| Method Detail |
|---|
public void put(int where,
java.lang.String what,
Timing t,
Timing d)
throws java.lang.IndexOutOfBoundsException
what at position where. This
is the delayed version as specified by t. Additionally the
duration of this operation may also be specified.
where - the index of the element to write.what - the new value.t - [optional] the delay which shall be applied to the operation.d - [optional] the duration of this operation.
java.lang.IndexOutOfBoundsException
public void swap(int what,
int with,
Timing t,
Timing d)
throws java.lang.IndexOutOfBoundsException
what and with.
This is the delayed version as specified by t. Additionally
the duration of this operation may be specified.
swap in class ArrayPrimitivewhat - first element to swap.with - second element to swap.t - [optional] the delay which shall be applied to the operation.d - [optional] the duration of this operation.
java.lang.IndexOutOfBoundsExceptionpublic java.lang.String[] getData()
StringArray.
StringArray.
public java.lang.String getData(int i)
throws java.lang.IndexOutOfBoundsException
array at index
i.
i - the index to access.
java.lang.IndexOutOfBoundsExceptionpublic Node getUpperLeft()
StringArray.
StringArray.public ArrayProperties getProperties()
StringArray.
StringArray.public void setName(java.lang.String newName)
PrimitivePrimitive.
setName in class PrimitivenewName - the new name for this Primitive.Primitive.setName(java.lang.String)
public void highlightCell(int position,
Timing offset,
Timing duration)
position - the position of the cell to highlight.offset - [optional] the offset after which the operation shall be started.duration - [optional] the duration this operation lasts.
public void highlightCell(int from,
int to,
Timing offset,
Timing duration)
from - the start of the interval to highlight.to - the end of the interval to highlight.offset - [optional] the offset after which the operation shall be started.duration - [optional] the duration this operation lasts.
public void unhighlightCell(int position,
Timing offset,
Timing duration)
position - the position of the cell to unhighlight.offset - [optional] the offset after which the operation shall be started.duration - [optional] the duration this operation lasts.
public void unhighlightCell(int from,
int to,
Timing offset,
Timing duration)
from - the start of the interval to unhighlight.to - the end of the interval to unhighlight.offset - [optional] the offset after which the operation shall be started.duration - [optional] the duration this operation lasts.
public void highlightElem(int position,
Timing offset,
Timing duration)
position - the position of the element to highlight.offset - [optional] the offset after which the operation shall be started.duration - [optional] the duration this operation lasts.
public void highlightElem(int from,
int to,
Timing offset,
Timing duration)
from - the start of the interval to highlight.to - the end of the interval to highlight.offset - [optional] the offset after which the operation shall be started.duration - [optional] the duration this operation lasts.
public void unhighlightElem(int position,
Timing offset,
Timing duration)
position - the position of the element to unhighlight.offset - [optional] the offset after which the operation shall be started.duration - [optional] the duration this operation lasts.
public void unhighlightElem(int from,
int to,
Timing offset,
Timing duration)
from - the start of the interval to unhighlight.to - the end of the interval to unhighlight.offset - [optional] the offset after which the operation shall be started.duration - [optional] the duration this operation lasts.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||