public final class Manager extends Object implements IManager
Changes
| Modifier and Type | Field and Description |
|---|---|
private static Class<?> |
caller |
private int |
currItemIndex
The currently selected index in one of the manager lists.
|
private static org.apache.log4j.Logger |
logger |
private JList |
managerListLeft |
private JList |
managerListRight |
private DefaultListModel |
managerModelLeft |
private DefaultListModel |
managerModelRight |
private ManagerPanel |
managerPanel
The GUI element to administer.
|
private javax.media.jai.PlanarImage |
previewImage
This is the image for the preview function in the operator GUIs.
|
private int |
tankIndexInMainLeft
The tank index in the left manager list.
|
private int |
tankIndexInMainRight
The tank index in the right manager list.
|
| Modifier | Constructor and Description |
|---|---|
private |
Manager()
A private constructor for this singleton.
|
| Modifier and Type | Method and Description |
|---|---|
void |
displayItem(int mgrIndex)
This method sets the current manager item and displays the item in the
corresponding panel (e.g.
|
void |
displayPlotItems(int[] indices)
This method displays the selected items in a manager list within a single
plot.
|
void |
displayTableItems(int[] indices)
This method displays the selected items in a manager list within a single
table.
|
int |
getActiveListIndex()
Returns the index of the active manager list.
|
int |
getCurrItemIndex()
This method gets the current manager item number.
|
DataType |
getDataBoxTypeInSelectedManager()
Gets the type of the data box in the currently selected manager.
|
DefaultListModel |
getIconList(int index,
boolean onlyNumbers)
This method constructs the
DefaultListModel for a manager's
JList. |
static IManager |
getInstance()
Gets the singleton instance of this
IManager. |
DefaultListModel |
getManagerModelLeft()
This method returns the model of the left
List. |
DefaultListModel |
getManagerModelRight()
This method returns the model of the right
List. |
IManagerPanel |
getManagerPanel() |
javax.media.jai.PlanarImage |
getPreviewImage()
This method gets the preview image, which has been created using the
"preview" button in an operator GUI.
|
List<IqmDataBox> |
getSelectedDataBoxes()
Gets a list of references to the currently selected data boxes.
|
int[] |
getSelectedIndices()
This method gets the selected indices from the manager panel.
|
int |
getTankIndexInMainLeft()
This method gets the current Tank index of left manager.
|
int |
getTankIndexInMainRight()
This method gets the current Tank index of the ScrollPane Main2
|
void |
initialize()
This method initializes the
Manager. |
boolean |
isLeftListActive()
Returns a flag whether the left list is active.
|
boolean |
isRightListActive()
Returns a flag whether the right list is active.
|
void |
resetLeftModel()
This method resets the left manager list.
|
void |
resetRightModel()
This method resets the right manager list.
|
void |
resetTogglePreviewIfRunning()
This method resets the toggle preview
|
void |
setCurrItemIndex(int arg)
This method sets the current manager item number.
|
void |
setLeftListActive(boolean b)
De-/activates the left manager list.
|
void |
setManagerPanel(IManagerPanel arg) |
void |
setNewIconsForTankIndex(int tankIndex)
This methods sets the new Manager's icons and data.
|
void |
setNewIconsMainLeft(DefaultListModel listOfIcons,
int tankIndex)
This methods sets the new icons and data in the left list.
|
void |
setNewIconsMainRight(DefaultListModel listOfIcons,
int tankIndex)
This methods sets the new icons and data in the right list.
|
void |
setPreviewImage(RenderedImage pi)
This method sets the preview image, which has been created using the
"preview" button in an operator GUI.
|
void |
setRightListActive(boolean b)
De-/activates the right manager list.
|
void |
setTankIndexInMainLeft(int tankIndex)
This method sets the tank index number, which contains the current
elements in the left manager.
|
void |
setTankIndexInMainRight(int tankIndex)
This method sets the tank index number, which contains the current
elements in the right manager.
|
void |
startTogglePreviewIfSelected()
This method starts the toggle preview if it is selected
|
private static Class<?> caller
private static final org.apache.log4j.Logger logger
private ManagerPanel managerPanel
private DefaultListModel managerModelLeft
private JList managerListLeft
private DefaultListModel managerModelRight
private JList managerListRight
private javax.media.jai.PlanarImage previewImage
private int tankIndexInMainLeft
private int tankIndexInMainRight
private int currItemIndex
public static IManager getInstance()
IManager.Managerpublic void initialize()
Manager.initialize in interface IManagerpublic void setManagerPanel(IManagerPanel arg)
setManagerPanel in interface IManagerpublic IManagerPanel getManagerPanel()
getManagerPanel in interface IManagerpublic DefaultListModel getManagerModelLeft()
List.getManagerModelLeft in interface IManagerpublic DefaultListModel getManagerModelRight()
List.getManagerModelRight in interface IManagerpublic boolean isLeftListActive()
IManagerisLeftListActive in interface IManagerpublic boolean isRightListActive()
IManagerisRightListActive in interface IManagerpublic void resetLeftModel()
resetLeftModel in interface IManagerpublic void resetRightModel()
resetRightModel in interface IManagerpublic void setTankIndexInMainLeft(int tankIndex)
tankIndex is 1.setTankIndexInMainLeft in interface IManagertankIndex - - the tank index for the left managerpublic int getTankIndexInMainLeft()
getTankIndexInMainLeft in interface IManagerpublic void setTankIndexInMainRight(int tankIndex)
tankIndex is 1.setTankIndexInMainRight in interface IManagertankIndex - - the tank index for the right managerpublic int getTankIndexInMainRight()
getTankIndexInMainRight in interface IManagerpublic DefaultListModel getIconList(int index, boolean onlyNumbers)
DefaultListModel for a manager's
JList.getIconList in interface IManagerindex - the index of the item in the tankonlyNumbers - whether or not only numbers are shown as list itemspublic void setNewIconsForTankIndex(int tankIndex)
tankIndex.setNewIconsForTankIndex in interface IManagertankIndex - current index of the selected element in the TankPanelpublic void setNewIconsMainLeft(DefaultListModel listOfIcons, int tankIndex)
setNewIconsMainLeft in interface IManagerlistOfIcons - - DefaultListModel of ImageIconstankIndex - - int tank index numberpublic void setNewIconsMainRight(DefaultListModel listOfIcons, int tankIndex)
setNewIconsMainRight in interface IManagerlistOfIcons - - DefaultListModel of ImageIconstankIndex - - int tank index numberpublic void displayItem(int mgrIndex)
ILookPanel
).
It also sets the scroll bar of the items to the correct values.
displayItem in interface IManagermgrIndex - current Manager item indexpublic void displayPlotItems(int[] indices)
displayPlotItems in interface IManagerindices - array of selected Manager indicespublic void displayTableItems(int[] indices)
displayTableItems in interface IManagerindices - array of selected Manager indicespublic void setPreviewImage(RenderedImage pi)
setPreviewImage in interface IManagerpi - public javax.media.jai.PlanarImage getPreviewImage()
getPreviewImage in interface IManagerpublic void startTogglePreviewIfSelected()
startTogglePreviewIfSelected in interface IManagerpublic void resetTogglePreviewIfRunning()
resetTogglePreviewIfRunning in interface IManagerpublic void setCurrItemIndex(int arg)
setCurrItemIndex in interface IManagerarg - current manager item numberpublic int getCurrItemIndex()
getCurrItemIndex in interface IManagerpublic int[] getSelectedIndices()
public DataType getDataBoxTypeInSelectedManager()
getDataBoxTypeInSelectedManager in interface IManagerIqmDataBox typespublic void setLeftListActive(boolean b)
IManagersetLeftListActive in interface IManagerb - true if the list is supposed to be active,
false otherwisepublic void setRightListActive(boolean b)
IManagersetRightListActive in interface IManagerb - true if the list is supposed to be active,
false otherwisepublic int getActiveListIndex()
IManagergetActiveListIndex in interface IManagerpublic List<IqmDataBox> getSelectedDataBoxes()
IManagergetSelectedDataBoxes in interface IManagerList of IqmDataBoxesCopyright © 2009–2017 Helmut Ahammer, Philipp Kainz. All rights reserved.