yu.ac.bg.etf.javaqx.qswing
Class JQProgressBar

java.lang.Object
  extended byyu.ac.bg.etf.javaqx.core.AbstractDisposable
      extended byyu.ac.bg.etf.javaqx.qswing.JQComponent
          extended byyu.ac.bg.etf.javaqx.qswing.JQProgressBar
All Implemented Interfaces:
Disposable, JQComponentProperties, JQProgressBarProperties, QSwingConstants

public class JQProgressBar
extends JQComponent
implements QSwingConstants, JQProgressBarProperties

Progress Bar Component.

Version:
0.2.0
Author:
Slobodan Vrkacevic (slobodan.vrkacevic@gmail.com)

Field Summary
 
Fields inherited from class yu.ac.bg.etf.javaqx.qswing.JQComponent
listenerList
 
Fields inherited from interface yu.ac.bg.etf.javaqx.qswing.QSwingConstants
BOTTOM, CENTER, HORIZONTAL, LEADING, LEFT, RIGHT, TOP, TRAILING, VERTICAL
 
Fields inherited from interface yu.ac.bg.etf.javaqx.qswing.properties.JQProgressBarProperties
PROPERTY_INDETERMINATE, PROPERTY_MODEL, PROPERTY_ORIENTATION, PROPERTY_STRING, PROPERTY_STRING_PAINTED
 
Fields inherited from interface yu.ac.bg.etf.javaqx.qswing.properties.JQComponentProperties
PROPERTY_BACKGROUND, PROPERTY_COMPONENT_ORIENTATION, PROPERTY_CONTEXT_MENU, PROPERTY_ENABLED, PROPERTY_FIXED_SIZE, PROPERTY_FOCUSABLE, PROPERTY_FONT, PROPERTY_FOREGROUND, PROPERTY_INSETS, PROPERTY_LOCALE, PROPERTY_MAXIMUM_SIZE, PROPERTY_MINIMUM_SIZE, PROPERTY_NAME, PROPERTY_OPAQUE, PROPERTY_PREFERRED_SIZE, PROPERTY_RESOURCE_BUNDLE_NAME, PROPERTY_STATUS_TIP_TEXT, PROPERTY_STYLE_SHEET, PROPERTY_TOOL_TIP_TEXT, PROPERTY_VISIBLE, PROPERTY_WHATS_THIS_TEXT
 
Constructor Summary
JQProgressBar()
          Constructs new JQProgressBar object.
JQProgressBar(BoundedRangeModel model)
          Constructs new JQProgressBar object.
JQProgressBar(int orientation)
          Constructs new JQProgressBar object.
JQProgressBar(int minimum, int maximum)
          Constructs new JQProgressBar object.
JQProgressBar(int orientation, int minimum, int maximum)
          Constructs new JQProgressBar object.
 
Method Summary
 void addChangeListener(ChangeListener listener)
          Adds change listener.
protected  void fireStateChanged()
          Fires state changed event.
 ChangeListener[] getChangeListeners()
          Returns change listeners.
 int getMaximum()
          Returns maximum progress value.
 int getMinimum()
          Returns minimum progress value.
 BoundedRangeModel getModel()
          Returns data model of the progress bar.
 int getOrientation()
          Returns orientation of the progress bar.
 double getPercentComplete()
          Returns the percent complete.
 java.lang.String getString()
          Returns progress string.
 int getValue()
          Returns current value of the progress bar.
 boolean isIndeterminate()
          Returns true if the progress bar is indeterminate.
 boolean isStringPainted()
          Returns true if the progress string is painted.
protected  java.lang.String paramString()
          Returns parameters string.
 void removeChangeListener(ChangeListener listener)
          Removes change listener.
 void setIndeterminate(boolean indeterminate)
          Sets whether or not the progress bar is indeterminate.
 void setMaximum(int maximum)
          Sets maximum progress value.
 void setMinimum(int minimum)
          Sets minimum progress value.
 void setModel(BoundedRangeModel model)
          Sets data model of the progress bar.
 void setOrientation(int orientation)
          Sets orientation.
 void setString(java.lang.String progressString)
          Sets progress string.
 void setStringPainted(boolean paintString)
          Sets whether of not the progress string is painted.
 void setValue(int value)
          Sets current value of the progress bar.
 void updateLocalization()
          Updates localization.
 
