Package com.ms.ui |
![]() Previous |
![]() Contents |
![]() Index |
![]() Next |
public class UIBand extends UIMenuList implements IUIBand { // Fields public static final int BREAK; public static final int DRAGBREAK; public static final int CXEDGE; public static final int CYEDGE; // Constructors public UIBand(); public UIBand(String name); public UIBand(String name, int style); // Methods public boolean getBreak(); public boolean getDragBreak(); public int getRestoredWidth(); public int getRoleCode(); public int getStyle(); public void setBreak(boolean on); public void setDragBreak(boolean on); public void setStyle(int style); public void setRestoredWidth(int width); public Dimension minimumSize(); public boolean handleEvent(Event e); }
A class that manages a band control. Use UIBand to implement moveable bands of buttons in a band box control. UIBand contains a UIBandThumb control, which is used to reposition the band and its contents in relation to other bands in the band box.
public UIBand();Creates a band control with no caption name.
public UIBand(String name);Creates a band control with the specified caption name.
Parameter Description name Name appearing in the band's caption.
public UIBand(String name, int style);Creates a band control with the specified caption name and the specified style.
Parameter Description name Name appearing in the band's caption. style Style of the band control (see setStyle).
public boolean getBreak();Determines if the BREAK attribute is set in the control's style.
Return Value:
Returns true if the style includes BREAK; otherwise, returns false.
public boolean getDragBreak();Determines if the DRAGBREAK attribute is set in the control's style.
Return Value:
Returns true if the style includes DRAGBREAK; otherwise, returns false.
public int getRestoredWidth();Retrieves the width that the band control will be restored to.
Return Value:
Returns the width in pixels of the restored band control.
public int getRoleCode();Retrieves the role of the band control.
Return Value:
Returns the ROLE_SYSTEM code that best describes the role of the control.
Remarks:
This method returns the ROLE_SYSTEM_TOOLBAR code.
public int getStyle();Retrieves the current style settings of the band control.
Return Value:
Returns an integer containing the current style bits.
public boolean handleEvent(Event e);Changes event target and location to the band's thumb object when handling drag motions.
Return Value:
Returns true if the event has been handled and no further action is necessary; returns false if the event is to be given to the component's parent.
Parameter Description e The event. Overrides:
Overrides handleEvent in class Component.
public Dimension minimumSize();Determines the minimum size of the band.
Return Value:
Returns the minimum size.
Overrides:
Overrides minimumSize in class UIPanel.
public void setBreak(boolean on);Sets or clears the BREAK attribute in the control's style.
Return Value:
No return value.
Parameter Description on Set to true to set the BREAK attribute; set to false to clear this attribute.
public void setDragBreak(boolean on);Sets or clears the DRAGBREAK attribute in the control's style.
Return Value:
No return value.
Parameter Description on Set to true to set the DRAGBREAK attribute; set to false to clear this attribute.
public void setRestoredWidth(int width);Sets the width that the band will be restored to.
Return Value:
No return value.
Parameter Description width The width in pixels of a restored band.
public void setStyle(int style);Sets the current style for the band.
Return Value:
No return value.
Parameter Description style Can be any bitwise combination of BREAK and/or DRAGBREAK. Remarks:
An IllegalArgumentException exception is thrown if any undefined style bits are specified.
© 1997 Microsoft Corporation. All rights reserved. Legal Notices.