| java.lang.Object org.wings.SComponent
All known Subclasses: org.wings.STable, org.wings.dnd.DragAndDropManager, org.wings.SLabel, org.wings.SPopup, org.wings.SSpinner, org.wingx.XColorPicker, org.wingx.XPopupFrame, org.wings.STree, foo.bar.MyComponent, org.wings.SSpacer, org.wings.SSlider, org.wings.SAbstractAdjustable, org.wings.SComboBox, org.wings.SProgressBar, org.wings.SContainer, org.wings.SFileChooser, org.wings.STextComponent, org.wings.SPopupMenu, org.wings.SAbstractIconTextCompound, org.wings.SRawTextComponent, org.wings.SSeparator, org.wings.SList,
Constructor Summary | |
public | SComponent() Default empty constructor. |
Method Summary | |
final public void | addComponentListener(SComponentListener l) Adds the specified component listener to receive component events from
this component. | public void | addDynamicStyle(Style style) Register a new CSS style on this component for a specfic CSS selector. | final protected void | addEventListener(Class<T> type, T listener) | public void | addNotify() Method called to notify this SComponent that it has a new parent component. | final public void | addParentFrameListener(SParentFrameListener l) Registers a "parent frame listener" to receive events from
this component when the parent frame chanegs i.e. | final public void | addRenderListener(SRenderListener renderListener) Adds a listenere to this component which wil get notified when the rendering of
this components starts. | final public void | addScriptListener(ScriptListener listener) Adds the specified component listener to receive component events from
this component. | public void | addStyle(String additionalCssClassName) Append a style class name to the style string. | public Object | clone() Clone this component. | protected void | fireComponentChangeEvent(SComponentEvent aEvent) Reports a component change. | public void | fireFinalEvents() Internal event trigger used by CGs. | protected void | fireKeyEvents() Internal method to trigger firing of key events. | final public void | fireRenderEvent(int type) Internal method called by the CGs to indicate different states of the rendering process. | public ActionMap | getActionMap() | public Color | getBackground() Returns the current background color of this component. | public SBorder | getBorder() Returns the border of this component or null if no border has been set. | public ComponentCG | getCG() Return the look and feel delegate. | final public Object | getClientProperty(Object key) Returns the value of the property with the specified key. | public SPopupMenu | getComponentPopupMenu() | public Style | getDynamicStyle(Selector selector) Returns the style defined for the passed CSS selector.
Parameters: selector - The CSS selector the style to retrieve. | public Collection | getDynamicStyles() Returns the collection of currently defined CSS styles on this component. | public int | getFocusTraversalIndex() returns the focus traversal index. | public SFont | getFont() Return the font used inside this component. | public Color | getForeground() Return the components foreground color. | public int | getHorizontalAlignment() Return the value of the horizontal alignment property. | public InputMap | getInputMap() | public InputMap | getInputMap(int condition) | final protected int | getListenerCount(Class type) Returns the number of listeners of the specified type for this component. | final protected Object[] | getListenerList() Returns all the listeners of this component. | final public EventListener[] | getListeners(Class<? extends EventListener> type) | public String | getLowLevelEventId() Default implementation of the method in
LowLevelEventListener . | final public String | getName() Gets the name property of a component. | final public SContainer | getParent() Return the parent container. | public SFrame | getParentFrame() Return the parent frame.
NOTE: You will receive null if you call this i.e. | public SDimension | getPreferredSize() Get the preferred size of this component. | public RequestURL | getRequestURL() The URL under which this component is accessible for the browser. | public boolean | getResidesInForm() Return true, if this component is contained in a form. | public List<ScriptListener> | getScriptListenerList() Returns the script listeners of this component. | public ScriptListener[] | getScriptListeners() | final public Session | getSession() Return the session this component belongs to. | public boolean | getShowAsFormComponent() Test, what display method is set. | public String | getStyle() The current CSS style class name. | public String | getToolTipText() Return the tooltip text. | public int | getVerticalAlignment() Return the value of the vertical alignment property. | public void | invite(ComponentVisitor visitor) Invite a ComponentVisitor. | protected static boolean | isDifferent(Object oldObject, Object newObject) use this method for changing a variable. | public boolean | isEnabled() Return true if this component is enabled. | public boolean | isFocusOwner() Returns true if this SComponent is owning the edit focus. | public boolean | isRecursivelyVisible() Return the visibility. | public boolean | isReloadForced() | protected boolean | isUpdatePossible() | public boolean | isVisible() Return the local visibility. | protected String | paramString() Generates a string describing this SComponent . | protected void | processComponentEvent(SComponentListener listener, SComponentEvent e) Processes component events occurring on this component by
dispatching them to any registered
SComponentListener objects.
This method is not called unless component events are
enabled for this component. | protected boolean | processKeyEvents(String[] values) | protected void | processLowLevelEvent(String name, String[] values) | final public void | putClientProperty(Object key, Object value) Add an arbitrary key/value "client property" to this component.
The get/putClientProperty methods provide access to
a small per-instance hashtable. | final void | register() | public void | reload() Marks this component as subject to reload. | final protected void | reloadIfChange(Object oldVal, Object newVal) Mark this component as subject to reload if the property,
that is given in its old and new fashion, changed. | final protected void | reloadIfChange(int oldVal, int newVal) Mark this component as subject to reload if the property,
that is given in its old and new fashion, changed. | final protected void | reloadIfChange(boolean oldVal, boolean newVal) Mark this component as subject to reload if the property,
that is given in its old and new fashion, changed. | final protected void | reloadIfChange(byte oldVal, byte newVal) Mark this component as subject to reload if the property,
that is given in its old and new fashion, changed. | final protected void | reloadIfChange(short oldVal, short newVal) Mark this component as subject to reload if the property,
that is given in its old and new fashion, changed. | final protected void | reloadIfChange(long oldVal, long newVal) Mark this component as subject to reload if the property,
that is given in its old and new fashion, changed. | final protected void | reloadIfChange(float oldVal, float newVal) Mark this component as subject to reload if the property,
that is given in its old and new fashion, changed. | final protected void | reloadIfChange(double oldVal, double newVal) Mark this component as subject to reload if the property,
that is given in its old and new fashion, changed. | final protected void | reloadIfChange(char oldVal, char newVal) Mark this component as subject to reload if the property,
that is given in its old and new fashion, changed. | final public void | removeComponentListener(SComponentListener l) Removes the specified component listener so that it no longer
receives component events from this component. | public void | removeDynamicStyle(Selector selector) Remove all CSS style definitions defined for the passed CSS selector.
Parameters: selector - The selector. | final protected void | removeEventListener(Class<T> type, T listener) Removed named event listener. | public void | removeNotify() Method called to notify this SComponent that it has no longer a parent component. | final public void | removeParentFrameListener(SParentFrameListener l) Removes the specified parent frame listener so that it no longer
receives events from this component. | final public void | removeRenderListener(SRenderListener renderListener) Removes the named render listener. | final public void | removeScriptListener(ScriptListener listener) Removes the specified component listener so that it no longer
receives component events from this component. | public void | removeStyle(String cssStyleClassName) Remove a style class definiton from this component. | public void | requestFocus() Requests the edit focus for this component for the following renderings
by calling
SFrame.setFocus(SComponent) . | public void | scrollRectToVisible(Rectangle aRect) Forwards the scrollRectToVisible() message to the SComponent's
parent. | public void | setActionMap(ActionMap actionMap) Binds action names to
Action s. | public void | setAttribute(String cssPropertyName, String value) Defines a free text css property / value pair to this component. | public void | setAttribute(CSSProperty property, String propertyValue) Assign or overwrite a CSS property/value pair on this component. | public void | setAttribute(Selector selector, CSSProperty property, String propertyValue) Assign or overwrite a CSS property/value pair at this component. | public void | setAttribute(Selector selector, CSSProperty property, SIcon icon) Convenience variant of
SComponent.setAttribute(org.wings.style.Selector,org.wings.style.CSSProperty,String) .
Converts the passed icon into a URL and applies the according CSS style.
Parameters: selector - A valid CSS selector. | public void | setAttribute(Selector selector, CSSProperty property, Color color) Convenience variant of
SComponent.setAttribute(org.wings.style.Selector,org.wings.style.CSSProperty,String) .
Converts the passed color into according color string.
Parameters: selector - A valid CSS selector. | public void | setAttributes(Selector selector, CSSAttributeSet attributes) | public void | setBackground(Color color) Set the components foreground color. | public void | setBorder(SBorder border) Sets the border for this component. | public void | setCG(ComponentCG newCG) Set the look and feel delegate for this component.
SComponent subclasses generally override this method
to narrow the argument type, e.g. | public void | setComponentPopupMenu(SPopupMenu popupMenu) | public void | setDynamicStyles(Collection dynamicStyles) Adds the passed collection of
Style definitions. | public void | setEnabled(boolean enabled) Set wether this component should be enabled. | public void | setFocusTraversalIndex(int index) The index in which the focus is traversed using Tab. | public void | setFont(SFont font) Set the font. | public void | setForeground(Color color) Set the foreground color. | public void | setHorizontalAlignment(int alignment) Set the horizontal alignment. | public void | setInputMap(InputMap inputMap) Map for key binding feature. | public void | setInputMap(int condition, InputMap inputMap) Sets The current input map. | public void | setName(String uniqueName) Sets the name property of a component which must be unique!
Assigning the same name multiple times will cause strange results!
Valid names must begin with a letter ([A-Za-z]), underscores ("_") or dollars ("$") and may be followed by any number of
letters, digits ([0-9]), underscores ("_") and dollars ("$")
If no name is set, it is generated when necessary.
Explanation: This property is an identifier which is used inside the generated HTML as an element identifier (id="")
and sometimes as a javascript function name.
Parameters: uniqueName - A unique name to set. | public void | setNameRaw(String uncheckedName) Direct setter for name. | public void | setParent(SContainer parent) Sets the parent container. | protected void | setParentFrame(SFrame parentFrame) Sets the parent frame. | public void | setPreferredSize(SDimension preferredSize) Set the preferred size of the receiving component in pixel. | public void | setReloadForced(boolean forced) | public void | setShowAsFormComponent(boolean showAsFormComponent) Set display mode (href or form-component).
An AbstractButton can appear as HTML-Form-Button or as
HTML-HREF. | public void | setStyle(String cssClassName) Set an CSS class name provided by the laf-provided Cascading Style Sheet (CSS), which should
be applied to this component.
Note: Probably the
SComponent.addStyle(String) method is more what you want.
By default this is set to the wingS component class name (i.e. | public void | setToolTipText(String t) Set the tooltip text. | public void | setVerticalAlignment(int alignment) Set the vertical alignment. | public void | setVisible(boolean visible) Set the visibility. | public String | toString() A string representation of this component. | final void | unregister() | public void | update(Update update) Hands the given update to the Reload Manager. | public void | updateCG() Notification from the CGFactory that the L&F has changed. | public void | write(Device s) Mark this component as subject to reload if the property,
that is given in its old and new fashion, changed. |
SELECTOR_ALL | final public static Selector SELECTOR_ALL(Code) | | Global CSS selector
|
WHEN_FOCUSED_OR_ANCESTOR_OF_FOCUSED_COMPONENT | final public static int WHEN_FOCUSED_OR_ANCESTOR_OF_FOCUSED_COMPONENT(Code) | | Constants for conditions on which actions are triggered. Mainly two
cases: the focus has either to be at the component (or at a child)
or somewhere in the parent frame.
See Also: SComponent.setInputMap(int,javax.swing.InputMap) |
WHEN_IN_FOCUSED_FRAME | final public static int WHEN_IN_FOCUSED_FRAME(Code) | | Constants for conditions on which actions are triggered. Mainly two
cases: the focus has either to be at the component (or at a child)
or somewhere in the parent frame.
See Also: SComponent.setInputMap(int,javax.swing.InputMap) |
enabled | protected boolean enabled(Code) | | Enabled / disabled.
|
visible | protected boolean visible(Code) | | Visibility of the component.
|
SComponent | public SComponent()(Code) | | Default empty constructor.
The method updateCG is called during construction time to get a cg delegate installed (renderer).
|
addEventListener | final protected void addEventListener(Class<T> type, T listener)(Code) | | Adds an event listener for the given event class
Parameters: type - The class/type of events to listen to. Parameters: listener - The listener itself. |
addNotify | public void addNotify()(Code) | | Method called to notify this SComponent that it has a new parent component.
This Method is called internal and should not be called directly, but can be overerloaded
to react on this event.
|
addRenderListener | final public void addRenderListener(SRenderListener renderListener)(Code) | | Adds a listenere to this component which wil get notified when the rendering of
this components starts. (This happens after all events / request has been processed and wingS
starts to build the response).
Parameters: renderListener - See Also: SRenderListener |
addStyle | public void addStyle(String additionalCssClassName)(Code) | | Append a style class name to the style string. Use this method if you want to append a specific CSS
class to a componentn without loosing the other CSS styles assigned to the component (i.e. the wingS
default styles.)
Parameters: additionalCssClassName - The style class to remove (if existing). See Also: SComponent.removeStyle(String) |
clone | public Object clone()(Code) | | Clone this component.
a clone of this component |
fireFinalEvents | public void fireFinalEvents()(Code) | | Internal event trigger used by CGs.
This Method is called internal and should not be called directly
|
fireKeyEvents | protected void fireKeyEvents()(Code) | | Internal method to trigger firing of key events.
|
getBackground | public Color getBackground()(Code) | | Returns the current background color of this component.
The current background color or null |
getCG | public ComponentCG getCG()(Code) | | Return the look and feel delegate.
the componet's cg |
getClientProperty | final public Object getClientProperty(Object key)(Code) | | Returns the value of the property with the specified key. Only
properties added with putClientProperty will return
a non-null value.
the value of this property or null See Also: SComponent.putClientProperty |
getDynamicStyles | public Collection getDynamicStyles()(Code) | | Returns the collection of currently defined CSS styles on this component.
A unmodifyable collection of Style instances. |
getFont | public SFont getFont()(Code) | | Return the font used inside this component.
The current font declaration or null |
getForeground | public Color getForeground()(Code) | | Return the components foreground color.
the foreground color or null |
getHorizontalAlignment | public int getHorizontalAlignment()(Code) | | Return the value of the horizontal alignment property.
the horizontal alignment See Also: SConstants |
getListenerCount | final protected int getListenerCount(Class type)(Code) | | Returns the number of listeners of the specified type for this component.
Parameters: type - The type of listeners The number of listeners See Also: EventListenerList |
getListenerList | final protected Object[] getListenerList()(Code) | | Returns all the listeners of this component. For performance reasons, this is the actual data
structure and so no modification of this array should be made.
All listeners of this component. The result array has a pair structure,the first element of each pair is the listener type, the second the listeneritself. It is guaranteed that this returns a non-null array. See Also: EventListenerList |
getListeners | final public EventListener[] getListeners(Class<? extends EventListener> type)(Code) | | Creates an typed array of all listeners of the specified type
Parameters: type - All listeners of this type are added to the result array an array of the specified type with all listeners of the specified type See Also: EventListenerList |
getName | final public String getName()(Code) | | Gets the name property of a component. This property is an identifier,so it should be always unique.
For details refer to
SComponent.setName(String) The name of the component. |
getParent | final public SContainer getParent()(Code) | | Return the parent container.
the container this component resides in |
getRequestURL | public RequestURL getRequestURL()(Code) | | The URL under which this component is accessible for the browser.
This is equivalent to the URL of the component's root frame, as this is the
node externalized to the browser via the
org.wings.resource.ReloadResource externalizer.
The HTTP URL where this component can be accessed. |
getResidesInForm | public boolean getResidesInForm()(Code) | | Return true, if this component is contained in a form.
true, if this component resides in a form, false otherwise |
getScriptListenerList | public List<ScriptListener> getScriptListenerList()(Code) | | Returns the script listeners of this component.
The ScriptListener s in a List . |
getScriptListeners | public ScriptListener[] getScriptListeners()(Code) | | returns the script listeners of this component
the ScriptListener Array. |
getSession | final public Session getSession()(Code) | | Return the session this component belongs to.
the session |
getToolTipText | public String getToolTipText()(Code) | | Return the tooltip text.
the tooltip text |
getVerticalAlignment | public int getVerticalAlignment()(Code) | | Return the value of the vertical alignment property.
the vertical alignment See Also: SConstants |
invite | public void invite(ComponentVisitor visitor) throws Exception(Code) | | Invite a ComponentVisitor.
Invokes visit(SComponent) on the ComponentVisitor.
Parameters: visitor - the visitor to be invited |
isDifferent | protected static boolean isDifferent(Object oldObject, Object newObject)(Code) | | use this method for changing a variable. if a new value is different
from the old value set the new one and notify e.g. the reloadmanager...
|
isEnabled | public boolean isEnabled()(Code) | | Return true if this component is enabled.
true if component is enabled |
isFocusOwner | public boolean isFocusOwner()(Code) | | Returns true if this SComponent is owning the edit focus.
true if this SComponent is owning the edit focus otherwise false See Also: SComponent.requestFocus() |
isRecursivelyVisible | public boolean isRecursivelyVisible()(Code) | | Return the visibility. If the Component itself or any of it's parent is invisible,
this method will return false .
true if this component and all it's ancestors are visible, false otherwise. |
isReloadForced | public boolean isReloadForced()(Code) | | |
isUpdatePossible | protected boolean isUpdatePossible()(Code) | | |
isVisible | public boolean isVisible()(Code) | | Return the local visibility. If set to true this ccmponent
should be visible if all parent components are visible, too.
true If the component and it's children should show, false otherwise See Also: SComponent.isRecursivelyVisible() |
paramString | protected String paramString()(Code) | | Generates a string describing this SComponent .
This method is mainly for debugging purposes.
a string containing all properties |
processKeyEvents | protected boolean processKeyEvents(String[] values)(Code) | | |
processLowLevelEvent | protected void processLowLevelEvent(String name, String[] values)(Code) | | |
putClientProperty | final public void putClientProperty(Object key, Object value)(Code) | | Add an arbitrary key/value "client property" to this component.
The get/putClientProperty methods provide access to
a small per-instance hashtable. Callers can use get/putClientProperty
to annotate components that were created by another module, e.g. a
layout manager might store per child constraints this way. For example:
componentA.putClientProperty("to the left of", componentB);
If value is null this method will remove the property.
Changes to client properties are reported with PropertyChange
events. The name of the property (for the sake of PropertyChange
events) is key.toString() .
The clientProperty dictionary is not intended to support large
scale extensions to SComponent nor should be it considered an
alternative to subclassing when designing a new component.
See Also: SComponent.getClientProperty |
register | final void register()(Code) | | |
reload | public void reload()(Code) | | Marks this component as subject to reload.
The component will be registered with the ReloadManager.
|
reloadIfChange | final protected void reloadIfChange(Object oldVal, Object newVal)(Code) | | Mark this component as subject to reload if the property,
that is given in its old and new fashion, changed.
Parameters: oldVal - the old value of some property Parameters: newVal - the new value of some property |
reloadIfChange | final protected void reloadIfChange(int oldVal, int newVal)(Code) | | Mark this component as subject to reload if the property,
that is given in its old and new fashion, changed.
Parameters: oldVal - the old value of some property Parameters: newVal - the new value of some property |
reloadIfChange | final protected void reloadIfChange(boolean oldVal, boolean newVal)(Code) | | Mark this component as subject to reload if the property,
that is given in its old and new fashion, changed.
Parameters: oldVal - the old value of some property Parameters: newVal - the new value of some property |
reloadIfChange | final protected void reloadIfChange(byte oldVal, byte newVal)(Code) | | Mark this component as subject to reload if the property,
that is given in its old and new fashion, changed.
Parameters: oldVal - the old value of some property Parameters: newVal - the new value of some property |
reloadIfChange | final protected void reloadIfChange(short oldVal, short newVal)(Code) | | Mark this component as subject to reload if the property,
that is given in its old and new fashion, changed.
Parameters: oldVal - the old value of some property Parameters: newVal - the new value of some property |
reloadIfChange | final protected void reloadIfChange(long oldVal, long newVal)(Code) | | Mark this component as subject to reload if the property,
that is given in its old and new fashion, changed.
Parameters: oldVal - the old value of some property Parameters: newVal - the new value of some property |
reloadIfChange | final protected void reloadIfChange(float oldVal, float newVal)(Code) | | Mark this component as subject to reload if the property,
that is given in its old and new fashion, changed.
Parameters: oldVal - the old value of some property Parameters: newVal - the new value of some property |
reloadIfChange | final protected void reloadIfChange(double oldVal, double newVal)(Code) | | Mark this component as subject to reload if the property,
that is given in its old and new fashion, changed.
Parameters: oldVal - the old value of some property Parameters: newVal - the new value of some property |
reloadIfChange | final protected void reloadIfChange(char oldVal, char newVal)(Code) | | Mark this component as subject to reload if the property,
that is given in its old and new fashion, changed.
Parameters: oldVal - the old value of some property Parameters: newVal - the new value of some property |
removeDynamicStyle | public void removeDynamicStyle(Selector selector)(Code) | | Remove all CSS style definitions defined for the passed CSS selector.
Parameters: selector - The selector. The default selector for most CSS attributes is SComponent.SELECTOR_ALL. |
removeEventListener | final protected void removeEventListener(Class<T> type, T listener)(Code) | | Removed named event listener.
Parameters: type - The class/type of events to listen to. Parameters: listener - The listener itself. |
removeNotify | public void removeNotify()(Code) | | Method called to notify this SComponent that it has no longer a parent component.
This Method is called internal and should not be called directly, but can be overerloaded
to react on this event.
|
removeStyle | public void removeStyle(String cssStyleClassName)(Code) | | Remove a style class definiton from this component.
Parameters: cssStyleClassName - The style class to remove (if existing). |
scrollRectToVisible | public void scrollRectToVisible(Rectangle aRect)(Code) | | Forwards the scrollRectToVisible() message to the SComponent's
parent. Components that can service the request, such as
SScrollPane, override this method and perform the scrolling.
Parameters: aRect - the visible Rectangle See Also: SScrollPane |
setAttribute | public void setAttribute(String cssPropertyName, String value)(Code) | | Defines a free text css property / value pair to this component.
The CSS property will appear as an inline style in the generated HTML code.
|
setAttribute | public void setAttribute(CSSProperty property, String propertyValue)(Code) | | Assign or overwrite a CSS property/value pair on this component. This CSS property definition will
use a CSS selector which adresses this component as whole as CSS selector (new CSSProperty(this) ).
The CSS property will appear as an inline style in the generated HTML code.
Parameters: property - The CSS property (i.e. CSSProperty.BACKGROUND). Parameters: propertyValue - A valid string value for this CSS property (i.e. red or #fff in our example). |
setAttribute | public void setAttribute(Selector selector, CSSProperty property, String propertyValue)(Code) | | Assign or overwrite a CSS property/value pair at this component. This CSS property definition will
use the CSS selector you passed, so in the most exotic case it could affect a totally different
component or component area. Typically you use this method to assign CSS property values to
pseudo CSS selectors
Selector . This are selector affecting only a part of a component
and not the component at all..
The CSS property will appear as an inline style in the generated HTML code.
Parameters: selector - A valid CSS selector. Typically values are i.e. the SComponent.SELECTOR_ALLor other SELECTOR_xxx value instances declared in the component.(look ie. at STabbedPane.SELECTOR_CONTENT) or manually constructed instances ofSelector . In most case SComponent.setAttribute(org.wings.style.CSSProperty,String) will be yourchoice. Parameters: property - The css property you want to define a value for Parameters: propertyValue - A valid string value for this property. |
setBackground | public void setBackground(Color color)(Code) | | Set the components foreground color.
Parameters: color - the new foreground color or null |
setBorder | public void setBorder(SBorder border)(Code) | | Sets the border for this component.
Parameters: border - the border to be set for the component |
setComponentPopupMenu | public void setComponentPopupMenu(SPopupMenu popupMenu)(Code) | | |
setDynamicStyles | public void setDynamicStyles(Collection dynamicStyles)(Code) | | Adds the passed collection of
Style definitions. Existing Styles for the same CSS selectors
(see
org.wings.style.Style.getSelector ) are overwritten.
Parameters: dynamicStyles - A collection collection of Style definitions. |
setEnabled | public void setEnabled(boolean enabled)(Code) | | Set wether this component should be enabled.
Parameters: enabled - true if the component is enabled, false otherwise |
setFocusTraversalIndex | public void setFocusTraversalIndex(int index)(Code) | | The index in which the focus is traversed using Tab. This is
a very simplified notion of traversing the focus, but that is,
what browser like interfaces currently offer. This has a bit rough
edge, since you have to make sure, that the index is unique within
the whole frame. You probably don't want to change this
programmatically, but this is set usually by the template property
manager.
Parameters: index - the focus traversal index. Pressing the focus traversalkey (usually TAB) in the browser jumps to the next index.Must not be zero. |
setFont | public void setFont(SFont font)(Code) | | Set the font.
Parameters: font - the new font |
setForeground | public void setForeground(Color color)(Code) | | Set the foreground color.
Parameters: color - the new foreground color or null |
setHorizontalAlignment | public void setHorizontalAlignment(int alignment)(Code) | | Set the horizontal alignment.
Parameters: alignment - new value for the horizontal alignment See Also: SConstants |
setName | public void setName(String uniqueName)(Code) | | Sets the name property of a component which must be unique!
Assigning the same name multiple times will cause strange results!
Valid names must begin with a letter ([A-Za-z]), underscores ("_") or dollars ("$") and may be followed by any number of
letters, digits ([0-9]), underscores ("_") and dollars ("$")
If no name is set, it is generated when necessary.
Explanation: This property is an identifier which is used inside the generated HTML as an element identifier (id="")
and sometimes as a javascript function name.
Parameters: uniqueName - A unique name to set. Only valid identifier as described are allowed! See Also: Character |
setNameRaw | public void setNameRaw(String uncheckedName)(Code) | | Direct setter for name. Do not use unless you explicitly know what you're doing!
(Former package) protected raw setter for component name to avoid sanity check.
Parameters: uncheckedName - String to use as componentn name/identifier. |
setParent | public void setParent(SContainer parent)(Code) | | Sets the parent container. Also gets the parent frame from the parent.
Parameters: parent - the container |
setParentFrame | protected void setParentFrame(SFrame parentFrame)(Code) | | Sets the parent frame.
Parameters: parentFrame - the frame |
setPreferredSize | public void setPreferredSize(SDimension preferredSize)(Code) | | Set the preferred size of the receiving component in pixel.
It is not guaranteed that the component accepts this property because of
missing implementations in the component cg or html properties.
If width or height is zero, it is ignored and the browser
defines the size.
See Also: org.wings.SComponent.getPreferredSize |
setReloadForced | public void setReloadForced(boolean forced)(Code) | | |
setShowAsFormComponent | public void setShowAsFormComponent(boolean showAsFormComponent)(Code) | | Set display mode (href or form-component).
An AbstractButton can appear as HTML-Form-Button or as
HTML-HREF. If button is inside a
SForm the default
is displaying it as html form button.
Setting showAsFormComponent to false will
force displaying as href even if button is inside
a form.
Parameters: showAsFormComponent - if true, display as link, if false as html form component. |
setStyle | public void setStyle(String cssClassName)(Code) | | Set an CSS class name provided by the laf-provided Cascading Style Sheet (CSS), which should
be applied to this component.
Note: Probably the
SComponent.addStyle(String) method is more what you want.
By default this is set to the wingS component class name (i.e. "SLabel").
The PLAFs render the value of this String to an class="cssClassName" attribute
inside the generated HTML code of this component.
The default wingS plaf initializes this by default to the wingS component class name
(i.e. SButton for button instances). Please be aware if you replace this
default value, the default wingS style will no longer take effect, as they operate on these
default styles. To avoid this you should append your CSS styles via spaces i.e.
c.setStyle(c.getStyle + "myStyle");
Parameters: cssClassName - The new CSS name value for this component See Also: SComponent.addStyle(String) See Also: SComponent.removeStyle(String) |
setToolTipText | public void setToolTipText(String t)(Code) | | Set the tooltip text. To style use HTML tags.
Parameters: t - the new tooltip text |
setVerticalAlignment | public void setVerticalAlignment(int alignment)(Code) | | Set the vertical alignment.
Parameters: alignment - new value for the vertical alignment See Also: SConstants |
setVisible | public void setVisible(boolean visible)(Code) | | Set the visibility.
Parameters: visible - wether this component will show or not |
toString | public String toString()(Code) | | A string representation of this component. Uses the
SComponent.paramString() methods
string representation of this component with all properties. |
unregister | final void unregister()(Code) | | |
update | public void update(Update update)(Code) | | Hands the given update to the Reload Manager.
Parameters: update - the update for this component |
write | public void write(Device s) throws IOException(Code) | | Mark this component as subject to reload if the property,
that is given in its old and new fashion, changed.
|
|
|