no message
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
package Common.Visual.Tables;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.Fonts.VisualiserFonts;
|
||||
import Common.Visual.UI_;
|
||||
|
||||
@@ -12,6 +13,6 @@ public class HiddenListRenderer extends RendererCell<Vector<String>> {
|
||||
@Override
|
||||
public void Display() {
|
||||
setText(String.join(";", value));
|
||||
setFont(UI_.getTheme().Fonts.get(VisualiserFonts.TreePlain).deriveFont(12.0f));
|
||||
setFont(MainModule_.instance.getUI().getTheme().Fonts.get(VisualiserFonts.TreePlain).deriveFont(12.0f));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package Common.Visual.Tables;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.StatusEnum;
|
||||
import Common.Visual.UI_;
|
||||
|
||||
@@ -12,7 +13,7 @@ public class StatusEnumRenderer extends RendererCell<StatusEnum> {
|
||||
public void Display() {
|
||||
if (value != null) {
|
||||
setText(value.getDescription());
|
||||
setFont(UI_.getTheme().Fonts.get(value.getFont()));
|
||||
setFont(MainModule_.instance.getUI().getTheme().Fonts.get(value.getFont()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package Common.Visual.Tables;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.Fonts.VisualiserFonts;
|
||||
import Common.Visual.Themes.ThemeElement;
|
||||
import Common.Visual.UI_;
|
||||
@@ -7,7 +8,7 @@ import javax.swing.*;
|
||||
//наиболее распространенный случай. переотображение текста и/или изображения в ячейке таблицы.
|
||||
public class StyledCellLabel extends JLabel implements ThemeElement {
|
||||
public StyledCellLabel() {
|
||||
setFont(UI_.getTheme().Fonts.get(VisualiserFonts.TreePlain));
|
||||
setFont(MainModule_.instance.getUI().getTheme().Fonts.get(VisualiserFonts.TreePlain));
|
||||
setHorizontalAlignment(SwingConstants.LEFT);
|
||||
setVerticalAlignment(SwingConstants.CENTER);
|
||||
setOpaque(true);
|
||||
@@ -15,7 +16,7 @@ public class StyledCellLabel extends JLabel implements ThemeElement {
|
||||
}
|
||||
@Override
|
||||
public void applyTheme() {
|
||||
setBackground(UI_.getTheme().table_background);
|
||||
setForeground(UI_.getTheme().foreground);
|
||||
setBackground(MainModule_.instance.getUI().getTheme().table_background);
|
||||
setForeground(MainModule_.instance.getUI().getTheme().foreground);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package Common.Visual.Tables;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.Fonts.VisualiserFonts;
|
||||
import Common.Visual.Menus.TableMenu;
|
||||
import Common.Visual.Themes.ThemeElement;
|
||||
@@ -16,9 +17,9 @@ public abstract class StyledTable extends JTable implements ThemeElement {
|
||||
setFillsViewportHeight(true);
|
||||
setAutoCreateRowSorter(dataModel.getRowCount() > 0);
|
||||
Init();
|
||||
setFont(UI_.getTheme().Fonts.get(VisualiserFonts.TreePlain));
|
||||
setFont(MainModule_.instance.getUI().getTheme().Fonts.get(VisualiserFonts.TreePlain));
|
||||
JTableHeader header = getTableHeader();
|
||||
header.setFont(UI_.getTheme().Fonts.get(VisualiserFonts.TreePlain));
|
||||
header.setFont(MainModule_.instance.getUI().getTheme().Fonts.get(VisualiserFonts.TreePlain));
|
||||
putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
|
||||
setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
||||
//текущий объет может определяться по первому столбцу. могут быть баги если не запретить
|
||||
@@ -77,10 +78,10 @@ public abstract class StyledTable extends JTable implements ThemeElement {
|
||||
}
|
||||
@Override
|
||||
public void applyTheme() {
|
||||
setBackground(UI_.getTheme().table_background);
|
||||
setForeground(UI_.getTheme().foreground);
|
||||
setSelectionBackground(UI_.getTheme().selection_background);
|
||||
setSelectionForeground(UI_.getTheme().foreground);
|
||||
setBackground(MainModule_.instance.getUI().getTheme().table_background);
|
||||
setForeground(MainModule_.instance.getUI().getTheme().foreground);
|
||||
setSelectionBackground(MainModule_.instance.getUI().getTheme().selection_background);
|
||||
setSelectionForeground(MainModule_.instance.getUI().getTheme().foreground);
|
||||
}
|
||||
public void SelectRow(int r) {
|
||||
getSelectionModel().setSelectionInterval(r, r);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package Common.Visual.Tables;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.Fonts.VisualiserFonts;
|
||||
import Common.Visual.UI_;
|
||||
|
||||
@@ -10,7 +11,7 @@ public class WrapTextRenderer extends JTextArea implements TableCellRenderer {
|
||||
setLineWrap(true);
|
||||
setWrapStyleWord(true);
|
||||
// setOpaque(false);
|
||||
setFont(UI_.getTheme().Fonts.get(VisualiserFonts.Distribution).deriveFont(14.0f));
|
||||
setFont(MainModule_.instance.getUI().getTheme().Fonts.get(VisualiserFonts.Distribution).deriveFont(14.0f));
|
||||
}
|
||||
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
|
||||
setBackground(isSelected ? table.getSelectionBackground() : table.getBackground());
|
||||
|
||||
Reference in New Issue
Block a user