diff options
Diffstat (limited to 'source/com/c2kernel/gui/tabs/EntityTabPane.java')
| -rw-r--r--[-rwxr-xr-x] | source/com/c2kernel/gui/tabs/EntityTabPane.java | 49 |
1 files changed, 32 insertions, 17 deletions
diff --git a/source/com/c2kernel/gui/tabs/EntityTabPane.java b/source/com/c2kernel/gui/tabs/EntityTabPane.java index f6fae14..5a374dd 100755..100644 --- a/source/com/c2kernel/gui/tabs/EntityTabPane.java +++ b/source/com/c2kernel/gui/tabs/EntityTabPane.java @@ -4,12 +4,23 @@ * Created on March 22, 2001, 11:39 AM
*/
package com.c2kernel.gui.tabs;
-import java.awt.*;
+import java.awt.Color;
+import java.awt.Cursor;
+import java.awt.Font;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.FocusEvent;
-import javax.swing.*;
+import javax.swing.Box;
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JToggleButton;
+import javax.swing.SwingConstants;
import com.c2kernel.entity.proxy.EntityProxyObserver;
import com.c2kernel.gui.EntityDetails;
@@ -93,10 +104,11 @@ public class EntityTabPane extends JPanel implements Runnable { refreshButton.setToolTipText(Language.translate("Refresh"));
refreshButton.setMargin(new Insets(0, 0, 0, 0));
refreshButton.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- setCursor(new Cursor(Cursor.WAIT_CURSOR));
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ setCursor(new Cursor(Cursor.WAIT_CURSOR));
reload();
- setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
+ setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
}
});
String defaultStartTab = MainFrame.getPref("DefaultStartTab", "Properties");
@@ -108,7 +120,8 @@ public class EntityTabPane extends JPanel implements Runnable { defaultStart.setSelected(tabName.equals(defaultStartTab));
defaultStart.setActionCommand(tabName);
defaultStart.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
+ @Override
+ public void actionPerformed(ActionEvent e) {
if (((JToggleButton)e.getSource()).isSelected())
MainFrame.setPref("DefaultStartTab", e.getActionCommand());
}
@@ -122,11 +135,12 @@ public class EntityTabPane extends JPanel implements Runnable { this.add(titleBox);
}
public void initForEntity(NodeEntity sourceEntity) {
- this.sourceEntity = sourceEntity;
+ this.sourceEntity = sourceEntity;
Thread loader = new Thread(this);
loader.start();
}
- public void run() {
+ @Override
+ public void run() {
Thread.currentThread().setName("Default Entity Pane Builder");
getGridBagConstraints();
c.gridx = 0;
@@ -145,23 +159,24 @@ public class EntityTabPane extends JPanel implements Runnable { }
public void runCommand(String command) {
}
-
+
public void destroy() {
- if (sourceEntity != null && this instanceof EntityProxyObserver) {
- sourceEntity.getEntity().unsubscribe((EntityProxyObserver)this);
+ if (sourceEntity != null && this instanceof EntityProxyObserver<?>) {
+ sourceEntity.getEntity().unsubscribe((EntityProxyObserver<?>)this);
}
parent = null;
}
-
- protected void finalize() throws Throwable {
+
+ @Override
+ protected void finalize() throws Throwable {
Logger.msg(7, "Reaping "+getClass().getName());
}
-
+
static public OutcomeHandler getOutcomeHandler(String schema, int version) {
String ohClassName = Gateway.getProperty("OutcomeHandler."+schema+"."+version);
try {
if (ohClassName != null && ohClassName.length() > 0) {
- Class ohClass = Class.forName(ohClassName);
+ Class<?> ohClass = Class.forName(ohClassName);
return (OutcomeHandler) ohClass.newInstance();
}
} catch (Exception ex) {
@@ -170,7 +185,7 @@ public class EntityTabPane extends JPanel implements Runnable { ohClassName = Gateway.getProperty("OutcomeHandler.*");
try {
if (ohClassName != null && ohClassName.length() > 0) {
- Class ohClass = Class.forName(ohClassName);
+ Class<?> ohClass = Class.forName(ohClassName);
return (OutcomeHandler) ohClass.newInstance();
}
} catch (Exception ex) {
@@ -178,5 +193,5 @@ public class EntityTabPane extends JPanel implements Runnable { Logger.error(ex);
}
return new OutcomePanel();
- }
+ }
}
|
