|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpl.mbdev.openstage.Xml
pl.mbdev.openstage.IppCommand
public class IppCommand
Allows user's interaction with many aspects of the OpenStage phone. Commands can change behaviour of the current XML application, launch another, and enable communication with any remote server.
Copyright 2011 Mateusz Bysiek, mb@mbdev.pl, http://mbdev.pl/ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Nested Class Summary | |
---|---|
static class |
IppCommand.Default
Possible values of a field that indicates whether this command will be a default command in the context menu. |
static class |
IppCommand.DisplayOn
Defines places where the IppCommand will be displayed. |
static class |
IppCommand.Select
For commands added to implicit IppList Possible valued of a field that
indicates whether the command is selected by default or not. |
static class |
IppCommand.Type
Available types of the IppCommand . |
Field Summary | |
---|---|
private int |
auto
This command will be executed automatically after provided number of seconds, or will not be executed automatically if zero or a negative number is provided. |
private IppCommand.DisplayOn |
displayOn
Value from IppCommand.DisplayOn . |
private boolean |
isDefault
This command will be the default command in the context menu. |
private boolean |
isSelected
Useful only if the command is added to a implicit list. |
private java.lang.String |
key
Useless unless command is of type SELECT, then it is a key from key-value pair, which is sent to the remote server. |
private int |
priority
Nonnegative integer indicating position of this IppCommand on the list of commands. |
private IppCommand.Type |
type
Value from IppCommand.Type . |
private java.lang.String |
value
Useless unless command is of type SELECT, then it is the value from key-value pair, which is sent to the remote server. |
Constructor Summary | |
---|---|
IppCommand(IppCommand.Type type,
IppCommand.DisplayOn displayOn)
Creates new IppCommand, with label that is guessed according to the type argument. |
|
IppCommand(java.lang.String label,
int screenID,
IppCommand.DisplayOn displayOn)
Creates new IppCommand of type SCREEN. |
|
IppCommand(java.lang.String label,
IppCommand.Type type,
int screenID,
int priority,
int auto,
java.lang.String key,
java.lang.String value,
IppCommand.DisplayOn displayOn,
boolean isSelected,
boolean isDefault)
Creates new IppCommand with all possible fields available to set. |
|
IppCommand(java.lang.String label,
IppCommand.Type type,
java.lang.String key,
java.lang.String value,
IppCommand.DisplayOn displayOn,
boolean isSelected)
Creates new IppCommand with some fields set to default values. |
|
IppCommand(java.lang.String label,
java.lang.String key,
java.lang.String value,
IppCommand.DisplayOn displayOn)
Creates new IppCommand of type SELECT. |
Method Summary | |
---|---|
protected java.lang.StringBuffer |
attributesToXmlString()
Should be overridden by classes that have some attributes. |
Methods inherited from class pl.mbdev.openstage.Xml |
---|
add, add, addAndReturn, attributeToXml, firstAttributesToXmlString, getContents, getLogicalRoot, getParent, getSubNode, getSubNodeIndex, getSubNodes, getXmlHeader, isEmpty, logicalAdd, sendTo, setContents, setParent, subObjectsCount, subObjectsToXmlString, toXmlString, wrapWithIppItem |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private IppCommand.Type type
IppCommand.Type
.
private int priority
private int auto
private java.lang.String key
private java.lang.String value
private IppCommand.DisplayOn displayOn
IppCommand.DisplayOn
.
private boolean isSelected
private boolean isDefault
Constructor Detail |
---|
public IppCommand(IppCommand.Type type, IppCommand.DisplayOn displayOn)
type
- value from IppCommand.Type
displayOn
- value from IppCommand.DisplayOn
public IppCommand(java.lang.String label, int screenID, IppCommand.DisplayOn displayOn)
label
- label of this commandscreenID
- ID of the screendisplayOn
- value from IppCommand.DisplayOn
public IppCommand(java.lang.String label, java.lang.String key, java.lang.String value, IppCommand.DisplayOn displayOn)
label
- label of this commandkey
- the key from key-value pair, which is sent to the remote servervalue
- the value from key-value pair, which is sent to the remote serverdisplayOn
- value from IppCommand.DisplayOn
public IppCommand(java.lang.String label, IppCommand.Type type, java.lang.String key, java.lang.String value, IppCommand.DisplayOn displayOn, boolean isSelected)
label
- label of this commandtype
- value from IppCommand.Type
, if you want to set it to SCREEN,
please use a constructor that allows you to also define screen IDkey
- useless unless command is of type SELECT, then it is a key from key-value
pair, which is sent to the remote servervalue
- useless unless command is of type SELECT, then it is the value from
key-value pair, which is sent to the remote serverdisplayOn
- value from IppCommand.DisplayOn
isSelected
- useful only if the command is added to a implicit listpublic IppCommand(java.lang.String label, IppCommand.Type type, int screenID, int priority, int auto, java.lang.String key, java.lang.String value, IppCommand.DisplayOn displayOn, boolean isSelected, boolean isDefault)
label
- label of this commandtype
- value from IppCommand.Type
screenID
- ID of the screen, used when the command is of type SCREENpriority
- priority of the command, may change order of appearance to other than
"first added, first displayed"auto
- this command will be executed automatically after provided number of
seconds, or will not be executed automatically if zero or a negative
number is providedkey
- useless unless command is of type SELECT, then it is a key from key-value
pair, which is sent to the remote servervalue
- useless unless command is of type SELECT, then it is the value from
key-value pair, which is sent to the remote serverdisplayOn
- value from IppCommand.DisplayOn
isSelected
- useful only if the command is added to a implicit listisDefault
- this command will be the default command in the context menuMethod Detail |
---|
protected java.lang.StringBuffer attributesToXmlString()
Xml
attributesToXmlString
in class Xml
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |