Package com.ribs.helpers
Class JButtonOrLabelHpr
- java.lang.Object
-
- com.ribs.RJHelper
-
- com.ribs.helpers.JButtonOrLabelHpr
-
- Direct Known Subclasses:
AbstractButtonHpr,JLabelHpr
public class JButtonOrLabelHpr extends RJHelper
This class is the superclass for labels and buttons which handles attributes common to both classes.
-
-
Constructor Summary
Constructors Constructor Description JButtonOrLabelHpr()Creates a new JButtonOrLabelHpr.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfromXML(javax.swing.JComponent aComponent, RXArchiver anArchiver, RXElement anElement)XML unarchival.intgetHorizontalAlignment(javax.swing.JComponent aComponent)Standard button or label propertyintgetHorizontalTextPosition(javax.swing.JComponent aComponent)Standard button or label propertyjavax.swing.IcongetIcon(javax.swing.JComponent aComponent)Returns the button or label icon.intgetIconTextGap(javax.swing.JComponent aComponent)Standard button or label propertyjava.lang.StringgetImageName(javax.swing.JComponent aComponent)Returns the image name for this button's icon.java.lang.StringgetText(javax.swing.JComponent aComponent)Returns the text for the button or label.intgetVerticalAlignment(javax.swing.JComponent aComponent)Standard button or label propertyintgetVerticalTextPosition(javax.swing.JComponent aComponent)Standard button or label propertyvoidsetHorizontalAlignment(javax.swing.JComponent aComponent, int val)Standard button or label propertyvoidsetHorizontalTextPosition(javax.swing.JComponent aComponent, int val)Standard button or label propertyvoidsetIcon(javax.swing.JComponent aComponent, javax.swing.Icon anIcon)Sets the button or label icon.voidsetIconTextGap(javax.swing.JComponent aComponent, int val)Standard button or label propertyvoidsetImageName(javax.swing.JComponent aComponent, java.lang.String aName)Sets the image name for this button's icon and tries to set the icon by asking Ribs for the named icon.voidsetText(javax.swing.JComponent aComponent, java.lang.String aString)Sets the text for the button or label.voidsetVerticalAlignment(javax.swing.JComponent aComponent, int val)Standard button or label propertyvoidsetVerticalTextPosition(javax.swing.JComponent aComponent, int val)Standard button or label propertyRXElementtoXML(javax.swing.JComponent aComponent, RXArchiver anArchiver)XML archival.-
Methods inherited from class com.ribs.RJHelper
add, focusGained, focusLost, fromXMLDeep, get, getActionListener, getAutoscrolls, getAutosizing, getBackground, getBindKey, getBooleanValue, getBoolValue, getCallback, getChangeListener, getColorValue, getComponent, getComponentCount, getFloatValue, getFocusListener, getForeground, getIntValue, getMaster, getMaximumSize, getMinimumSize, getOwner, getRibHeight, getRibWidth, getRibX, getRibY, getSendActionOnFocusLost, getStringValue, getSubstitutionClassString, getValue, initInstance, isOpaque, newInstance, performBindKeyGet, performBindKeySet, sendAction, setAutoscrolls, setAutosizing, setBackground, setBindKey, setCallback, setForeground, setMaster, setMaximumSize, setMinimumSize, setOpaque, setOwner, setSendActionOnFocusLost, setSubstitutionClassString, setValue, setValue, setValue, setValue, setValue, setValue, setValue, takeFloatValue, takeIntValue, testOutBeanBag, toXMLDeep
-
-
-
-
Method Detail
-
getImageName
public java.lang.String getImageName(javax.swing.JComponent aComponent)
Returns the image name for this button's icon.
-
setImageName
public void setImageName(javax.swing.JComponent aComponent, java.lang.String aName)Sets the image name for this button's icon and tries to set the icon by asking Ribs for the named icon.
-
getIcon
public javax.swing.Icon getIcon(javax.swing.JComponent aComponent)
Returns the button or label icon.
-
setIcon
public void setIcon(javax.swing.JComponent aComponent, javax.swing.Icon anIcon)Sets the button or label icon.
-
getText
public java.lang.String getText(javax.swing.JComponent aComponent)
Returns the text for the button or label.
-
setText
public void setText(javax.swing.JComponent aComponent, java.lang.String aString)Sets the text for the button or label.
-
getHorizontalAlignment
public int getHorizontalAlignment(javax.swing.JComponent aComponent)
Standard button or label property
-
setHorizontalAlignment
public void setHorizontalAlignment(javax.swing.JComponent aComponent, int val)Standard button or label property
-
getVerticalAlignment
public int getVerticalAlignment(javax.swing.JComponent aComponent)
Standard button or label property
-
setVerticalAlignment
public void setVerticalAlignment(javax.swing.JComponent aComponent, int val)Standard button or label property
-
getHorizontalTextPosition
public int getHorizontalTextPosition(javax.swing.JComponent aComponent)
Standard button or label property
-
setHorizontalTextPosition
public void setHorizontalTextPosition(javax.swing.JComponent aComponent, int val)Standard button or label property
-
getVerticalTextPosition
public int getVerticalTextPosition(javax.swing.JComponent aComponent)
Standard button or label property
-
setVerticalTextPosition
public void setVerticalTextPosition(javax.swing.JComponent aComponent, int val)Standard button or label property
-
getIconTextGap
public int getIconTextGap(javax.swing.JComponent aComponent)
Standard button or label property
-
setIconTextGap
public void setIconTextGap(javax.swing.JComponent aComponent, int val)Standard button or label property
-
toXML
public RXElement toXML(javax.swing.JComponent aComponent, RXArchiver anArchiver)
XML archival.
-
fromXML
public void fromXML(javax.swing.JComponent aComponent, RXArchiver anArchiver, RXElement anElement)XML unarchival.
-
-