修改swing界面细节
This commit is contained in:
parent
5e2dbc6191
commit
d9f4520bda
@ -56,12 +56,13 @@ public class OptButtonTableCellEditor extends BasicCellEditor implements ActionL
|
|||||||
public Component getTableCellEditorComponent(JTable table, Object value,
|
public Component getTableCellEditorComponent(JTable table, Object value,
|
||||||
boolean isSelected, int row, int column) {
|
boolean isSelected, int row, int column) {
|
||||||
editor.setBackground(table.getSelectionBackground());
|
editor.setBackground(table.getSelectionBackground());
|
||||||
|
editor.setOpaque(true);
|
||||||
this.setBackground(table.getSelectionBackground());
|
this.setBackground(table.getSelectionBackground());
|
||||||
this.value = value;
|
this.value = value;
|
||||||
if (editor instanceof JXHyperlink) {
|
if (editor instanceof JXHyperlink) {
|
||||||
((JXHyperlink) editor).setText(value + "");
|
((JXHyperlink) editor).setText(value + "");
|
||||||
}
|
}
|
||||||
if (hideCol != -1) {
|
if (hideCol != -1) {
|
||||||
Object v = table.getValueAt(row, hideCol);
|
Object v = table.getValueAt(row, hideCol);
|
||||||
editor.setVisible(!ObjectUtil.equal(v, hideValue));
|
editor.setVisible(!ObjectUtil.equal(v, hideValue));
|
||||||
}
|
}
|
||||||
|
@ -42,6 +42,7 @@ public class OptButtonTableCellRenderer extends DefaultTableCellRenderer {
|
|||||||
Object v = table.getValueAt(row, hideCol);
|
Object v = table.getValueAt(row, hideCol);
|
||||||
this.component.setVisible(!ObjectUtil.equal(v, hideValue));
|
this.component.setVisible(!ObjectUtil.equal(v, hideValue));
|
||||||
}
|
}
|
||||||
|
panel.setOpaque(isSelected);
|
||||||
return panel;
|
return panel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ public class DeptManagementPanel extends JPanel implements Observer {
|
|||||||
treeTable.setClosedIcon(null);
|
treeTable.setClosedIcon(null);
|
||||||
treeTable.setOpenIcon(null);
|
treeTable.setOpenIcon(null);
|
||||||
treeTable.setShowHorizontalLines(true);
|
treeTable.setShowHorizontalLines(true);
|
||||||
treeTable.setIntercellSpacing(new Dimension(1, 1));
|
treeTable.setIntercellSpacing(new Dimension(0, 1));
|
||||||
treeTable.setOpaque(false);
|
treeTable.setOpaque(false);
|
||||||
treeTable.setHighlighters();
|
treeTable.setHighlighters();
|
||||||
ColorHighlighter rollover = new ColorHighlighter(HighlightPredicate.ROLLOVER_ROW, UIManager.getColor("App.hoverBackground"), null);
|
ColorHighlighter rollover = new ColorHighlighter(HighlightPredicate.ROLLOVER_ROW, UIManager.getColor("App.hoverBackground"), null);
|
||||||
@ -137,6 +137,7 @@ public class DeptManagementPanel extends JPanel implements Observer {
|
|||||||
public void run() {
|
public void run() {
|
||||||
ColorHighlighter rollover = new ColorHighlighter(HighlightPredicate.ROLLOVER_ROW, UIManager.getColor("App.hoverBackground"), null);
|
ColorHighlighter rollover = new ColorHighlighter(HighlightPredicate.ROLLOVER_ROW, UIManager.getColor("App.hoverBackground"), null);
|
||||||
treeTable.setHighlighters(rollover);
|
treeTable.setHighlighters(rollover);
|
||||||
|
treeTable.setIntercellSpacing(new Dimension(0, 1));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
super.updateUI();
|
super.updateUI();
|
||||||
|
@ -447,6 +447,7 @@ public class DictTypeManagementPanel extends JPanel {
|
|||||||
label.setIcon(icon);
|
label.setIcon(icon);
|
||||||
panel.add(label);
|
panel.add(label);
|
||||||
panel.setBackground(component.getBackground());
|
panel.setBackground(component.getBackground());
|
||||||
|
panel.setOpaque(isSelected);
|
||||||
return panel;
|
return panel;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -409,6 +409,7 @@ public class DictDataManagementPanel extends JPanel {
|
|||||||
label.setIcon(icon);
|
label.setIcon(icon);
|
||||||
panel.add(label);
|
panel.add(label);
|
||||||
panel.setBackground(component.getBackground());
|
panel.setBackground(component.getBackground());
|
||||||
|
panel.setOpaque(isSelected);
|
||||||
return panel;
|
return panel;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -357,6 +357,7 @@ public class LoginlogManagementPanel extends JPanel {
|
|||||||
label.setIcon(icon);
|
label.setIcon(icon);
|
||||||
panel.add(label);
|
panel.add(label);
|
||||||
panel.setBackground(component.getBackground());
|
panel.setBackground(component.getBackground());
|
||||||
|
panel.setOpaque(isSelected);
|
||||||
return panel;
|
return panel;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -380,6 +380,7 @@ public class OperatelogManagementPanel extends JPanel {
|
|||||||
label.setIcon(icon);
|
label.setIcon(icon);
|
||||||
panel.add(label);
|
panel.add(label);
|
||||||
panel.setBackground(component.getBackground());
|
panel.setBackground(component.getBackground());
|
||||||
|
panel.setOpaque(isSelected);
|
||||||
return panel;
|
return panel;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -107,7 +107,8 @@ public class MenuManagementPanel extends JPanel implements Observer {
|
|||||||
treeTable.setClosedIcon(null);
|
treeTable.setClosedIcon(null);
|
||||||
treeTable.setOpenIcon(null);
|
treeTable.setOpenIcon(null);
|
||||||
treeTable.setShowHorizontalLines(true);
|
treeTable.setShowHorizontalLines(true);
|
||||||
treeTable.setIntercellSpacing(new Dimension(1, 1));
|
treeTable.setShowVerticalLines(false);
|
||||||
|
treeTable.setIntercellSpacing(new Dimension(0, 1));
|
||||||
treeTable.setOpaque(false);
|
treeTable.setOpaque(false);
|
||||||
treeTable.setHighlighters();
|
treeTable.setHighlighters();
|
||||||
// JXTable
|
// JXTable
|
||||||
@ -134,7 +135,7 @@ public class MenuManagementPanel extends JPanel implements Observer {
|
|||||||
public void run() {
|
public void run() {
|
||||||
ColorHighlighter rollover = new ColorHighlighter(HighlightPredicate.ROLLOVER_ROW, UIManager.getColor("App.hoverBackground"), null);
|
ColorHighlighter rollover = new ColorHighlighter(HighlightPredicate.ROLLOVER_ROW, UIManager.getColor("App.hoverBackground"), null);
|
||||||
treeTable.setHighlighters(rollover);
|
treeTable.setHighlighters(rollover);
|
||||||
// treeTable.setIntercellSpacing(new Dimension(0, 1));
|
treeTable.setIntercellSpacing(new Dimension(0, 1));
|
||||||
// treeTable.setLeafIcon(null);
|
// treeTable.setLeafIcon(null);
|
||||||
// treeTable.setClosedIcon(null);
|
// treeTable.setClosedIcon(null);
|
||||||
// treeTable.setOpenIcon(null);
|
// treeTable.setOpenIcon(null);
|
||||||
|
@ -417,6 +417,7 @@ public class NoticeManagementPanel extends JPanel {
|
|||||||
label.setIcon(icon);
|
label.setIcon(icon);
|
||||||
panel.add(label);
|
panel.add(label);
|
||||||
panel.setBackground(component.getBackground());
|
panel.setBackground(component.getBackground());
|
||||||
|
panel.setOpaque(isSelected);
|
||||||
return panel;
|
return panel;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -399,6 +399,7 @@ public class PostManagementPanel extends JPanel {
|
|||||||
label.setIcon(icon);
|
label.setIcon(icon);
|
||||||
panel.add(label);
|
panel.add(label);
|
||||||
panel.setBackground(component.getBackground());
|
panel.setBackground(component.getBackground());
|
||||||
|
panel.setOpaque(isSelected);
|
||||||
return panel;
|
return panel;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -524,6 +524,7 @@ public class RoleManagementPanel extends JPanel {
|
|||||||
label.setIcon(icon);
|
label.setIcon(icon);
|
||||||
panel.add(label);
|
panel.add(label);
|
||||||
panel.setBackground(component.getBackground());
|
panel.setBackground(component.getBackground());
|
||||||
|
panel.setOpaque(isSelected);
|
||||||
return panel;
|
return panel;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -618,6 +618,7 @@ public class UserManagementPanel extends JPanel {
|
|||||||
label.setIcon(icon);
|
label.setIcon(icon);
|
||||||
panel.add(label);
|
panel.add(label);
|
||||||
panel.setBackground(component.getBackground());
|
panel.setBackground(component.getBackground());
|
||||||
|
panel.setOpaque(isSelected);
|
||||||
return panel;
|
return panel;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -88,7 +88,7 @@ defaultFont=14
|
|||||||
|
|
||||||
|
|
||||||
TableHeader.height=40
|
TableHeader.height=40
|
||||||
TableHeader.separatorColor = #fff0
|
#TableHeader.separatorColor = #fff
|
||||||
TableHeader.background = lighten(@background,6%,derived)
|
TableHeader.background = lighten(@background,6%,derived)
|
||||||
|
|
||||||
Table.showHorizontalLines=true
|
Table.showHorizontalLines=true
|
||||||
|
@ -84,6 +84,7 @@ Button.arc = 10
|
|||||||
|
|
||||||
Table.selectionBackground = #e6ecff
|
Table.selectionBackground = #e6ecff
|
||||||
TableHeader.separatorColor = $App.borderColor
|
TableHeader.separatorColor = $App.borderColor
|
||||||
|
TableHeader.background = darken(@background,8%)
|
||||||
TableHeader.height = 40
|
TableHeader.height = 40
|
||||||
Table.rowHeight = 40
|
Table.rowHeight = 40
|
||||||
Table.cellFocusColor= #e6ecff
|
Table.cellFocusColor= #e6ecff
|
||||||
|
Loading…
x
Reference in New Issue
Block a user