| java.lang.Object net.xoetrope.xui.helper.BuddyHelper
BuddyHelper | public class BuddyHelper (Code) | | Extends XStyleFactory by adding a caption component whenever a
new component is added. This is intended for use with components such as
TextFields, Choice and so on that normally have an associated label or caption
Copyright: Copyright (c) Xoetrope Ltd., 1998-2003
License: see license.txt
version: $Revision: 1.18 $ |
Method Summary | |
public Component | addComponent(String type, int x1, int x2, int y, int w, int h, String caption, String txt, String style) | public Component | addComponent(String type, int x1, int x2, int x3, int y, int w, int h, String caption, String txt, String suffix, String style) | public Component | addComponent(String type, int x, int y, int w, int h, String caption, String txt, String style) | public Component | addComponent(String className, int x, int y, int w, int h, String caption, String style) | public Component | getBuddy(Component comp) Gets the associated buddy label. | public Component | getBuddySuffix(Component comp, int item) Get a component following the referenced component. | public void | setEnabled(Component comp, boolean b) | public void | setVisible(Component comp, boolean b) |
BuddyHelper | public BuddyHelper(XStyleFactory sf)(Code) | | Constructs a new BuddyHelper.
Parameters: sf - the XStyleFactory used to create the new components. |
addComponent | public Component addComponent(String type, int x1, int x2, int y, int w, int h, String caption, String txt, String style)(Code) | | Pass the addNamedComponent call to the XStyleFactory base Class
Parameters: type - The type of object being constructed Parameters: x1 - The x coordinate of the new label component Parameters: x2 - The x coordinate of the new primary component Parameters: y - The y coordinate of the new component Parameters: w - The total width of the new components Parameters: h - The height of the new component Parameters: caption - The text of the associated label Parameters: txt - The text/content of the new component Parameters: style - The name of the style to apply |
addComponent | public Component addComponent(String type, int x1, int x2, int x3, int y, int w, int h, String caption, String txt, String suffix, String style)(Code) | | Pass the addNamedComponent call to the XStyleFactory base Class
Parameters: type - The type of object being constructed Parameters: x1 - The x coordinate of the new label component Parameters: x2 - The x coordinate of the new primary component Parameters: x3 - The x coordinate of the suffix label Parameters: y - The y coordinate of the new component Parameters: w - The total width of the new components Parameters: h - The height of the new component Parameters: caption - The text of the associated label Parameters: txt - The text/content of the new component Parameters: style - The name of the style to apply |
addComponent | public Component addComponent(String type, int x, int y, int w, int h, String caption, String txt, String style)(Code) | | Pass the addNamedComponent call to the XStyleFactory base Class
Parameters: type - The type of object being constructed Parameters: x - The x coordinate of the new component Parameters: y - The y coordinate of the new component Parameters: w - The total width of the new components Parameters: h - The height of the new component Parameters: caption - The text of the associated label Parameters: txt - The text/content of the new component Parameters: style - The name of the style to apply |
addComponent | public Component addComponent(String className, int x, int y, int w, int h, String caption, String style)(Code) | | Pass the addNamedComponent call to the XStyleFactory base Class
Parameters: className - The name of the class to be constructed Parameters: x - The x coordinate of the new component Parameters: y - The y coordinate of the new component Parameters: w - The total width of the new components Parameters: h - The height of the new component Parameters: caption - The text of the associated label Parameters: style - The name of the style to apply |
getBuddy | public Component getBuddy(Component comp)(Code) | | Gets the associated buddy label. The buddy is assumed
Parameters: comp - the component for which the buddy label was added |
getBuddySuffix | public Component getBuddySuffix(Component comp, int item)(Code) | | Get a component following the referenced component. This method can be used
to retrieve the suffix of a component added using the addComponent method
for 3 components.
Parameters: comp - the main component Parameters: item - the offset, normally 1 the suffix component |
setEnabled | public void setEnabled(Component comp, boolean b)(Code) | | Set the enabled state for the component and its buddy
Parameters: comp - the component for which the buddy label was added Parameters: b - true to enable the component, false to disable |
setVisible | public void setVisible(Component comp, boolean b)(Code) | | Set the visible state for the component and its buddy
Parameters: comp - the component for which the buddy label was added Parameters: b - true to show the component, false to hide |
|
|