org.japura.gui.model
Class DefaultPriorityComboBoxModel
java.lang.Object
javax.swing.AbstractListModel
org.japura.gui.model.DefaultPriorityComboBoxModel
- All Implemented Interfaces:
- java.io.Serializable, javax.swing.ComboBoxModel, javax.swing.ListModel, javax.swing.MutableComboBoxModel, PriorityComboBoxModel
public class DefaultPriorityComboBoxModel
- extends javax.swing.AbstractListModel
- implements PriorityComboBoxModel
Copyright (C) 2010-2011 Carlos Eduardo Leite de Andrade
This library is free software: you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see www.gnu.org/licenses/
For more information, contact: www.japura.org
- Author:
- Carlos Eduardo Leite de Andrade
- See Also:
- Serialized Form
| Fields inherited from class javax.swing.AbstractListModel |
listenerList |
| Methods inherited from class javax.swing.AbstractListModel |
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.swing.ListModel |
addListDataListener, removeListDataListener |
DefaultPriorityComboBoxModel
public DefaultPriorityComboBoxModel(java.lang.Object[] objects)
DefaultPriorityComboBoxModel
public DefaultPriorityComboBoxModel(java.util.List<?> objects)
DefaultPriorityComboBoxModel
public DefaultPriorityComboBoxModel()
addElement
public void addElement(java.lang.Object item,
boolean priorityItem)
- Specified by:
addElement in interface PriorityComboBoxModel
getPriorityComboBoxListeners
public PriorityComboBoxListener[] getPriorityComboBoxListeners()
addPriorityComboBoxListener
public void addPriorityComboBoxListener(PriorityComboBoxListener listener)
- Specified by:
addPriorityComboBoxListener in interface PriorityComboBoxModel
removePriorityComboBoxListener
public void removePriorityComboBoxListener(PriorityComboBoxListener listener)
- Specified by:
removePriorityComboBoxListener in interface PriorityComboBoxModel
firePriorityComboBoxListeners
protected void firePriorityComboBoxListeners()
getPriorityItems
public java.util.List<java.lang.Object> getPriorityItems()
- Specified by:
getPriorityItems in interface PriorityComboBoxModel
getPriorityItemsCapacity
public int getPriorityItemsCapacity()
- Specified by:
getPriorityItemsCapacity in interface PriorityComboBoxModel
setPriorityItemsCapacity
public void setPriorityItemsCapacity(int capacity)
- Specified by:
setPriorityItemsCapacity in interface PriorityComboBoxModel
getSelectedItem
public java.lang.Object getSelectedItem()
- Specified by:
getSelectedItem in interface javax.swing.ComboBoxModel
setSelectedItem
public void setSelectedItem(java.lang.Object anItem)
- Specified by:
setSelectedItem in interface javax.swing.ComboBoxModel
getElementAt
public java.lang.Object getElementAt(int index)
- Specified by:
getElementAt in interface javax.swing.ListModel
getSize
public int getSize()
- Specified by:
getSize in interface javax.swing.ListModel
addToPriority
public void addToPriority(java.lang.Object obj)
- Specified by:
addToPriority in interface PriorityComboBoxModel
removeFromPriority
public void removeFromPriority(java.lang.Object obj)
- Specified by:
removeFromPriority in interface PriorityComboBoxModel
addElement
public void addElement(java.lang.Object item)
- Specified by:
addElement in interface javax.swing.MutableComboBoxModel
insertElementAt
public void insertElementAt(java.lang.Object item,
int index)
- Specified by:
insertElementAt in interface javax.swing.MutableComboBoxModel
removeElement
public void removeElement(java.lang.Object obj)
- Specified by:
removeElement in interface javax.swing.MutableComboBoxModel
removeElementAt
public void removeElementAt(int index)
- Specified by:
removeElementAt in interface javax.swing.MutableComboBoxModel
isIncreasePriorityOnSelection
public boolean isIncreasePriorityOnSelection()
- Specified by:
isIncreasePriorityOnSelection in interface PriorityComboBoxModel
setIncreasePriorityOnSelection
public void setIncreasePriorityOnSelection(boolean enable)
- Specified by:
setIncreasePriorityOnSelection in interface PriorityComboBoxModel
getPriorityItemsSize
public int getPriorityItemsSize()
- Specified by:
getPriorityItemsSize in interface PriorityComboBoxModel
clearPriorities
public void clearPriorities()
- Specified by:
clearPriorities in interface PriorityComboBoxModel
getMinimalSizeForPriority
public int getMinimalSizeForPriority()
- Specified by:
getMinimalSizeForPriority in interface PriorityComboBoxModel
isPriorityAvailable
public boolean isPriorityAvailable()
- Specified by:
isPriorityAvailable in interface PriorityComboBoxModel
setMinimalSizeForPriority
public void setMinimalSizeForPriority(int size)
- Specified by:
setMinimalSizeForPriority in interface PriorityComboBoxModel
isPriorityItem
public boolean isPriorityItem(java.lang.Object obj)
- Specified by:
isPriorityItem in interface PriorityComboBoxModel