@ -0,0 +1,24 @@
|
||||
package com.fr.design.gui.icontainer; |
||||
|
||||
import com.fr.design.gui.iscrollbar.UIVerticalScrollBar; |
||||
import com.fr.design.gui.itable.FineUITable; |
||||
|
||||
import javax.swing.JScrollBar; |
||||
import javax.swing.JTable; |
||||
import java.awt.Component; |
||||
|
||||
/** |
||||
* FineUITable 定义垂直滚动条 {@link UIVerticalScrollBar} |
||||
* @author lemon |
||||
* @since |
||||
* Created on |
||||
*/ |
||||
public class UITableScrollPane extends UIScrollPane { |
||||
|
||||
public UITableScrollPane(Component c) { |
||||
super(c); |
||||
if (c instanceof JTable) { |
||||
setVerticalScrollBar(new UIVerticalScrollBar((JTable) c, JScrollBar.VERTICAL)); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,38 @@
|
||||
package com.fr.design.gui.itable; |
||||
|
||||
import javax.swing.JTable; |
||||
import javax.swing.table.AbstractTableModel; |
||||
import javax.swing.table.JTableHeader; |
||||
import javax.swing.table.TableColumnModel; |
||||
|
||||
/** |
||||
* 应用 TableHeaderUI 样式的 table |
||||
* @author lemon |
||||
* @since |
||||
* Created on |
||||
*/ |
||||
public class FineUITable extends JTable { |
||||
|
||||
|
||||
public FineUITable(AbstractTableModel tableModel){ |
||||
super(tableModel); |
||||
setTableHeader(new FineUITableHeader(tableHeader.getColumnModel())); |
||||
} |
||||
|
||||
/** |
||||
* tableHeader |
||||
*/ |
||||
public static class FineUITableHeader extends JTableHeader { |
||||
private static final String UI_CLASS_ID = "TableHeaderUI"; |
||||
|
||||
|
||||
public FineUITableHeader(TableColumnModel columnModel){ |
||||
super(columnModel); |
||||
} |
||||
|
||||
@Override |
||||
public String getUIClassID() { |
||||
return UI_CLASS_ID; |
||||
} |
||||
} |
||||
} |
@ -1,19 +1,16 @@
|
||||
package com.fr.design.gui.itable; |
||||
|
||||
import javax.swing.JTable; |
||||
|
||||
public class SortableJTable extends JTable{ |
||||
private static final String UI_CLASS_ID = "FineTableHeaderUI"; |
||||
|
||||
/** |
||||
* SortableJTable |
||||
* @author lemon |
||||
* @since |
||||
* Created on |
||||
*/ |
||||
public class SortableJTable extends FineUITable { |
||||
|
||||
public SortableJTable(TableSorter tableModel){ |
||||
super(tableModel); |
||||
tableModel.setTableHeader(getTableHeader()); |
||||
setShowGrid(true); |
||||
} |
||||
|
||||
@Override |
||||
public String getUIClassID() { |
||||
return UI_CLASS_ID; |
||||
} |
||||
} |
After Width: | Height: | Size: 379 B |
After Width: | Height: | Size: 553 B |
After Width: | Height: | Size: 567 B |
After Width: | Height: | Size: 726 B |
After Width: | Height: | Size: 441 B |
After Width: | Height: | Size: 618 B |
After Width: | Height: | Size: 541 B |
After Width: | Height: | Size: 380 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 958 B |
After Width: | Height: | Size: 552 B |
After Width: | Height: | Size: 541 B |
After Width: | Height: | Size: 715 B |
After Width: | Height: | Size: 888 B |
After Width: | Height: | Size: 729 B |
After Width: | Height: | Size: 461 B |
After Width: | Height: | Size: 851 B |
After Width: | Height: | Size: 920 B |
After Width: | Height: | Size: 858 B |
After Width: | Height: | Size: 654 B |
After Width: | Height: | Size: 605 B |
After Width: | Height: | Size: 826 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |