public class ButtonComponent extends Component
| Constructor and Description |
|---|
ButtonComponent()
Initializes a new instance of the
ButtonComponent class. |
| Modifier and Type | Method and Description |
|---|---|
void |
addCustomDrawListener(CustomDrawListener listener) |
void |
addOnClickListener(OnClickListener listener) |
void |
arrange(double x,
double y,
double w,
double h,
RenderContext context)
Sets the location and size of this component relative to its parent.
|
ComponentController |
createController(RenderContext context)
Returns a
ComponentController used to interact with this component. |
void |
draw(RenderContext context)
Draws this component in specified
RenderContext. |
protected void |
fireCustomDraw(ButtonDrawEventArgs e) |
protected void |
fireOnClick(java.util.EventObject e) |
Component |
getContent()
Gets the content displayed inside this button.
|
double |
getPadding()
Gets the padding space between button's content and its borders.
|
void |
measure(double maxWidth,
double maxHeight,
RenderContext context)
Measures the desired size of this component.
|
void |
removeCustomDrawListener(CustomDrawListener listener) |
void |
removeOnClickListener(OnClickListener listener) |
void |
setContent(Component value)
Sets the content displayed inside this button.
|
void |
setPadding(double value)
Sets the padding space between button's content and its borders.
|
add, associateJComponent, dissociateJComponent, effectiveMeasuredHeight, effectiveMeasuredWidth, getActualHeight, getActualWidth, getDesiredHeight, getDesiredWidth, getGridColumn, getGridRow, getHeight, getHitTestVisibility, getHorizontalAlignment, getMargin, getParent, getRectInParent, getToolTip, getVerticalAlignment, getVisibility, getWidth, getXInParent, getYInParent, hitTest, invalidate, invalidate, invalidate, invalidateLayout, invalidateLayout, localToRoot, rootToLocal, setActualHeight, setActualWidth, setDesiredHeight, setDesiredWidth, setGridColumn, setGridRow, setHeight, setHitTestVisibility, setHorizontalAlignment, setMargin, setParent, setToolTip, setVerticalAlignment, setVisibility, setWidth, setXInParent, setYInParent, visitpublic ButtonComponent()
ButtonComponent class.public void measure(double maxWidth,
double maxHeight,
RenderContext context)
measure in class ComponentmaxWidth - The maximum width provided by parent component.maxHeight - The maximum height provided by parent component.context - A RenderContext instance.public void arrange(double x,
double y,
double w,
double h,
RenderContext context)
arrange in class Componentx - A double value specifying horizontal position.y - A double value specifying vertical position.w - A double value specifying the component's width.h - A double value specifying the component's height.context - A RenderContext instance.public void draw(RenderContext context)
RenderContext.draw in class Componentcontext - A RenderContext instance.public ComponentController createController(RenderContext context)
ComponentController used to interact with this component.createController in class Componentcontext - A RenderContext instance.ComponentController-derived class.public Component getContent()
public void setContent(Component value)
public double getPadding()
public void setPadding(double value)
public void addOnClickListener(OnClickListener listener)
public void removeOnClickListener(OnClickListener listener)
protected void fireOnClick(java.util.EventObject e)
public void addCustomDrawListener(CustomDrawListener listener)
public void removeCustomDrawListener(CustomDrawListener listener)
protected void fireCustomDraw(ButtonDrawEventArgs e)