|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.cycling74.max.MaxBox
public class MaxBox
MaxBox
represents the graphical element of an external
in a patcher. This can be used in conjunction with MaxPatcher
to dynamically modify and create patchers on the fly. The interface exposed is
very similar to the functionality exposed by the js javascript external and thus
much of that documentation for that external is applicable well. There is no public
constructor for MaxBox. MaxBoxes are created and gotten via the MaxPatcher
class.
public class maxboxtest extends MaxObject { private MaxPatcher _p = null; private Callback cb; private MaxClock cl; maxboxtest() { _p = this.getParentPatcher(); } public void printboxes() { MaxBox[] boxes = _p.getAllBoxes(); for(int i = 0; i < boxes.length; i++) { MaxBox b = boxes[i]; post("Box "+i+": "+b.getName()+" "+b.getMaxClass()); } } }
Constructor Summary | |
---|---|
protected |
MaxBox(MaxPatcher parent,
long p_box)
|
Method Summary | |
---|---|
boolean |
bang()
Send this box the "bang" message. |
boolean |
equals(java.lang.Object o)
|
protected void |
finalize()
|
int |
getColorIndex()
Gets an integer representing the color of the box. |
boolean |
getHidden()
|
boolean |
getIgnoreClick()
|
java.lang.String |
getMaxClass()
|
java.lang.String |
getName()
In a patcher box names can be set via the Max application Object menu name... |
MaxBox |
getNextBox()
Gets the next box after this one in the patcher. |
MaxPatcher |
getPatcher()
|
protected long |
getPeer()
|
int[] |
getRect()
Gets the patcher relative screen coordinates of the box. |
MaxPatcher |
getSubPatcher()
Get the patcher contained within this box. |
int |
hashCode()
|
void |
hide()
Make this box invisible in when its parent patcher is locked. |
boolean |
inBackground()
|
void |
inspect()
If the object has a floating inspector this method wil luanch it. |
boolean |
isHighlightable()
|
boolean |
isPatcher()
|
boolean |
isSelected()
|
void |
remove()
Remove this box from its parent patcher. |
boolean |
send(float f)
Send this box the "float" message. |
boolean |
send(int i)
Send this box the "int" message. |
boolean |
send(java.lang.String message,
Atom[] args)
Send this box an arbitrary message. |
void |
setColorIndex(int color)
Set the color of the box as an index into the color table found in the color submenu of the Max application menu. |
void |
setHidden(boolean b)
Set whether or not this box will be hidden when its parent patcher is locked. |
void |
setIgnoreClick(boolean b)
Set whether or not this box responds to mouse clicks. |
void |
setName(java.lang.String name)
Set the name of this box. |
void |
setRect(int x1,
int x2,
int y1,
int y2)
Set the location and size of the box in patcher relative coordinates. |
void |
show()
Keep this box visible in when its parent patcher is locked. |
void |
toBackground(boolean b)
Set whether or not this box will be put in the background layer of its parent patcher. |
boolean |
understands(java.lang.String message)
Test if a particular message is understood by this box |
Methods inherited from class java.lang.Object |
---|
clone, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected MaxBox(MaxPatcher parent, long p_box)
Method Detail |
---|
public boolean isPatcher()
public int[] getRect()
public java.lang.String getMaxClass()
public MaxPatcher getPatcher()
MaxPatcher
containing this box.public boolean getHidden()
public int getColorIndex()
public MaxBox getNextBox()
MaxBox
in the patchers list of boxes.public boolean isHighlightable()
public boolean inBackground()
public boolean isSelected()
public boolean getIgnoreClick()
public java.lang.String getName()
MaxPatcher
public void setRect(int x1, int x2, int y1, int y2)
x1
- upper left xy1
- upper left yx2
- lower right xy2
- lower right ypublic void setHidden(boolean b)
b
- true to hidepublic void setColorIndex(int color)
color
- index into the color table. This value wraps
so all ints are valid.public void toBackground(boolean b)
b
- true for backgroundpublic void setIgnoreClick(boolean b)
b
- true to ignore clickspublic void setName(java.lang.String name)
name
- the scripting name of the boxpublic boolean bang()
public boolean send(int i)
i
- the int to send to this box.
public boolean send(float f)
f
- the float to send to this box.
public boolean send(java.lang.String message, Atom[] args)
message
- the message to send to this box.args
- the arguments for the message. Can be null
if the message requires no arguments.
public void hide()
public void show()
public boolean understands(java.lang.String message)
message
- the message name you wish to test.
public void inspect()
public void remove()
public MaxPatcher getSubPatcher()
MaxPatcher
represented by this box or
null if this box contains no subpatcher.protected long getPeer()
protected void finalize()
finalize
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |