Author: tfmorris
Date: 2008-11-23 22:14:44-0800
New Revision: 16158
Removed:
trunk/src/argouml-app/src/org/argouml/uml/ui/UMLComboBoxEntry.java
Modified:
trunk/src/argouml-app/src/org/argouml/uml/ui/UMLComboBoxNavigator.java
Log:
Remove deprecated UMLComboBoxEntry
Removed: trunk/src/argouml-app/src/org/argouml/uml/ui/UMLComboBoxEntry.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/ui/UMLComboBoxEntry.java?view=auto&rev=16157
Modified: trunk/src/argouml-app/src/org/argouml/uml/ui/UMLComboBoxNavigator.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/ui/UMLComboBoxNavigator.java?view=diff&rev=16158&p1=trunk/src/argouml-app/src/org/argouml/uml/ui/UMLComboBoxNavigator.java&p2=trunk/src/argouml-app/src/org/argouml/uml/ui/UMLComboBoxNavigator.java&r1=16157&r2=16158
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/ui/UMLComboBoxNavigator.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/ui/UMLComboBoxNavigator.java 2008-11-23 22:14:44-0800
@@ -51,30 +51,10 @@
private static ImageIcon icon = ResourceLoaderWrapper
.lookupIconResource("ComboNav");
- private UMLUserInterfaceContainer theContainer;
-
private JComboBox theComboBox;
private JButton theButton;
- /**
- * Constructor.
- *
- * @deprecated by MVW in 0.25.3. Use other constructor instead.
- *
- * @param container
- * Container, typically a PropPanel
- * @param tooltip
- * Tooltip key for button
- * @param box
- * Associated combo box
- */
- @Deprecated
- public UMLComboBoxNavigator(UMLUserInterfaceContainer container,
- String tooltip, JComboBox box) {
- this(tooltip, box);
- theContainer = container;
- }
/**
* Constructor
@@ -110,7 +90,9 @@
* this component to resize in error.
* See issue 4333 - Sun has now fixed this bug in JRE6 and so this
* method can be removed once JRE5 is no longer supported.
+ * @return the preferred size
*/
+ @Override
public Dimension getPreferredSize() {
return new Dimension(
super.getPreferredSize().width,
@@ -129,15 +111,7 @@
// button action:
if (event.getSource() == theButton) {
Object item = theComboBox.getSelectedItem();
- if (item instanceof UMLComboBoxEntry) {
- UMLComboBoxEntry entry = (UMLComboBoxEntry) item;
- if (!entry.isPhantom()) {
- Object/* MModelElement */target = entry.getElement(null);
- if (target != null) {
- TargetManager.getInstance().setTarget(target);
- }
- }
- } else if (item != null) {
+ if (item != null) {
TargetManager.getInstance().setTarget(item);
}
@@ -157,16 +131,7 @@
}
private void setButtonEnabled(Object item) {
- if (item instanceof UMLComboBoxEntry) {
- UMLComboBoxEntry entry = (UMLComboBoxEntry) item;
- if (!entry.isPhantom()) {
- Object/* MModelElement */target = entry.getElement(null);
- if (target != null) {
- theButton.setEnabled(true);
- } else
- theButton.setEnabled(false);
- }
- } else if (item != null) {
+ if (item != null) {
theButton.setEnabled(true);
} else {
theButton.setEnabled(false);
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.