Methods inherited from class yu.ac.bg.etf.javaqx.qswing.JQComponent
addComponentListener, addFocusListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, disableEvents, disposeComponent, disposeObject, enableEvents, eventEnabled, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getClientProperty, getComponentListeners, getComponentOrientation, getContextMenu, getCursor, getEventMask, getFocusListener, getFont, getFontMetrics, getForeground, getHeight, getInsets, getKeyListeners, getLocale, getLocation, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getOwnedComponents, getOwner, getParent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getResourceBundleName, getSize, getStatusTipText, getStyleSheet, getToolTipText, getToolTipText, getWhatsThisText, getWidth, getX, getY, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFontSet, isForegroundSet, isLeftToRight, isLocaleSet, isOpaque, isOwnerOf, isPainting, isResizable, isResourceBundleNameSet, isUpdatesEnabled, isValid, isVisible, localizeObject, localizeString, localizeString, localizeStrings, paintComponent, processComponentEvent, processContextMenuEvent, processFocusEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, processStyleChange, putClientProperty, removeComponentListener, removeFocusListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, removeStyleSheet, repaint, repaint, repaint, requestFocus, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setContextMenu, setCursor, setDefaultResourceBundleName, setDisplayable, setEnabled, setFixedSize, setFixedSize, setFocusable, setFont, setForeground, setInsets, setInsets, setLeftToRightComponentOrientation, setLocale, setLocation, setLocation, setMaximumSize, setMaximumSize, setMinimumSize, setMinimumSize, setName, setOpaque, setPreferredSize, setPreferredSize, setResizable, setResourceBundleName, setRightToLeftComponentOrientation, setSize, setSize, setStatusTipText, setStyleSheet, setStyleSheet, setToolTipText, setUpdatesEnabled, setVisible, setWhatsThisText, toString, unsetComponentOrientation, update, update, update, updateComponentOrientation, validate
 
Methods inherited from class yu.ac.bg.etf.javaqx.core.AbstractDisposable
addDisposeListener, dispose, disposedCheck, disposedErrorString, finalize, isDisposed, removeDisposeListener
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JQProgressBar

public JQProgressBar()
Constructs new JQProgressBar object.


JQProgressBar

public JQProgressBar(int orientation)
Constructs new JQProgressBar object.

Parameters:
orientation - the orientation of the progress bar

JQProgressBar

public JQProgressBar(int minimum,
                     int maximum)
Constructs new JQProgressBar object.

Parameters:
minimum - the minimum value of the progress bar
maximum - the maximum value of the progress bar

JQProgressBar

public JQProgressBar(int orientation,
                     int minimum,
                     int maximum)
Constructs new JQProgressBar object.

Parameters:
orientation - the orientation of the progress bar
minimum - the minimum value of the progress bar
maximum - the maximum value of the progress bar
Throws:
java.lang.IllegalArgumentException - it the orientation is invalid

JQProgressBar

public JQProgressBar(BoundedRangeModel model)
Constructs new JQProgressBar object.

Parameters:
model - the model
Method Detail

getModel

public BoundedRangeModel getModel()
Returns data model of the progress bar.

Returns:
data model of the progress bar

setModel

public void setModel(BoundedRangeModel model)
Sets data model of the progress bar.

Parameters:
model - the data model

getValue

public int getValue()
Returns current value of the progress bar.

Returns:
current value of the progress bar

setValue

public void setValue(int value)
Sets current value of the progress bar.

Parameters:
value - the current value of the progress bar

getMinimum

public int getMinimum()
Returns minimum progress value.

Returns:
minimum progress value

setMinimum

public void setMinimum(int minimum)
Sets minimum progress value.

Parameters:
minimum - the maximum progress value

getMaximum

public int getMaximum()
Returns maximum progress value.

Returns:
maximum progress value

setMaximum

public void setMaximum(int maximum)
Sets maximum progress value.

Parameters:
maximum - the maximum progress value

getString

public java.lang.String getString()
Returns progress string.

Returns:
progress string

setString

public void setString(java.lang.String progressString)
Sets progress string.

Parameters:
progressString - the progress string

isStringPainted

public boolean isStringPainted()
Returns true if the progress string is painted.

Returns:
true if the progress string is painted

setStringPainted

public void setStringPainted(boolean paintString)
Sets whether of not the progress string is painted.

Parameters:
paintString - true if painted

getPercentComplete

public double getPercentComplete()
Returns the percent complete. The value is between 0.0 and 1.0.

Returns:
the percent complete

getOrientation

public int getOrientation()
Returns orientation of the progress bar.

Returns:
orientation of the progress bar

setOrientation

public void setOrientation(int orientation)
Sets orientation.

Parameters:
orientation - the orientation

isIndeterminate

public boolean isIndeterminate()
Returns true if the progress bar is indeterminate.

Returns:
true if the progress bar is indeterminate

setIndeterminate

public void setIndeterminate(boolean indeterminate)
Sets whether or not the progress bar is indeterminate.

Parameters:
indeterminate - true if indeterminate

addChangeListener

public void addChangeListener(ChangeListener listener)
Adds change listener.

Parameters:
listener - the change listener

removeChangeListener

public void removeChangeListener(ChangeListener listener)
Removes change listener.

Parameters:
listener - the component listener

getChangeListeners

public ChangeListener[] getChangeListeners()
Returns change listeners.

Returns:
change listeners

fireStateChanged

protected void fireStateChanged()
Fires state changed event.


updateLocalization

public void updateLocalization()
Updates localization.

Overrides:
updateLocalization in class JQComponent

paramString

protected java.lang.String paramString()
Returns parameters string.

Overrides:
paramString in class JQComponent
Returns:
parameters string


Copyright © 2007 ETF and contributors. All Rights Reserved.