org.equanda.util.swing
Class ScreenButtonContainer
java.lang.Object
org.equanda.util.swing.ScreenButtonContainer
public abstract class ScreenButtonContainer
- extends Object
Container panel for Screen buttons.
- Author:
- Joachim Van der Auwera, NetRom team
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
buttonPanel
protected JPanel buttonPanel
scrollPane
protected JScrollPane scrollPane
selectedButton
protected int selectedButton
listeners
protected ArrayList<ScreenButtonListener> listeners
buttonListener
protected ActionListener buttonListener
ScreenButtonContainer
public ScreenButtonContainer()
setSelectedButton
public void setSelectedButton(int newValue)
addListener
public void addListener(ScreenButtonListener listener)
removeListener
public boolean removeListener(ScreenButtonListener listener)
refresh
public void refresh(Map txtMap)
- Create new buttons, recycling existing buttons as much as possible
- Parameters:
txtMap
- map with texts to put in buttons
getButtonsPanel
public JComponent getButtonsPanel()
onButtonSelect
protected abstract void onButtonSelect(int buttonIndex)
- Called when a new button has been selected
- Parameters:
buttonIndex
- button index
newScreenButton
protected ScreenButton newScreenButton(int idx,
String text)
- Factory method used to create a new ScreenButton. May be overrided to provide custom buttons.
- Parameters:
idx
- indextext
- text
- Returns:
- a new ScreenButton
Copyright © 2007-2009. All Rights Reserved.