Class Viewport
- java.lang.Object
-
- adams.gui.visualization.container.datacontainerpanel.AbstractPopupCustomizer<T,M,C>
-
- adams.gui.visualization.container.datacontainerpanel.plotpopup.AbstractPlotPopupCustomizer<Instance,InstanceContainerManager,InstanceContainer>
-
- adams.gui.visualization.instance.plotpopup.Viewport
-
- All Implemented Interfaces:
Serializable
public class Viewport extends adams.gui.visualization.container.datacontainerpanel.plotpopup.AbstractPlotPopupCustomizer<Instance,InstanceContainerManager,InstanceContainer>
Allows the user to perform operations on the instances visible in the current viewport.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Viewport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
chooseColor(adams.gui.visualization.container.DataContainerPanelWithContainerList<Instance,InstanceContainerManager,InstanceContainer> panel, List<InstanceContainer> conts)
Allows the user to choose the color for all the instances.protected List<InstanceContainer>
containersInViewport(adams.gui.visualization.container.DataContainerPanelWithContainerList<Instance,InstanceContainerManager,InstanceContainer> panel)
Locates the visible instances that are on display in the current viewport.void
customize(adams.gui.visualization.container.DataContainerPanelWithContainerList<Instance,InstanceContainerManager,InstanceContainer> panel, MouseEvent e, JPopupMenu menu)
Returns a popup menu for the table of the container list.protected void
display(adams.gui.visualization.container.DataContainerPanelWithContainerList<Instance,InstanceContainerManager,InstanceContainer> panel, List<InstanceContainer> conts)
Displays the IDs etc of the instances.String
getGroup()
The group this customizer belongs to.String
getName()
The name.boolean
handles(adams.gui.visualization.container.DataContainerPanelWithContainerList<Instance,InstanceContainerManager,InstanceContainer> panel)
Checks whether this action can handle the panel.protected void
hide(adams.gui.visualization.container.DataContainerPanelWithContainerList<Instance,InstanceContainerManager,InstanceContainer> panel, List<InstanceContainer> conts)
Allows the user to hide the instances.protected void
hideOthers(adams.gui.visualization.container.DataContainerPanelWithContainerList<Instance,InstanceContainerManager,InstanceContainer> panel, List<InstanceContainer> conts)
Allows the user to hide all other instances.
-
-
-
Method Detail
-
getName
public String getName()
The name.- Specified by:
getName
in classadams.gui.visualization.container.datacontainerpanel.AbstractPopupCustomizer<Instance,InstanceContainerManager,InstanceContainer>
- Returns:
- the name
-
getGroup
public String getGroup()
The group this customizer belongs to.- Specified by:
getGroup
in classadams.gui.visualization.container.datacontainerpanel.AbstractPopupCustomizer<Instance,InstanceContainerManager,InstanceContainer>
- Returns:
- the group
-
handles
public boolean handles(adams.gui.visualization.container.DataContainerPanelWithContainerList<Instance,InstanceContainerManager,InstanceContainer> panel)
Checks whether this action can handle the panel.- Specified by:
handles
in classadams.gui.visualization.container.datacontainerpanel.AbstractPopupCustomizer<Instance,InstanceContainerManager,InstanceContainer>
- Parameters:
panel
- the panel to check- Returns:
- true if handled
-
containersInViewport
protected List<InstanceContainer> containersInViewport(adams.gui.visualization.container.DataContainerPanelWithContainerList<Instance,InstanceContainerManager,InstanceContainer> panel)
Locates the visible instances that are on display in the current viewport.- Parameters:
panel
- the panel to use- Returns:
- the list of instances
-
display
protected void display(adams.gui.visualization.container.DataContainerPanelWithContainerList<Instance,InstanceContainerManager,InstanceContainer> panel, List<InstanceContainer> conts)
Displays the IDs etc of the instances.- Parameters:
panel
- the affected panelconts
- the containers to display
-
chooseColor
protected void chooseColor(adams.gui.visualization.container.DataContainerPanelWithContainerList<Instance,InstanceContainerManager,InstanceContainer> panel, List<InstanceContainer> conts)
Allows the user to choose the color for all the instances.- Parameters:
panel
- the affected panelconts
- the containers to modify
-
hide
protected void hide(adams.gui.visualization.container.DataContainerPanelWithContainerList<Instance,InstanceContainerManager,InstanceContainer> panel, List<InstanceContainer> conts)
Allows the user to hide the instances.- Parameters:
panel
- the affected panelconts
- the containers to hide
-
hideOthers
protected void hideOthers(adams.gui.visualization.container.DataContainerPanelWithContainerList<Instance,InstanceContainerManager,InstanceContainer> panel, List<InstanceContainer> conts)
Allows the user to hide all other instances.- Parameters:
panel
- the affected panelconts
- the containers to keep
-
customize
public void customize(adams.gui.visualization.container.DataContainerPanelWithContainerList<Instance,InstanceContainerManager,InstanceContainer> panel, MouseEvent e, JPopupMenu menu)
Returns a popup menu for the table of the container list.- Specified by:
customize
in classadams.gui.visualization.container.datacontainerpanel.plotpopup.AbstractPlotPopupCustomizer<Instance,InstanceContainerManager,InstanceContainer>
- Parameters:
panel
- the affected panele
- the mouse eventmenu
- the popup menu to customize
-
-