pl.mbdev.openstage
Class IppGauge

java.lang.Object
  extended by pl.mbdev.openstage.Xml
      extended by pl.mbdev.openstage.XmlFormItem
          extended by pl.mbdev.openstage.IppGauge

public class IppGauge
extends XmlFormItem

Automated or user editable gauge, which can be added to IppForm.

 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.
 

Author:
Mateusz Bysiek

Nested Class Summary
static class IppGauge.Interactive
          Defines types of IppGauge in the context of it being interactive.
 
Field Summary
private  IppGauge.Interactive interactive
          Value from IppGauge.Interactive, sets the gauge's interactivity.
private  java.lang.String key
          Key from the key-value pair, where the value is the progress of the scroll bar.
 
Constructor Summary
IppGauge(java.lang.String label, int maximumMinutes, int maximumSeconds, int initialMinutes, int initialSeconds)
          Creates an automated gauge, with start and end time.
IppGauge(java.lang.String label, int maximum, int initial, java.lang.String key)
          Creates an interactive gauge, with initial and maximum values.
IppGauge(java.lang.String label, java.lang.String maximum, java.lang.String initial, IppGauge.Interactive interactive, java.lang.String key)
          Creates
 
Method Summary
protected  java.lang.StringBuffer attributesToXmlString()
          Should be overridden by classes that have some attributes.
 IppGauge.Interactive getInteractive()
          Returns the value from IppGauge.Interactive, the gauge's interactivity.
 
Methods inherited from class pl.mbdev.openstage.XmlFormItem
add
 
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

interactive

private final IppGauge.Interactive interactive
Value from IppGauge.Interactive, sets the gauge's interactivity.


key

private final java.lang.String key
Key from the key-value pair, where the value is the progress of the scroll bar.

Constructor Detail

IppGauge

public IppGauge(java.lang.String label,
                int maximumMinutes,
                int maximumSeconds,
                int initialMinutes,
                int initialSeconds)
Creates an automated gauge, with start and end time.

Parameters:
label - label of the gauge
maximumMinutes - minutes part of the maximum value
maximumSeconds - seconds part of the maximum value
initialMinutes - minutes part of the minimum value
initialSeconds - seconds part of the minimum value

IppGauge

public IppGauge(java.lang.String label,
                int maximum,
                int initial,
                java.lang.String key)
Creates an interactive gauge, with initial and maximum values.

Parameters:
label - label of the gauge
maximum - maximum value of the gauge
initial - initial value
key - key from the key-value pair, where the value is the progress of the scroll bar

IppGauge

public IppGauge(java.lang.String label,
                java.lang.String maximum,
                java.lang.String initial,
                IppGauge.Interactive interactive,
                java.lang.String key)
Creates

Parameters:
label - label of the gauge
maximum - maximum value
initial - initial value
interactive - value from IppGauge.Interactive, sets the gauge's interactivity
key - key from the key-value pair, where the value is the progress of the scroll bar, ignored when the gauge is not interactive
Method Detail

getInteractive

public IppGauge.Interactive getInteractive()
Returns the value from IppGauge.Interactive, the gauge's interactivity.

Returns:
the gauge's interactivity, value from IppGauge.Interactive

attributesToXmlString

protected java.lang.StringBuffer attributesToXmlString()
Description copied from class: Xml
Should be overridden by classes that have some attributes.

Overrides:
attributesToXmlString in class Xml
Returns:
XML-text containing all attributes of the object