no message
This commit is contained in:
@@ -8,7 +8,8 @@ public class ControlForm<C extends Component> {
|
||||
JPanel mountPanel = null; //панель на которую монтируется UI.помимо контрола может содержать меню сверху.
|
||||
JPanel scrollPanel = null; //панель на которой лежит скролл.
|
||||
JScrollPane scroll = null; //панель прокрутки в которую встроен контрол
|
||||
public C control = null;
|
||||
protected C control = null;
|
||||
public C getControl(){return control;}
|
||||
protected Class<C> control_class = null;
|
||||
public ControlForm(Class<C> class_in, JPanel mountPanel_in) {
|
||||
control_class = class_in;
|
||||
|
||||
@@ -19,7 +19,7 @@ public class ColumnFilter {
|
||||
setBorder(null);
|
||||
addActionListener(e -> {
|
||||
popup.setVisible(false);
|
||||
dataSet.ui_.control.getTableHeader().repaint();
|
||||
dataSet.ui_.getControl().getTableHeader().repaint();
|
||||
});
|
||||
getDocument().addDocumentListener(new DocumentListener() {
|
||||
@Override
|
||||
@@ -45,28 +45,28 @@ public class ColumnFilter {
|
||||
};
|
||||
popup.add(textField);
|
||||
//--
|
||||
dataSet.getUi().control.getColumnModel().getColumn(columnIndex).setHeaderRenderer((table, value, isSelected, hasFocus, row, column1) -> new JLabel() {
|
||||
dataSet.getUi().getControl().getColumnModel().getColumn(columnIndex).setHeaderRenderer((table, value, isSelected, hasFocus, row, column1) -> new JLabel() {
|
||||
{
|
||||
setIcon(Utils_.getIcon("/Common/icons/Filter.png"));
|
||||
setForeground(dataSet.getUi().control.getTableHeader().getForeground());
|
||||
setBackground(dataSet.getUi().control.getTableHeader().getBackground());
|
||||
setFont(dataSet.getUi().control.getTableHeader().getFont());
|
||||
setForeground(dataSet.getUi().getControl().getTableHeader().getForeground());
|
||||
setBackground(dataSet.getUi().getControl().getTableHeader().getBackground());
|
||||
setFont(dataSet.getUi().getControl().getTableHeader().getFont());
|
||||
setBorder(new MatteBorder(0, 0, 1, 1, Color.DARK_GRAY));
|
||||
setText("текст : " + dataSet.getColumnFilterValue(columnIndex));
|
||||
}
|
||||
});
|
||||
//--
|
||||
dataSet.getUi().control.getTableHeader().addMouseListener(new MouseAdapter() {
|
||||
dataSet.getUi().getControl().getTableHeader().addMouseListener(new MouseAdapter() {
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent event) {
|
||||
if (event.getClickCount() == 1) {
|
||||
int columnIndex = dataSet.getUi().control.getTableHeader().columnAtPoint(event.getPoint());
|
||||
int columnIndex = dataSet.getUi().getControl().getTableHeader().columnAtPoint(event.getPoint());
|
||||
if (dataSet.columnsFilters.containsKey(columnIndex)) {
|
||||
Rectangle columnRectangle = dataSet.getUi().control.getTableHeader().getHeaderRect(columnIndex);
|
||||
Rectangle columnRectangle = dataSet.getUi().getControl().getTableHeader().getHeaderRect(columnIndex);
|
||||
Dimension d = new Dimension(columnRectangle.width - 72, columnRectangle.height - 1);
|
||||
popup.setPreferredSize(d);
|
||||
popup.setMaximumSize(d);
|
||||
popup.show(dataSet.getUi().control.getTableHeader(), columnRectangle.x + 72, 0);
|
||||
popup.show(dataSet.getUi().getControl().getTableHeader(), columnRectangle.x + 72, 0);
|
||||
textField.setText(dataSet.getColumnFilterValue(columnIndex).toString());
|
||||
textField.requestFocusInWindow();
|
||||
textField.selectAll();
|
||||
|
||||
@@ -43,12 +43,12 @@ public class SaveGraph extends Pass<File> {
|
||||
if (target.exists() && !target.delete())
|
||||
throw new PassException("Не удается удалить предыдущий файл " + Utils_.Brackets(target.getAbsolutePath()));
|
||||
//-
|
||||
mxGraph graph = graphForm.control.getGraph();
|
||||
mxGraph graph = graphForm.getControl().getGraph();
|
||||
BufferedImage image = mxCellRenderer.createBufferedImage(graph,
|
||||
null, 1, Color.WHITE,
|
||||
graphForm.control.isAntiAlias(),
|
||||
graphForm.getControl().isAntiAlias(),
|
||||
null,
|
||||
graphForm.control.getCanvas());
|
||||
graphForm.getControl().getCanvas());
|
||||
// Creates the URL-encoded XML data
|
||||
mxCodec codec = new mxCodec();
|
||||
String xml = URLEncoder.encode(mxXmlUtils.getXml(codec.encode(graph.getModel())), "UTF-8");
|
||||
|
||||
@@ -338,7 +338,7 @@ public class FileForm implements FileWindow, FormWithSplitters {
|
||||
@Override
|
||||
public void ShowFirstError() {
|
||||
if (file.father.db.errors.ui_.getRowCount() > 0)
|
||||
file.father.db.errors.ui_.control.SelectRow(0);
|
||||
file.father.db.errors.ui_.getControl().SelectRow(0);
|
||||
}
|
||||
@Override
|
||||
public void ShowCompilationOutput() {
|
||||
|
||||
@@ -46,13 +46,13 @@ public class FunctionsForm implements FunctionsWindow {
|
||||
bZoomIn.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
functionsGraphForm.control.zoomIn();
|
||||
functionsGraphForm.getControl().zoomIn();
|
||||
}
|
||||
});
|
||||
bZoomOut.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
functionsGraphForm.control.zoomOut();
|
||||
functionsGraphForm.getControl().zoomOut();
|
||||
}
|
||||
});
|
||||
bSaveGraphAsImage.addActionListener(new ActionListener() {
|
||||
|
||||
Reference in New Issue
Block a user