Package org.cytoscape.application.swing
Interface CytoPanel
-
public interface CytoPanel
Interface to a CytoPanel.- Author:
- Ben Gross.
Module:
swing-application-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>swing-application-api</artifactId> </dependency>
Cytoscape Backwards Compatibility (API Interface): We expect that this interface will be used but not implemented by developers using this interface. As such, we reserve the right to add methods to the interface as part of minor version upgrades. We will not remove methods for any changes other than major version upgrades.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Component
getComponentAt(int index)
Returns the component at the passed index.int
getCytoPanelComponentCount()
Returns the number of components in the CytoPanel.CytoPanelName
getCytoPanelName()
Returns the position in the layout.Component
getSelectedComponent()
Returns the currently selected component.int
getSelectedIndex()
Returns the currently selected index.CytoPanelState
getState()
Gets the state of the CytoPanel.Component
getThisComponent()
Returns the Component that is this CytoPanel.int
indexOfComponent(Component component)
Returns the index for the specified component.int
indexOfComponent(String identifier)
Returns the index for the component that has the specified identifier.void
setSelectedIndex(int index)
Sets the selected index on the CytoPanel.void
setState(CytoPanelState cytoPanelState)
Sets the state of the CytoPanel.
-
-
-
Method Detail
-
getCytoPanelComponentCount
int getCytoPanelComponentCount()
Returns the number of components in the CytoPanel.- Returns:
- int Number of components.
-
getSelectedComponent
Component getSelectedComponent()
Returns the currently selected component.- Returns:
- component Currently selected CytoPanelComponent reference.
-
getSelectedIndex
int getSelectedIndex()
Returns the currently selected index.- Returns:
- index Currently selected index.
-
getComponentAt
Component getComponentAt(int index)
Returns the component at the passed index.- Parameters:
index
- the index of the component, which must be non-negative and less than the component count.- Returns:
- component at the given index.
- Throws:
IndexOutOfBoundsException
- if index is out of range(index < 0 || index >= component count)
- See Also:
getCytoPanelComponentCount()
-
getState
CytoPanelState getState()
Gets the state of the CytoPanel.- Returns:
- A CytoPanelState.
-
indexOfComponent
int indexOfComponent(Component component)
Returns the index for the specified component.- Parameters:
component
- Component reference.- Returns:
- int Index of the Component or -1 if not found.
-
indexOfComponent
int indexOfComponent(String identifier)
Returns the index for the component that has the specified identifier. The identifier must be the same one provided byCytoPanelComponent2.getIdentifier()
.
These are the identifiers of the core Cytoscape components that implementCytoPanelComponent2
:"org.cytoscape.Network"
"org.cytoscape.Style"
"org.cytoscape.Filter"
- Parameters:
identifier
- The String that identifies the component.- Returns:
- int Index of the Component or -1 if not found.
-
setSelectedIndex
void setSelectedIndex(int index)
Sets the selected index on the CytoPanel.- Parameters:
index
- The desired index.
-
setState
void setState(CytoPanelState cytoPanelState)
Sets the state of the CytoPanel.- Parameters:
cytoPanelState
- A CytoPanelState.
-
getCytoPanelName
CytoPanelName getCytoPanelName()
Returns the position in the layout.- Returns:
- The CytoPanelName enum value indicating the position in the layout.
-
getThisComponent
Component getThisComponent()
Returns the Component that is this CytoPanel. This is a hack to allow CytoPanel to be used as a Component.- Returns:
- the Component that is this CytoPanel.
-
-