/** * Indicates whether this is a vertical or horizontal progressbar. * * * @return Boolean * @see com.smartgwt.client.docs.Appearance Appearance overview and related methods */ public Boolean getVertical() { return getAttributeAsBoolean("vertical"); }
/** * Length of the progressbar in pixels. This is effectively height for a vertical progressbar, or width for a horizontal * progressbar. <P> This property must be set instead of setting <code>width</code> or <code>height</code>. * * * @return Returns the current width of a horizontal progressbar, or height of a vertical progressbar. * @see com.smartgwt.client.docs.Appearance Appearance overview and related methods */ public int getLength() { return getAttributeAsInt("length"); }
/** * The base file name for the progressbar image. * * * @return String * @see com.smartgwt.client.docs.Appearance Appearance overview and related methods */ public String getSrc() { return getAttributeAsString("src"); }
progressLayout.addMember(label); progressBar = new Progressbar(); progressBar.setStyleName(DeskmanagerLayout.STYLE_PROGRESSBAR); progressBar.setHeight(DeskmanagerLayout.progressBarHeight); progressBar.setWidth100(); progressBar.setVertical(false); progressBar.setLayoutAlign(Alignment.CENTER); progressBar.setLayoutAlign(VerticalAlignment.CENTER); progressLayout.addMember(progressBar); inner.addMember(progressLayout);
/** * Add a percentChanged handler. * <p> * This method is called when the percentDone value changes. Observe this method to be notified upon a change to the * percentDone value. * * @param handler the percentChanged handler * @return {@link HandlerRegistration} used to remove this handler */ public HandlerRegistration addPercentChangedHandler(com.smartgwt.client.widgets.events.PercentChangedHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.events.PercentChangedEvent.getType()) == 0) setupPercentChangedEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.events.PercentChangedEvent.getType()); }
public static Progressbar getOrCreateRef(JavaScriptObject jsObj) { if(jsObj == null) return null; BaseWidget obj = BaseWidget.getRef(jsObj); if(obj != null) { return (Progressbar) obj; } else { return new Progressbar(jsObj); } }
/** * Number from 0 to 100, inclusive, for the percentage to be displayed graphically in this progressbar. * Sets percentDone to newPercent. * * @param percentDone percent to show as done (0-100). Default value is 0 * @see com.smartgwt.client.docs.Appearance Appearance overview and related methods */ public void setPercentDone(int percentDone) { setAttribute("percentDone", percentDone, true); }
public void run() { progressPercentage += 10; progressBar.setPercentDone(progressPercentage); if (progressPercentage < 100) { schedule(50); } } };
/** * The base file name for the progressbar image. * * @param src src Default value is "[SKIN]progressbar.gif" * @see com.smartgwt.client.docs.Appearance Appearance overview and related methods */ public void setSrc(String src) { setAttribute("src", src, true); }
/** * Thickness of the progressbar in pixels. This is effectively width for a vertical progressbar, or height for a horizontal * progressbar. <P> This property must be set instead of setting <code>width</code> or <code>height</code>. * Sets the breadth of the progressbar to newLength. This is the height of a horizontal progressbar, or the width of a vertical progressbar. * * @param breadth the new breadth of the progressbar. Default value is 20 * @throws IllegalStateException this property cannot be changed after the component has been created * @see com.smartgwt.client.docs.Appearance Appearance overview and related methods */ public void setBreadth(int breadth) throws IllegalStateException { setAttribute("breadth", breadth, false); }
/** * Thickness of the progressbar in pixels. This is effectively width for a vertical progressbar, or height for a horizontal * progressbar. <P> This property must be set instead of setting <code>width</code> or <code>height</code>. * * * @return Returns the current height of a horizontal progressbar, or width of a vertical progressbar. * @see com.smartgwt.client.docs.Appearance Appearance overview and related methods */ public int getBreadth() { return getAttributeAsInt("breadth"); }
/** * Indicates whether this is a vertical or horizontal progressbar. * * @param vertical vertical Default value is false * @see com.smartgwt.client.docs.Appearance Appearance overview and related methods */ public void setVertical(Boolean vertical) { setAttribute("vertical", vertical, true); }
/** * Number from 0 to 100, inclusive, for the percentage to be displayed graphically in this progressbar. * * * @return int * @see com.smartgwt.client.docs.Appearance Appearance overview and related methods */ public int getPercentDone() { return getAttributeAsInt("percentDone"); }
/** * Length of the progressbar in pixels. This is effectively height for a vertical progressbar, or width for a horizontal * progressbar. <P> This property must be set instead of setting <code>width</code> or <code>height</code>. * Sets the length of the progressbar to newLength. This is the width of a horizontal progressbar, or the height of a vertical progressbar. * * @param length the new length of the progressbar. Default value is 100 * @throws IllegalStateException this property cannot be changed after the component has been created * @see com.smartgwt.client.docs.Appearance Appearance overview and related methods */ public void setLength(int length) throws IllegalStateException { setAttribute("length", length, false); }