OSDN Git Service

不要クラス削除, レンダラのパッケージ移動
authoryukihane <yukihane.feather@gmail.com>
Mon, 29 Aug 2011 09:51:47 +0000 (18:51 +0900)
committeryukihane <yukihane.feather@gmail.com>
Mon, 29 Aug 2011 09:51:47 +0000 (18:51 +0900)
frontend/src/yukihane/inqubus/gui/MainFrame.java
frontend/src/yukihane/inqubus/gui/MainTable.java [deleted file]
frontend/src/yukihane/inqubus/gui/TargetsColumnModel.java [moved from frontend/src/yukihane/inqubus/model/TargetsColumnModel.java with 93% similarity]

index 3f80597..898a4e2 100644 (file)
@@ -72,7 +72,6 @@ import yukihane.inqubus.manager.TaskManage;
 import yukihane.inqubus.manager.TaskManageListener;
 import yukihane.inqubus.manager.TaskStatus;
 import yukihane.inqubus.model.Target;
 import yukihane.inqubus.manager.TaskManageListener;
 import yukihane.inqubus.manager.TaskStatus;
 import yukihane.inqubus.model.Target;
-import yukihane.inqubus.model.TargetsColumnModel;
 import yukihane.inqubus.model.TargetsTableModel;
 
 /**
 import yukihane.inqubus.model.TargetsTableModel;
 
 /**
diff --git a/frontend/src/yukihane/inqubus/gui/MainTable.java b/frontend/src/yukihane/inqubus/gui/MainTable.java
deleted file mode 100644 (file)
index f637e76..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-package yukihane.inqubus.gui;
-
-import java.awt.Component;
-import javax.swing.JProgressBar;
-import javax.swing.JTable;
-import javax.swing.table.TableCellRenderer;
-import yukihane.inqubus.model.Progress;
-
-/**
- *
- * @author yuki
- */
-public class MainTable extends JTable {
-
-    public MainTable() {
-        super();
-        setDefaultRenderer(Progress.class, new ProgressRenderer());
-    }
-
-    @Override
-    public TableCellRenderer getCellRenderer(int row, int column) {
-        return super.getCellRenderer(row, column);
-    }
-}
-
-class ProgressRenderer extends JProgressBar implements TableCellRenderer {
-
-    private static final long serialVersionUID = 1L;
-
-    public ProgressRenderer() {
-        super(0, 100);
-        setStringPainted(true);
-    }
-
-    @Override
-    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus,
-            int row, int column) {
-        if (value == null) {
-            return this;
-        }
-
-        final Progress p = (Progress) value;
-        int percent = (int) p.getPercent();
-        if (percent < 0 || percent > 100) {
-            percent = 100;
-        }
-        setValue(percent);
-        setString(p.getText());
-        System.out.println(percent + "," + p.getText());
-
-        return this;
-    }
-}
@@ -1,14 +1,12 @@
-package yukihane.inqubus.model;
+package yukihane.inqubus.gui;
 
 
-import java.awt.Color;
 import java.awt.Component;
 import javax.swing.JProgressBar;
 import javax.swing.JTable;
 import javax.swing.table.DefaultTableCellRenderer;
 import javax.swing.table.DefaultTableColumnModel;
 import java.awt.Component;
 import javax.swing.JProgressBar;
 import javax.swing.JTable;
 import javax.swing.table.DefaultTableCellRenderer;
 import javax.swing.table.DefaultTableColumnModel;
-import javax.swing.table.TableCellRenderer;
 import javax.swing.table.TableColumn;
 import javax.swing.table.TableColumn;
-import javax.swing.table.TableModel;
+import yukihane.inqubus.model.Progress;
 
 /**
  *
 
 /**
  *