Interface ScalableComponent
-
- All Known Implementing Classes:
ProMJGraph
public interface ScalableComponent
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceScalableComponent.UpdateListener
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddUpdateListener(ScalableComponent.UpdateListener listener)Adds an updatelistener to this scalable component.javax.swing.JComponentgetComponent()Returns the component that will be scaled using getScale and setScale methods Most implementations will actually override JComponent and returnthisin this method.doublegetScale()Returns the current scale.voidremoveUpdateListener(ScalableComponent.UpdateListener listener)Removes an updatelistener from this scalable component.voidsetScale(double newScale)Sets the current scale.
-
-
-
Method Detail
-
getComponent
javax.swing.JComponent getComponent()
Returns the component that will be scaled using getScale and setScale methods Most implementations will actually override JComponent and returnthisin this method.- Returns:
- a component
-
getScale
double getScale()
Returns the current scale.- Returns:
- the current scale as a double
-
setScale
void setScale(double newScale)
Sets the current scale.- Parameters:
newValue- the new scale
-
addUpdateListener
void addUpdateListener(ScalableComponent.UpdateListener listener)
Adds an updatelistener to this scalable component. This listener will be updated as soon as the contents of the component change, i.e. if the component- Parameters:
listener-
-
removeUpdateListener
void removeUpdateListener(ScalableComponent.UpdateListener listener)
Removes an updatelistener from this scalable component.- Parameters:
listener-
-
-