Class AbstractLensSupport<V,E,M extends LensGraphMouse>
- java.lang.Object
-
- org.jungrapht.visualization.util.ItemSupport
-
- org.jungrapht.visualization.transform.AbstractLensSupport<V,E,M>
-
- Type Parameters:
V- vertex typeE- edge typeM- LensGraphMouse type
- All Implemented Interfaces:
ItemSelectable,LensSupport<M>
- Direct Known Subclasses:
LayoutLensSupport,MagnifyImageLensSupport,ViewLensSupport
public abstract class AbstractLensSupport<V,E,M extends LensGraphMouse> extends ItemSupport implements LensSupport<M>
A class to make it easy to add an examining lens to a jungrapht graph application. See HyperbolicTransformerDemo, ViewLensSupport and LayoutLensSupport for examples of how to use it.- Author:
- Tom Nelson
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractLensSupport.Builder<V,E,M extends LensGraphMouse,T extends AbstractLensSupport<V,E,M>,B extends AbstractLensSupport.Builder<V,E,M,T,B>>static classAbstractLensSupport.LensControlsthe background for the hyperbolic projectionstatic classAbstractLensSupport.LensPaintablethe background for the hyperbolic projection
-
Field Summary
Fields Modifier and Type Field Description protected StringdefaultToolTipTextprotected VisualizationViewer.GraphMousegraphMouseprotected static Stringinstructionsprotected AbstractLensSupport.LensControlslensControlsprotected MlensGraphMouseprotected AbstractLensSupport.LensPaintablelensPaintableprotected LensTransformerlensTransformerprotected GraphElementAccessor<V,E>pickSupportprotected booleanuseGradientprotected VisualizationViewer<V,E>vv-
Fields inherited from class org.jungrapht.visualization.util.ItemSupport
listenerList, selected
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractLensSupport(AbstractLensSupport.Builder<V,E,M,?,?> builder)AbstractLensSupport(VisualizationViewer<V,E> vv, M lensGraphMouse)create the base class, setting common members and creating a custom GraphMouse
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate()voidactivate(boolean state)booleanallowed()voiddeactivate()MgetGraphMouse()AbstractLensSupport.LensControlsgetLensControls()AbstractLensSupport.LensPaintablegetLensPaintable()LensTransformergetLensTransformer()booleanisActive()voidsetLensControls(AbstractLensSupport.LensControls lensControls)voidsetLensPaintable(AbstractLensSupport.LensPaintable lensPaintable)voidsetManager(Runnable manager)-
Methods inherited from class org.jungrapht.visualization.util.ItemSupport
addItemListener, fireItemStateChanged, getSelectedObjects, removeItemListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jungrapht.visualization.transform.LensSupport
addItemListener
-
-
-
-
Field Detail
-
vv
protected VisualizationViewer<V,E> vv
-
graphMouse
protected VisualizationViewer.GraphMouse graphMouse
-
lensTransformer
protected LensTransformer lensTransformer
-
lensGraphMouse
protected M extends LensGraphMouse lensGraphMouse
-
lensPaintable
protected AbstractLensSupport.LensPaintable lensPaintable
-
lensControls
protected AbstractLensSupport.LensControls lensControls
-
defaultToolTipText
protected String defaultToolTipText
-
pickSupport
protected GraphElementAccessor<V,E> pickSupport
-
useGradient
protected boolean useGradient
-
instructions
protected static final String instructions
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractLensSupport
protected AbstractLensSupport(AbstractLensSupport.Builder<V,E,M,?,?> builder)
-
AbstractLensSupport
public AbstractLensSupport(VisualizationViewer<V,E> vv, M lensGraphMouse)
create the base class, setting common members and creating a custom GraphMouse- Parameters:
vv- the VisualizationViewer to work onlensGraphMouse- the GraphMouse instance to use for the lens
-
-
Method Detail
-
setManager
public void setManager(Runnable manager)
- Specified by:
setManagerin interfaceLensSupport<V>
-
allowed
public boolean allowed()
-
activate
public void activate(boolean state)
- Specified by:
activatein interfaceLensSupport<V>
-
activate
public void activate()
- Specified by:
activatein interfaceLensSupport<V>
-
deactivate
public void deactivate()
- Specified by:
deactivatein interfaceLensSupport<V>
-
isActive
public boolean isActive()
- Specified by:
isActivein interfaceLensSupport<V>
-
getLensTransformer
public LensTransformer getLensTransformer()
- Specified by:
getLensTransformerin interfaceLensSupport<V>
-
getGraphMouse
public M getGraphMouse()
- Specified by:
getGraphMousein interfaceLensSupport<V>- Returns:
- the hyperbolicGraphMouse.
-
getLensPaintable
public AbstractLensSupport.LensPaintable getLensPaintable()
- Returns:
- the lensPaintable
-
setLensPaintable
public void setLensPaintable(AbstractLensSupport.LensPaintable lensPaintable)
- Parameters:
lensPaintable- the lens to set
-
getLensControls
public AbstractLensSupport.LensControls getLensControls()
- Returns:
- the lensControls
-
setLensControls
public void setLensControls(AbstractLensSupport.LensControls lensControls)
- Parameters:
lensControls- the lensControls to set
-
-