org.jplot2d.element.impl
Interface ComponentEx
-
- All Superinterfaces:
- Element, ElementEx, PComponent
- All Known Subinterfaces:
- AnnotationEx, AxisEx, ContainerEx, CoordinateAnnotationEx, GraphEx, HLineAnnotationEx, HStripAnnotationEx, ImageGraphEx, LayerEx, LegendEx, PlotEx, PointAnnotationEx, RectangleAnnotationEx, RGBImageGraphEx, SymbolAnnotationEx, TitleEx, VLineAnnotationEx, VStripAnnotationEx, XYGraphEx
- All Known Implementing Classes:
- AnnotationImpl, AxisImpl, ComponentImpl, ContainerImpl, CoordinateAnnotationImpl, GraphImpl, HLineAnnotationImpl, HStripAnnotationImpl, ImageGraphImpl, LayerImpl, LegendImpl, PlotImpl, PointAnnotationImpl, RectangleAnnotationImpl, RGBImageGraphImpl, SymbolAnnotationImpl, TitleImpl, VLineAnnotationImpl, VStripAnnotationImpl, XYGraphImpl
public interface ComponentEx extends PComponent, ElementEx
Extended Component that all impl need to implements. Those additional methods is required by environment.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description booleancanContribute()Returnstrueif this component can contribute visible parts to plot rendering artifact when this component is visible.ComponentExcopyStructure(java.util.Map<ElementEx,ElementEx> orig2copyMap)Create a deep copy of this component.voiddraw(java.awt.Graphics2D g)Draw this component only.java.awt.ColorgetEffectiveColor()Returns the effective color of this component.java.lang.StringgetEffectiveFontName()floatgetEffectiveFontSize()intgetEffectiveFontStyle()java.util.Map<Element,Element>getMooringMap()Returns a map to tell why this component cannot be removed from its container.ContainerExgetParent()Gets the parent of this component.booleanisMovable()booleanisRedrawNeeded()Returnstruewhen this component need to be redrawn.voidparentEffectiveColorChanged()voidparentEffectiveFontChanged()voidsetMovable(boolean movable)Set the movable property.voidsetRedrawNeeded(boolean flag)Mark or clear the flag that indicate this component need to be redrawn, eg.voidthisEffectiveColorChanged()Called when setColor() or parentEffectiveColorChanged() change the effective color of this component.voidthisEffectiveFontChanged()Called when setFontXxx() or parentEffectiveFontChanged() change the effective font of this component.-
Methods inherited from interface org.jplot2d.element.PComponent
getBounds, getColor, getEffectiveFont, getFontName, getFontScale, getFontSize, getFontStyle, getLocation, getPaperTransform, getSelectableBounds, getSize, getZOrder, isCacheable, isSelectable, isVisible, setCacheable, setColor, setFont, setFontName, setFontScale, setFontSize, setFontStyle, setSelectable, setVisible, setZOrder
-
Methods inherited from interface org.jplot2d.element.impl.ElementEx
copyFrom, getFullId, getInvokeStepFormParent, notify, setParent
-
Methods inherited from interface org.jplot2d.element.Element
getEnvironment, getId
-
-
-
-
Method Detail
-
getParent
ContainerEx getParent()
Description copied from interface:PComponentGets the parent of this component.
-
isMovable
boolean isMovable()
-
setMovable
void setMovable(boolean movable)
Set the movable property.
-
getMooringMap
java.util.Map<Element,Element> getMooringMap()
Returns a map to tell why this component cannot be removed from its container. The key is the moored element, required by its value.- Returns:
- a map. The key is the element required by its value.
-
canContribute
boolean canContribute()
Returnstrueif this component can contribute visible parts to plot rendering artifact when this component is visible. Subcomponents are not considered.- Returns:
- the indicator
-
getEffectiveColor
java.awt.Color getEffectiveColor()
Returns the effective color of this component.- Returns:
- the effective color of this component
-
getEffectiveFontName
java.lang.String getEffectiveFontName()
-
getEffectiveFontStyle
int getEffectiveFontStyle()
-
getEffectiveFontSize
float getEffectiveFontSize()
-
parentEffectiveColorChanged
void parentEffectiveColorChanged()
-
parentEffectiveFontChanged
void parentEffectiveFontChanged()
-
thisEffectiveColorChanged
void thisEffectiveColorChanged()
Called when setColor() or parentEffectiveColorChanged() change the effective color of this component.
-
thisEffectiveFontChanged
void thisEffectiveFontChanged()
Called when setFontXxx() or parentEffectiveFontChanged() change the effective font of this component.
-
isRedrawNeeded
boolean isRedrawNeeded()
Returnstruewhen this component need to be redrawn. The result only apply to cacheable component.- Returns:
- the redraw status
-
setRedrawNeeded
void setRedrawNeeded(boolean flag)
Mark or clear the flag that indicate this component need to be redrawn, eg. when color changed.- Parameters:
flag- the flag that indicate this component need to be redrawn
-
draw
void draw(java.awt.Graphics2D g)
Draw this component only. All its children is not drawn.- Parameters:
g- to the Graphics2D drawing. The transformation of this component is not applied.
-
copyStructure
ComponentEx copyStructure(java.util.Map<ElementEx,ElementEx> orig2copyMap)
Create a deep copy of this component. The parent of the copy are not set.- Specified by:
copyStructurein interfaceElementEx- Parameters:
orig2copyMap- original element to copy map- Returns:
- a deep copy of this component
-
-
DMelt 3.0 © DataMelt by jWork.ORG