no message
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package Common.Visual.Tables;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.TextField.StyledTextField;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -47,7 +47,7 @@ public class ColumnFilter {
|
||||
//--
|
||||
dataSet.getUi().control.getColumnModel().getColumn(columnIndex).setHeaderRenderer((table, value, isSelected, hasFocus, row, column1) -> new JLabel() {
|
||||
{
|
||||
setIcon(CommonUtils.getIcon("/icons/Filter.png"));
|
||||
setIcon(Utils_.getIcon("/icons/Filter.png"));
|
||||
setForeground(dataSet.getUi().control.getTableHeader().getForeground());
|
||||
setBackground(dataSet.getUi().control.getTableHeader().getBackground());
|
||||
setFont(dataSet.getUi().control.getTableHeader().getFont());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package Common.Visual.Tables;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Utils.Utils_;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.util.Date;
|
||||
@@ -13,6 +13,6 @@ public class DateRenderer_ extends RendererCell<Date> {
|
||||
@Override
|
||||
public void Display() {
|
||||
if (value != null)
|
||||
setText(value.equals(zero) ? "нет" : CommonUtils.print_date(value));
|
||||
setText(value.equals(zero) ? "нет" : Utils_.print_date(value));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package Common.Visual.Tables;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common.Visual.UI_;
|
||||
import Common.Visual.Fonts.VisualiserFonts;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -12,6 +12,6 @@ public class HiddenListRenderer extends RendererCell<Vector<String>> {
|
||||
@Override
|
||||
public void Display() {
|
||||
setText(String.join(";", value));
|
||||
setFont(CommonUI.getTheme().Fonts.get(VisualiserFonts.TreePlain).deriveFont(12.0f));
|
||||
setFont(UI_.getTheme().Fonts.get(VisualiserFonts.TreePlain).deriveFont(12.0f));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package Common.Visual.Tables;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common.Visual.UI_;
|
||||
import Common.Visual.StatusEnum;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -12,7 +12,7 @@ public class StatusEnumRenderer extends RendererCell<StatusEnum> {
|
||||
public void Display() {
|
||||
if (value != null) {
|
||||
setText(value.getDescription());
|
||||
setFont(CommonUI.getTheme().Fonts.get(value.getFont()));
|
||||
setFont(UI_.getTheme().Fonts.get(value.getFont()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package Common.Visual.Tables;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common.Visual.UI_;
|
||||
import Common.Visual.Themes.ThemeElement;
|
||||
import Common.Visual.Fonts.VisualiserFonts;
|
||||
|
||||
@@ -7,7 +7,7 @@ import javax.swing.*;
|
||||
//наиболее распространенный случай. переотображение текста и/или изображения в ячейке таблицы.
|
||||
public class StyledCellLabel extends JLabel implements ThemeElement {
|
||||
public StyledCellLabel() {
|
||||
setFont(CommonUI.getTheme().Fonts.get(VisualiserFonts.TreePlain));
|
||||
setFont(UI_.getTheme().Fonts.get(VisualiserFonts.TreePlain));
|
||||
setHorizontalAlignment(SwingConstants.LEFT);
|
||||
setVerticalAlignment(SwingConstants.CENTER);
|
||||
setOpaque(true);
|
||||
@@ -15,7 +15,7 @@ public class StyledCellLabel extends JLabel implements ThemeElement {
|
||||
}
|
||||
@Override
|
||||
public void applyTheme() {
|
||||
setBackground(CommonUI.getTheme().table_background);
|
||||
setForeground(CommonUI.getTheme().foreground);
|
||||
setBackground(UI_.getTheme().table_background);
|
||||
setForeground(UI_.getTheme().foreground);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package Common.Visual.Tables;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common.Visual.UI_;
|
||||
import Common.Visual.Menus.TableMenu;
|
||||
import Common.Visual.Themes.ThemeElement;
|
||||
import Common.Visual.Fonts.VisualiserFonts;
|
||||
@@ -16,9 +16,9 @@ public abstract class StyledTable extends JTable implements ThemeElement {
|
||||
setFillsViewportHeight(true);
|
||||
setAutoCreateRowSorter(dataModel.getRowCount() > 0);
|
||||
Init();
|
||||
setFont(CommonUI.getTheme().Fonts.get(VisualiserFonts.TreePlain));
|
||||
setFont(UI_.getTheme().Fonts.get(VisualiserFonts.TreePlain));
|
||||
JTableHeader header = getTableHeader();
|
||||
header.setFont(CommonUI.getTheme().Fonts.get(VisualiserFonts.TreePlain));
|
||||
header.setFont(UI_.getTheme().Fonts.get(VisualiserFonts.TreePlain));
|
||||
putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
|
||||
setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
||||
//текущий объет может определяться по первому столбцу. могут быть баги если не запретить
|
||||
@@ -77,10 +77,10 @@ public abstract class StyledTable extends JTable implements ThemeElement {
|
||||
}
|
||||
@Override
|
||||
public void applyTheme() {
|
||||
setBackground(CommonUI.getTheme().table_background);
|
||||
setForeground(CommonUI.getTheme().foreground);
|
||||
setSelectionBackground(CommonUI.getTheme().selection_background);
|
||||
setSelectionForeground(CommonUI.getTheme().foreground);
|
||||
setBackground(UI_.getTheme().table_background);
|
||||
setForeground(UI_.getTheme().foreground);
|
||||
setSelectionBackground(UI_.getTheme().selection_background);
|
||||
setSelectionForeground(UI_.getTheme().foreground);
|
||||
}
|
||||
public void SelectRow(int r) {
|
||||
getSelectionModel().setSelectionInterval(r, r);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package Common.Visual.Tables;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common.Visual.UI_;
|
||||
import Common.Visual.Fonts.VisualiserFonts;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -10,7 +10,7 @@ public class WrapTextRenderer extends JTextArea implements TableCellRenderer {
|
||||
setLineWrap(true);
|
||||
setWrapStyleWord(true);
|
||||
// setOpaque(false);
|
||||
setFont(CommonUI.getTheme().Fonts.get(VisualiserFonts.Distribution).deriveFont(14.0f));
|
||||
setFont(UI_.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