| java.lang.Object thinwire.ui.AbstractComponent thinwire.ui.AbstractRangeComponent thinwire.ui.ProgressBar
ProgressBar | public class ProgressBar extends AbstractRangeComponent (Code) | | A ProgressBar is a screen element that has a visible selection that can be set to any size between zero and a specified length.
ProgressBars are either horizontal or vertical depending on their dimensions. If the width is greater than the height,
then the ProgressBar is horizontal, otherwise it is vertical.
Example:
Frame f = Application.current().getFrame();
f.setTitle("ProgressBar Test");
Dialog d = new Dialog("ProgressBar Test");
d.setBounds(10, 10, 250, 150);
final ProgressBar pb = new ProgressBar(5, 3);
pb.setBounds(10, 10, 100, 20);
d.getChildren().add(pb);
final TextField tf = new TextField();
tf.setBounds(10, 40, 50, 20);
tf.setText(String.valueOf(pb.getCurrentIndex()));
d.getChildren().add(tf);
Button b = new Button("SetValue");
b.setBounds(70, 35, 60, 30);
b.addActionListener(Button.ACTION_CLICK, new ActionListener() {
public void actionPerformed(ActionEvent ev) {
pb.setCurrentIndex(Integer.parseInt(tf.getText()));
}
});
d.getChildren().add(b);
f.getChildren().add(d);
author: Ted C. Howard |
Constructor Summary | |
public | ProgressBar() Constructs a new ProgressBar with a length of 100 and a currentIndex of 0. | public | ProgressBar(int length) Constructs a new ProgressBar with the specified length and a currentIndex of 0. | public | ProgressBar(int length, int currentIndex) Constructs a new ProgressBar with the specified length and currentIndex. |
ProgressBar | public ProgressBar()(Code) | | Constructs a new ProgressBar with a length of 100 and a currentIndex of 0.
|
ProgressBar | public ProgressBar(int length)(Code) | | Constructs a new ProgressBar with the specified length and a currentIndex of 0.
Parameters: length - |
ProgressBar | public ProgressBar(int length, int currentIndex)(Code) | | Constructs a new ProgressBar with the specified length and currentIndex.
Parameters: length - Parameters: currentIndex - |
Methods inherited from thinwire.ui.AbstractComponent | public void addActionListener(String action, ActionListener listener)(Code)(Java Doc) public void addActionListener(String[] actions, ActionListener listener)(Code)(Java Doc) public void addDropListener(Component dragComponent, DropListener listener)(Code)(Java Doc) public void addDropListener(Component[] dragComponents, DropListener listener)(Code)(Java Doc) public void addKeyPressListener(String keyPressCombo, KeyPressListener listener)(Code)(Java Doc) public void addKeyPressListener(String[] keyPressCombos, KeyPressListener listener)(Code)(Java Doc) public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)(Code)(Java Doc) public void addPropertyChangeListener(String[] propertyNames, PropertyChangeListener listener)(Code)(Java Doc) public void fireAction(ActionEvent ev)(Code)(Java Doc) public void fireAction(String action)(Code)(Java Doc) public void fireAction(String action, Object source)(Code)(Java Doc) public void fireDrop(DropEvent ev)(Code)(Java Doc) public void fireDrop(Component dragComponent)(Code)(Java Doc) public void fireDrop(Component dragComponent, Object dragObject)(Code)(Java Doc) public void fireKeyPress(KeyPressEvent ev)(Code)(Java Doc) public void fireKeyPress(String keyPressCombo)(Code)(Java Doc) final protected boolean firePropertyChange(Object source, String propertyName, int oldValue, int newValue)(Code)(Java Doc) final protected boolean firePropertyChange(Object source, String propertyName, boolean oldValue, boolean newValue)(Code)(Java Doc) final protected boolean firePropertyChange(Object source, String propertyName, Object oldValue, Object newValue)(Code)(Java Doc) public Container getContainer()(Code)(Java Doc) public int getHeight()(Code)(Java Doc) public Label getLabel()(Code)(Java Doc) public Object getLimit()(Code)(Java Doc) public Object getParent()(Code)(Java Doc) String getStandardPropertyUnsupportedMsg(String propertyName, boolean read)(Code)(Java Doc) public Style getStyle()(Code)(Java Doc) public Object getUserObject()(Code)(Java Doc) public int getWidth()(Code)(Java Doc) public int getX()(Code)(Java Doc) public int getY()(Code)(Java Doc) public boolean isEnabled()(Code)(Java Doc) final public boolean isFocus()(Code)(Java Doc) public boolean isFocusCapable()(Code)(Java Doc) public boolean isVisible()(Code)(Java Doc) public void removeActionListener(ActionListener listener)(Code)(Java Doc) public void removeDropListener(DropListener listener)(Code)(Java Doc) public void removeKeyPressListener(KeyPressListener listener)(Code)(Java Doc) public void removePropertyChangeListener(PropertyChangeListener listener)(Code)(Java Doc) public Component setBounds(int x, int y, int width, int height)(Code)(Java Doc) public void setEnabled(boolean enabled)(Code)(Java Doc) public void setFocus(boolean focus)(Code)(Java Doc) public void setFocusCapable(boolean focusCapable)(Code)(Java Doc) public void setHeight(int height)(Code)(Java Doc) void setLabel(Label label)(Code)(Java Doc) public Component setLimit(Object limit)(Code)(Java Doc) void setParent(Object parent)(Code)(Java Doc) public Component setPosition(int x, int y)(Code)(Java Doc) void setRenderer(Renderer r)(Code)(Java Doc) public Component setSize(int width, int height)(Code)(Java Doc) public void setUserObject(Object userObject)(Code)(Java Doc) public void setVisible(boolean visible)(Code)(Java Doc) public void setWidth(int width)(Code)(Java Doc) public void setX(int x)(Code)(Java Doc) public void setY(int y)(Code)(Java Doc)
|
|
|