public abstract class Component extends java.lang.Object implements RootControl
| Modifier | Constructor and Description |
|---|---|
protected |
Component()
Initializes a new instance of the
Component class. |
| Modifier and Type | Method and Description |
|---|---|
protected static java.lang.Double |
add(java.lang.Double value1,
java.lang.Double value2)
Sums specified nullable double values.
|
void |
arrange(double x,
double y,
double w,
double h,
RenderContext context)
Sets the location and size of this component relative to its parent.
|
void |
associateJComponent(Component target,
javax.swing.JComponent component)
Associates a Swing JComponent with the source
Component. |
ComponentController |
createController(RenderContext context)
Returns a
ComponentController used to interact with this component. |
void |
dissociateJComponent(Component target)
Dissociates the Swing JComponent from the source
Component. |
abstract void |
draw(RenderContext context)
Draws this component in specified
RenderContext. |
protected java.lang.Double |
effectiveMeasuredHeight() |
protected java.lang.Double |
effectiveMeasuredWidth() |
double |
getActualHeight()
Gets a double value specifying the component's assigned height.
|
double |
getActualWidth()
Gets a double value specifying the component's assigned width.
|
java.lang.Double |
getDesiredHeight()
Gets a nullable double value specifying the component's desired height.
|
java.lang.Double |
getDesiredWidth()
Gets a nullable double value specifying the component's desired width.
|
int |
getGridColumn()
Gets the column index of this component when placed inside a GridPanel.
|
int |
getGridRow()
Gets the row index of this component when placed inside a GridPanel.
|
java.lang.Double |
getHeight()
Gets a fixed height for this component.
|
HitTestVisibility |
getHitTestVisibility()
Gets the hit-test visibility of this component.
|
LayoutAlignment |
getHorizontalAlignment()
Gets the horizontal alignment of this component inside the layout rectangle allocated by its parent panel.
|
Margins |
getMargin()
Gets the margin space around this component relative to the layout rectangle allocated by its parent panel.
|
Component |
getParent() |
java.awt.geom.Rectangle2D |
getRectInParent()
Gets the boundaries of this component relative to its parent.
|
java.lang.String |
getToolTip()
Gets the component's tooltip text.
|
LayoutAlignment |
getVerticalAlignment()
Gets the vertical alignment of this component inside the layout rectangle allocated by its parent panel.
|
Visibility |
getVisibility()
Gets the visibility of this component.
|
java.lang.Double |
getWidth()
Gets a fixed width for this component.
|
double |
getXInParent()
Gets a double value specifying the component's horizontal position relative to its parent.
|
double |
getYInParent()
Gets a double value specifying the component's vertical position relative to its parent.
|
Component |
hitTest(double x,
double y)
Returns the component containing specified point.
|
void |
invalidate()
Invalidates the appearance of this component and calls its
draw(com.mindfusion.charting.RenderContext) method at next draw operation. |
void |
invalidate(java.awt.geom.Rectangle2D rect)
Invalidates the appearance of this component and calls its
draw(com.mindfusion.charting.RenderContext) method at next draw operation. |
void |
invalidate(java.awt.geom.Rectangle2D rect,
Component panel)
Invalidates the specified region of a component.
|
void |
invalidateLayout()
Invalidates the current layout and runs a new layout pass before next draw operation.
|
void |
invalidateLayout(Component panel)
Invalidates layout of specified component.
|
java.awt.geom.Point2D |
localToRoot(java.awt.geom.Point2D point)
Transforms the specified point to the coordinate system of the root panel.
|
abstract void |
measure(double maxWidth,
double maxHeight,
RenderContext context)
Measures the desired size of this component.
|
java.awt.geom.Point2D |
rootToLocal(java.awt.geom.Point2D point)
Transforms the specified point to the coordinate system of this component.
|
void |
setActualHeight(double value)
Sets a double value specifying the component's assigned height.
|
void |
setActualWidth(double value)
Sets a double value specifying the component's assigned width.
|
void |
setDesiredHeight(java.lang.Double value)
Sets a nullable double value specifying the component's desired height.
|
void |
setDesiredWidth(java.lang.Double value)
Sets a nullable double value specifying the component's desired width.
|
void |
setGridColumn(int value)
Sets the column index of this component when placed inside a GridPanel.
|
void |
setGridRow(int value)
Sets the row index of this component when placed inside a GridPanel.
|
void |
setHeight(double value)
Sets a fixed height for this component.
|
void |
setHitTestVisibility(HitTestVisibility value)
Sets the hit-test visibility of this component.
|
void |
setHorizontalAlignment(LayoutAlignment value)
Sets the horizontal alignment of this component inside the layout rectangle allocated by its parent panel.
|
void |
setMargin(Margins value)
Sets the margin space around this component relative to the layout rectangle allocated by its parent panel.
|
void |
setParent(Component value) |
void |
setToolTip(java.lang.String value)
Sets the component's tooltip text.
|
void |
setVerticalAlignment(LayoutAlignment value)
Sets the vertical alignment of this component inside the layout rectangle allocated by its parent panel.
|
void |
setVisibility(Visibility value)
Sets the visibility of this component.
|
void |
setWidth(double value)
Sets a fixed width for this component.
|
void |
setXInParent(double value)
Sets a double value specifying the component's horizontal position relative to its parent.
|
void |
setYInParent(double value)
Sets a double value specifying the component's vertical position relative to its parent.
|
void |
visit(ComponentVisitor visitor)
Implements the visitor design pattern.
|
protected Component()
Component class.public abstract void measure(double maxWidth,
double maxHeight,
RenderContext context)
maxWidth - 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)
x - 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 abstract void draw(RenderContext context)
RenderContext.context - A RenderContext instance.public ComponentController createController(RenderContext context)
ComponentController used to interact with this component.context - A RenderContext instance.ComponentController-derived class.public java.lang.Double getDesiredWidth()
measure(double, double, com.mindfusion.charting.RenderContext).public void setDesiredWidth(java.lang.Double value)
public java.lang.Double getDesiredHeight()
measure(double, double, com.mindfusion.charting.RenderContext).public void setDesiredHeight(java.lang.Double value)
public double getActualWidth()
arrange(double, double, double, double, com.mindfusion.charting.RenderContext).public void setActualWidth(double value)
public double getActualHeight()
public void setActualHeight(double value)
public double getXInParent()
public void setXInParent(double value)
public double getYInParent()
public void setYInParent(double value)
public java.awt.geom.Rectangle2D getRectInParent()
public int getGridRow()
public void setGridRow(int value)
public int getGridColumn()
public void setGridColumn(int value)
protected static java.lang.Double add(java.lang.Double value1,
java.lang.Double value2)
value1 - The first term to sum.value2 - The second term to sum.public void visit(ComponentVisitor visitor)
visitor - An instance of a ComponentVisitor-derived class.public Component hitTest(double x, double y)
x - X coordinate of the point to test.y - Y coordinate of the point to test.Component instance if one contains the point, or null otherwise.public Component getParent()
public void setParent(Component value)
public java.awt.geom.Point2D localToRoot(java.awt.geom.Point2D point)
point - A Point2D instance containing coordinates local to this component.public java.awt.geom.Point2D rootToLocal(java.awt.geom.Point2D point)
point - A Point2D instance containing coordinates relative to the root panel.public void invalidateLayout()
public void invalidate()
draw(com.mindfusion.charting.RenderContext) method at next draw operation.public void invalidate(java.awt.geom.Rectangle2D rect)
draw(com.mindfusion.charting.RenderContext) method at next draw operation.rect - A RectD instance specifying the invalid rectangle.public LayoutAlignment getHorizontalAlignment()
public void setHorizontalAlignment(LayoutAlignment value)
public LayoutAlignment getVerticalAlignment()
public void setVerticalAlignment(LayoutAlignment value)
public Margins getMargin()
public void setMargin(Margins value)
public Visibility getVisibility()
public void setVisibility(Visibility value)
public HitTestVisibility getHitTestVisibility()
public void setHitTestVisibility(HitTestVisibility value)
public java.lang.String getToolTip()
public void setToolTip(java.lang.String value)
public java.lang.Double getWidth()
public void setWidth(double value)
public java.lang.Double getHeight()
public void setHeight(double value)
protected java.lang.Double effectiveMeasuredWidth()
protected java.lang.Double effectiveMeasuredHeight()
public void invalidate(java.awt.geom.Rectangle2D rect,
Component panel)
RootControlinvalidate in interface RootControlrect - The area to invalidate and redraw.panel - The reference Component.public void associateJComponent(Component target, javax.swing.JComponent component)
RootControlComponent.
Causes the former to be drawn directly above the source, covering its bounds entirely.associateJComponent in interface RootControltarget - The source Component.component - The JComponent to be associated.public void dissociateJComponent(Component target)
RootControlComponent.
Does nothing if the is no JComponent currently associated.dissociateJComponent in interface RootControltarget - The source Component.public void invalidateLayout(Component panel)
RootControlinvalidateLayout in interface RootControlpanel - The component to invalidate.