|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.amis.pogamut.base.communication.messages.CommandMessage
cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.DialogItem
public class DialogItem
Representation of the GameBots2004 command DLGITEM. Specifies properties of a new dialog component.
Field Summary | |
---|---|
protected String |
Action
Applicable for: BUTTON, IMAGE. |
protected String |
Background
Applicable for: PANEL, BUTTON. |
protected Color |
BgColor
Applicable for: PANEL, BUTTON. |
protected Color |
Border
Applicable for: PANEL, BUTTON. |
protected String |
DialogId
Id of dialog, which should the message alter. |
protected String |
Effect
What should this message do. |
protected String |
Checked
Applicable for: OPTION. |
protected String |
Id
Identification of this component. |
protected String |
Image
Applicable for: IMAGE. |
protected String |
Mode
Applicable for: OPTIONLIST. |
protected String |
NotChecked
Applicable for: OPTION. |
protected Point2D |
Origin
Applicable for: IMAGE. |
protected String |
Parent
Id of parent component. |
protected String |
Player
Name of the player on who's HUD should the dialog show. |
protected Point2D |
Position
Applicable for: PANEL, BUTTON, TEXT, OPTIONLIST, IMAGE. |
static String |
PROTOTYPE
Example how the message looks like - used during parser tests. |
protected Dimension2D |
Scale
Applicable for: IMAGE. |
protected Dimension2D |
Size
Applicable for: PANEL, BUTTON, TEXT, OPTIONLIST, IMAGE. |
protected String |
Text
Applicable for: TEXT, BUTTON, OPTION. |
protected Color |
TextColor
Applicable for: TEXT, BUTTON, OPTION. |
protected String |
Type
Type of the new component. |
Constructor Summary | |
---|---|
DialogItem()
Creates new instance of command DialogItem. |
|
DialogItem(DialogItem original)
Cloning constructor. |
|
DialogItem(String Player,
String DialogId,
String Effect,
String Type,
String Id,
String Parent,
Dimension2D Size,
Point2D Position,
String Background,
Color BgColor,
Color Border,
String Text,
Color TextColor,
String Action,
String Mode,
String Checked,
String NotChecked,
String Image,
Point2D Origin,
Dimension2D Scale)
Creates new instance of command DialogItem. |
Method Summary | |
---|---|
String |
getAction()
Applicable for: BUTTON, IMAGE. |
String |
getBackground()
Applicable for: PANEL, BUTTON. |
Color |
getBgColor()
Applicable for: PANEL, BUTTON. |
Color |
getBorder()
Applicable for: PANEL, BUTTON. |
String |
getDialogId()
Id of dialog, which should the message alter. |
String |
getEffect()
What should this message do. |
String |
getChecked()
Applicable for: OPTION. |
String |
getId()
Identification of this component. |
String |
getImage()
Applicable for: IMAGE. |
String |
getMode()
Applicable for: OPTIONLIST. |
String |
getNotChecked()
Applicable for: OPTION. |
Point2D |
getOrigin()
Applicable for: IMAGE. |
String |
getParent()
Id of parent component. |
String |
getPlayer()
Name of the player on who's HUD should the dialog show. |
Point2D |
getPosition()
Applicable for: PANEL, BUTTON, TEXT, OPTIONLIST, IMAGE. |
Dimension2D |
getScale()
Applicable for: IMAGE. |
Dimension2D |
getSize()
Applicable for: PANEL, BUTTON, TEXT, OPTIONLIST, IMAGE. |
String |
getText()
Applicable for: TEXT, BUTTON, OPTION. |
Color |
getTextColor()
Applicable for: TEXT, BUTTON, OPTION. |
String |
getType()
Type of the new component. |
DialogItem |
setAction(String Action)
Applicable for: BUTTON, IMAGE. |
DialogItem |
setBackground(String Background)
Applicable for: PANEL, BUTTON. |
DialogItem |
setBgColor(Color BgColor)
Applicable for: PANEL, BUTTON. |
DialogItem |
setBorder(Color Border)
Applicable for: PANEL, BUTTON. |
DialogItem |
setDialogId(String DialogId)
Id of dialog, which should the message alter. |
DialogItem |
setEffect(String Effect)
What should this message do. |
DialogItem |
setChecked(String Checked)
Applicable for: OPTION. |
DialogItem |
setId(String Id)
Identification of this component. |
DialogItem |
setImage(String Image)
Applicable for: IMAGE. |
DialogItem |
setMode(String Mode)
Applicable for: OPTIONLIST. |
DialogItem |
setNotChecked(String NotChecked)
Applicable for: OPTION. |
DialogItem |
setOrigin(Point2D Origin)
Applicable for: IMAGE. |
DialogItem |
setParent(String Parent)
Id of parent component. |
DialogItem |
setPlayer(String Player)
Name of the player on who's HUD should the dialog show. |
DialogItem |
setPosition(Point2D Position)
Applicable for: PANEL, BUTTON, TEXT, OPTIONLIST, IMAGE. |
DialogItem |
setScale(Dimension2D Scale)
Applicable for: IMAGE. |
DialogItem |
setSize(Dimension2D Size)
Applicable for: PANEL, BUTTON, TEXT, OPTIONLIST, IMAGE. |
DialogItem |
setText(String Text)
Applicable for: TEXT, BUTTON, OPTION. |
DialogItem |
setTextColor(Color TextColor)
Applicable for: TEXT, BUTTON, OPTION. |
DialogItem |
setType(String Type)
Type of the new component. |
String |
toHtmlString()
|
String |
toMessage()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String PROTOTYPE
protected String Player
protected String DialogId
protected String Effect
protected String Type
protected String Id
protected String Parent
protected Dimension2D Size
protected Point2D Position
protected String Background
protected Color BgColor
protected Color Border
protected String Text
protected Color TextColor
protected String Action
protected String Mode
protected String Checked
protected String NotChecked
protected String Image
protected Point2D Origin
protected Dimension2D Scale
Constructor Detail |
---|
public DialogItem(String Player, String DialogId, String Effect, String Type, String Id, String Parent, Dimension2D Size, Point2D Position, String Background, Color BgColor, Color Border, String Text, Color TextColor, String Action, String Mode, String Checked, String NotChecked, String Image, Point2D Origin, Dimension2D Scale)
Player
- Name of the player on who's HUD should the dialog show.DialogId
- Id of dialog, which should the message alter. If empty, actually constructed dialog is used.Effect
- What should this message do. Available are: ADD, EDIT.Type
- Type of the new component. Available are: PANEL, BUTTON, TEXT, IMAGE, OPTIONLIST, OPTION.Id
- Identification of this component. It should be an unique alphanumeric string without spaces.Parent
- Id of parent component. If left empty, the parent is dialog itself. Parent must be specified before the child.Size
- Applicable for: PANEL, BUTTON, TEXT, OPTIONLIST, IMAGE. A pair of values in form "Width,Height" where each is in range from 0 to 1 (relative portion of the parent component).Position
- Applicable for: PANEL, BUTTON, TEXT, OPTIONLIST, IMAGE. A pair of values in form "Left,Top" where each is in range from 0 to 1 (relative portion of the parent component).Background
- Applicable for: PANEL, BUTTON. Name of texture, which should be used as background.BgColor
- Applicable for: PANEL, BUTTON. RGBA color of background.Border
- Applicable for: PANEL, BUTTON. Triple of numbers from 0 to 255 separated by commas, specifying the RGB color of border.Text
- Applicable for: TEXT, BUTTON, OPTION. Text which should be written on the component.TextColor
- Applicable for: TEXT, BUTTON, OPTION. Color of text which should be written on the component as RGB triple of numbers from 0 to 255 separated by commas.Action
- Applicable for: BUTTON, IMAGE. Action which should be performed when the button is pressed. SUBMIT submits data from the dialog using DLGCMD message with Command SUBMIT, RESET resets the dialog and all other values send DLGCMD message with this value as Command - without closing the dialog.Mode
- Applicable for: OPTIONLIST. Either SINGLE - just one option can be selected at one moment (radio buttons), or MULTI - classic check boxes.Checked
- Applicable for: OPTION. Name of texture which should be used when the button is checked.NotChecked
- Applicable for: OPTION. Name of texture which should be used when the button is not checked.Image
- Applicable for: IMAGE. Name of texture of the image.Origin
- Applicable for: IMAGE. Left top origin point of the image.Scale
- Applicable for: IMAGE. Left top origin point of the image.public DialogItem()
public DialogItem(DialogItem original)
original
- Method Detail |
---|
public String getPlayer()
public DialogItem setPlayer(String Player)
public String getDialogId()
public DialogItem setDialogId(String DialogId)
public String getEffect()
public DialogItem setEffect(String Effect)
public String getType()
public DialogItem setType(String Type)
public String getId()
public DialogItem setId(String Id)
public String getParent()
public DialogItem setParent(String Parent)
public Dimension2D getSize()
public DialogItem setSize(Dimension2D Size)
public Point2D getPosition()
public DialogItem setPosition(Point2D Position)
public String getBackground()
public DialogItem setBackground(String Background)
public Color getBgColor()
public DialogItem setBgColor(Color BgColor)
public Color getBorder()
public DialogItem setBorder(Color Border)
public String getText()
public DialogItem setText(String Text)
public Color getTextColor()
public DialogItem setTextColor(Color TextColor)
public String getAction()
public DialogItem setAction(String Action)
public String getMode()
public DialogItem setMode(String Mode)
public String getChecked()
public DialogItem setChecked(String Checked)
public String getNotChecked()
public DialogItem setNotChecked(String NotChecked)
public String getImage()
public DialogItem setImage(String Image)
public Point2D getOrigin()
public DialogItem setOrigin(Point2D Origin)
public Dimension2D getScale()
public DialogItem setScale(Dimension2D Scale)
public String toString()
toString
in class CommandMessage
public String toHtmlString()
public String toMessage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |