mirror of
https://github.com/Wisser/Jailer.git
synced 2026-05-20 19:38:32 -05:00
Extended Copy, WIP
This commit is contained in:
@@ -44,4 +44,7 @@ public class JailerVersion {
|
||||
System.out.print(VERSION);
|
||||
}
|
||||
|
||||
// TODO
|
||||
// TODO jpack JDK instead of JRE
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
@@ -11,20 +11,147 @@
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-74"/>
|
||||
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-38,0,0,2,65"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="jButton1">
|
||||
<Container class="javax.swing.JPanel" name="jPanel1">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="1" gridY="1" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="1.0" weightY="1.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="1" gridY="1" gridWidth="2" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="1.0" weightY="1.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTable" name="contentTable">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor">
|
||||
<Table columnCount="4" rowCount="4">
|
||||
<Column editable="true" title="Title 1" type="java.lang.Object"/>
|
||||
<Column editable="true" title="Title 2" type="java.lang.Object"/>
|
||||
<Column editable="true" title="Title 3" type="java.lang.Object"/>
|
||||
<Column editable="true" title="Title 4" type="java.lang.Object"/>
|
||||
</Table>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JLabel" name="jLabel1">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font component="jLabel1" property="font" relativeSize="true" size="-1"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="80" green="80" id="gray" palette="1" red="80" type="palette"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="<html><i>Shift-Click:</i> Add row/column to selection. <i>Ctrl-Click:</i> Toggle row/column selection.</html>"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value="<html><i>Shift-Click:</i> Add row/column to selection. <br>
<i>Ctrl-Click:</i> Toggle row/column selection.</html>"/>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="1" gridY="2" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="6" insetsBottom="0" insetsRight="0" anchor="10" weightX="1.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Container class="javax.swing.JToolBar" name="jToolBar1">
|
||||
<Properties>
|
||||
<Property name="floatable" type="boolean" value="false"/>
|
||||
<Property name="rollover" type="boolean" value="true"/>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="2" gridY="2" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JToggleButton" name="maximizeButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Maximize"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value="Maximize size of dialog"/>
|
||||
<Property name="horizontalTextPosition" type="int" value="2"/>
|
||||
<Property name="verticalTextPosition" type="int" value="3"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="maximizeButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel3">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Copy and CLose"/>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
|
||||
<TitledBorder title="Preview"/>
|
||||
</Border>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="138" insetsLeft="163" insetsBottom="139" insetsRight="164" anchor="18" weightX="0.0" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="1" gridY="2" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane2">
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="1" gridY="1" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="1.0" weightY="1.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JEditorPane" name="jEditorPane1">
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel2">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="1" gridY="3" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="copyCloseButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Copy and CLose"/>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
|
||||
@@ -15,15 +15,27 @@
|
||||
*/
|
||||
package net.sf.jailer.ui;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Component;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Insets;
|
||||
import java.awt.Point;
|
||||
import java.awt.Window;
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JDialog;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JTable;
|
||||
import javax.swing.JViewport;
|
||||
import javax.swing.ListSelectionModel;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.WindowConstants;
|
||||
import javax.swing.table.DefaultTableCellRenderer;
|
||||
import javax.swing.table.DefaultTableModel;
|
||||
import javax.swing.table.TableCellRenderer;
|
||||
import javax.swing.table.TableColumn;
|
||||
|
||||
import net.sf.jailer.util.LogUtil;
|
||||
|
||||
/**
|
||||
* Extendet Copy Panel.
|
||||
@@ -35,34 +47,177 @@ public class ExtendetCopyPanel extends javax.swing.JPanel {
|
||||
|
||||
public static void openDialog(JTable jTable) {
|
||||
Window owner = SwingUtilities.getWindowAncestor(jTable);
|
||||
JFrame frame;
|
||||
frame = new JFrame("Extended Copy");
|
||||
frame.setAlwaysOnTop(true);
|
||||
frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
|
||||
frame.addWindowListener(new WindowAdapter() {
|
||||
@Override
|
||||
public void windowClosed(WindowEvent e) {
|
||||
UIUtil.checkTermination();
|
||||
}
|
||||
});
|
||||
JDialog window = new JDialog(owner, "Extended Copy");
|
||||
window.setModal(false);
|
||||
|
||||
window.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
|
||||
ExtendetCopyPanel copyPanel = new ExtendetCopyPanel();
|
||||
frame.getContentPane().add(copyPanel);
|
||||
copyPanel.initContentTable(jTable);
|
||||
|
||||
frame.pack();
|
||||
window.getContentPane().add(copyPanel);
|
||||
|
||||
Point mid = new Point(jTable.getParent().getWidth() / 2 - frame.getWidth() / 2, jTable.getParent().getHeight() / 2 - frame.getHeight() / 2);
|
||||
window.pack();
|
||||
window.setSize(Math.max(window.getWidth(), jTable.getParent().getWidth()), window.getHeight());
|
||||
copyPanel.jPanel3.setMinimumSize(new Dimension(1, 160));
|
||||
copyPanel.jPanel3.setPreferredSize(copyPanel.jPanel3.getMinimumSize());
|
||||
|
||||
Point off = new Point();
|
||||
off = SwingUtilities.convertPoint(copyPanel, off, copyPanel.contentTable.getParent());
|
||||
|
||||
Point mid = new Point(off.x + -window.getContentPane().getLocation().x - window.getInsets().left, off.y + -window.getContentPane().getLocation().y - window.getInsets().top); // jTable.getParent().getWidth() / 2 - frame.getWidth() / 2, jTable.getParent().getHeight() / 2 - frame.getHeight() / 2);
|
||||
SwingUtilities.convertPointToScreen(mid, jTable.getParent());
|
||||
|
||||
mid.x = Math.min(mid.x, owner.getX() + owner.getWidth() - frame.getWidth() - 4);
|
||||
mid.y = Math.min(mid.y, owner.getY() + owner.getHeight() - frame.getHeight() - 4);
|
||||
int maxX = owner.getX() + owner.getWidth() - window.getWidth() - 4;
|
||||
mid.x = Math.min(mid.x, maxX);
|
||||
int maxY = owner.getY() + owner.getHeight() - window.getHeight() - 4;
|
||||
mid.y = Math.min(mid.y, maxY);
|
||||
mid.x = Math.max(mid.x, owner.getX() + 4);
|
||||
mid.y = Math.max(mid.y, owner.getY() + 4);
|
||||
frame.setLocation(mid);
|
||||
frame.setVisible(true);
|
||||
|
||||
window.setLocation(mid);
|
||||
window.setSize(window.getWidth() + Math.max(0, Math.min(300, maxX - window.getX())), window.getHeight() + Math.max(0, Math.min(500, maxY - window.getY())));
|
||||
|
||||
window.revalidate();
|
||||
int h = copyPanel.jScrollPane1.getHeight() - copyPanel.contentTable.getHeight() - 48;
|
||||
if (h > 0) {
|
||||
h = window.getHeight() - h;
|
||||
window.setSize(window.getWidth(), h);
|
||||
window.revalidate();
|
||||
}
|
||||
window.setVisible(true);
|
||||
}
|
||||
|
||||
private ExtendetCopyPanel() {
|
||||
private void initContentTable(JTable jTable) {
|
||||
// TODO
|
||||
// TODO resp. column order: resp. order in Copy2CB too
|
||||
// TODO resp. row order
|
||||
Object[] colNames = new Object[jTable.getColumnCount()];
|
||||
for (int i = 0; i < colNames.length; ++i) {
|
||||
colNames[i] = jTable.getColumnName(i);
|
||||
}
|
||||
Object[][] data = new Object[jTable.getRowCount()][];
|
||||
for (int row = 0; row < data.length; ++row) {
|
||||
data[row] = new Object[colNames.length];
|
||||
int ri = jTable.getRowSorter().convertRowIndexToModel(row);
|
||||
for (int col = 0; col < colNames.length; ++col) {
|
||||
data[row][col] = jTable.getModel().getValueAt(ri, col);
|
||||
}
|
||||
}
|
||||
DefaultTableModel dtm = new DefaultTableModel(data, colNames) {
|
||||
@Override
|
||||
public boolean isCellEditable(int row, int column) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
contentTable.setModel(dtm);
|
||||
contentTable.setIntercellSpacing(new Dimension(0, 0));
|
||||
contentTable.setAutoCreateRowSorter(true);
|
||||
contentTable.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
|
||||
|
||||
for (int i = 0; i < colNames.length; ++i) {
|
||||
contentTable.getColumnModel().getColumn(i).setPreferredWidth(jTable.getColumnModel().getColumn(i).getWidth());
|
||||
colNames[i] = jTable.getColumnName(i);
|
||||
}
|
||||
|
||||
jScrollPane1.getViewport().setViewPosition(((JViewport) jTable.getParent()).getViewPosition());
|
||||
|
||||
contentTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
|
||||
contentTable.setRowSelectionAllowed(true);
|
||||
contentTable.setColumnSelectionAllowed(true);
|
||||
contentTable.setCellSelectionEnabled(true);
|
||||
contentTable.setName("contentTable");
|
||||
contentTable.setDefaultRenderer(Object.class, new TableCellRenderer() {
|
||||
final Color BG = new Color(220, 230, 255);
|
||||
// TODO
|
||||
// TODO check
|
||||
// final Color BGSELECTED = new Color(255, 230, 220);
|
||||
@Override
|
||||
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected,
|
||||
boolean hasFocus, int row, int column) {
|
||||
int dmColumn = column;
|
||||
// if (dmColumn > 0) {
|
||||
// --dmColumn;
|
||||
// }
|
||||
Component render = jTable.getCellRenderer(row, dmColumn).getTableCellRendererComponent(contentTable, value, isSelected, hasFocus, row, dmColumn);
|
||||
if (render instanceof JLabel) {
|
||||
if (UIUtil.TABLE_BACKGROUND_COLOR_1.equals(render.getBackground())) {
|
||||
// render.setBackground(BG);
|
||||
// TODO ? idea was: slight diff visually to indicate other dialog. But whot about wysiwyg?
|
||||
// TODO vorlaeufig: lass das so
|
||||
|
||||
// TODO
|
||||
// TODO render selected cells w/o changing text position ("ruhiger machen")
|
||||
}
|
||||
|
||||
// if (column == 0) {
|
||||
// ((JLabel) render).setBackground(BGCOLUMNS);
|
||||
// }
|
||||
// if (column == 0) {
|
||||
// String text = ((JLabel) render).getText();
|
||||
// String tabName = useTableName? tableName.get(row) : null;
|
||||
// if (tabName != null) {
|
||||
// JLabel tab = new JLabel("<html> " + tabName + " </html>");
|
||||
// tab.setForeground(new Color(0, 0, 180));
|
||||
// tab.setBackground(render.getBackground());
|
||||
// tab.setOpaque(render.isOpaque());
|
||||
// JPanel panel = new JPanel(new GridBagLayout());
|
||||
// panel.setToolTipText(text);
|
||||
// GridBagConstraints gridBagConstraints;
|
||||
// gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
// gridBagConstraints.gridx = 1;
|
||||
// gridBagConstraints.gridy = 1;
|
||||
// gridBagConstraints.fill = GridBagConstraints.BOTH;
|
||||
// gridBagConstraints.weightx = 1;
|
||||
// gridBagConstraints.weighty = 1;
|
||||
// gridBagConstraints.anchor = GridBagConstraints.WEST;
|
||||
// panel.add(tab, gridBagConstraints);
|
||||
// gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
// gridBagConstraints.gridx = 3;
|
||||
// gridBagConstraints.gridy = 1;
|
||||
// gridBagConstraints.anchor = GridBagConstraints.EAST;
|
||||
// gridBagConstraints.fill = GridBagConstraints.BOTH;
|
||||
// gridBagConstraints.weighty = 1;
|
||||
// panel.add(render, gridBagConstraints);
|
||||
// ((JLabel) render).setText(text + " ");
|
||||
// return panel;
|
||||
// }
|
||||
// ((JLabel) render).setText(" " + text);
|
||||
// }
|
||||
if ("found".equals(render.getName())) {
|
||||
Color background = render.getBackground();
|
||||
render.setBackground(
|
||||
new Color(
|
||||
Math.max((int)(background.getRed()), 0),
|
||||
Math.max((int)(background.getGreen() * 0.90), 0),
|
||||
Math.max((int)(background.getBlue() * 0.91), 0),
|
||||
background.getAlpha()));
|
||||
}
|
||||
}
|
||||
return render;
|
||||
}
|
||||
});
|
||||
try {
|
||||
((DefaultTableCellRenderer) contentTable.getTableHeader().getDefaultRenderer()).setHorizontalAlignment(JLabel.LEFT);
|
||||
for (int i = 0; i < jTable.getColumnModel().getColumnCount(); ++i) {
|
||||
TableColumn col = jTable.getColumnModel().getColumn(i);
|
||||
contentTable.getColumnModel().getColumn(i).setModelIndex(col.getModelIndex());
|
||||
}
|
||||
contentTable.getSelectionModel();
|
||||
for (int r: jTable.getSelectedRows()) {
|
||||
contentTable.addRowSelectionInterval(r, r);
|
||||
}
|
||||
contentTable.setColumnSelectionInterval(0, contentTable.getColumnCount() - 1);
|
||||
} catch (Exception e) {
|
||||
LogUtil.warn(e);
|
||||
}
|
||||
|
||||
// TODO select.change.listener: events zusammenfassen (invokeLater)
|
||||
|
||||
}
|
||||
|
||||
private ExtendetCopyPanel() {
|
||||
initComponents();
|
||||
maximizeButton.setIcon(maximizeIcon);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -74,21 +229,170 @@ public class ExtendetCopyPanel extends javax.swing.JPanel {
|
||||
private void initComponents() {
|
||||
java.awt.GridBagConstraints gridBagConstraints;
|
||||
|
||||
jButton1 = new javax.swing.JButton();
|
||||
jPanel1 = new javax.swing.JPanel();
|
||||
jScrollPane1 = new javax.swing.JScrollPane();
|
||||
contentTable = new javax.swing.JTable();
|
||||
jLabel1 = new javax.swing.JLabel();
|
||||
jToolBar1 = new javax.swing.JToolBar();
|
||||
maximizeButton = new javax.swing.JToggleButton();
|
||||
jPanel3 = new javax.swing.JPanel();
|
||||
jScrollPane2 = new javax.swing.JScrollPane();
|
||||
jEditorPane1 = new javax.swing.JEditorPane();
|
||||
jPanel2 = new javax.swing.JPanel();
|
||||
copyCloseButton = new javax.swing.JButton();
|
||||
|
||||
setLayout(new java.awt.GridBagLayout());
|
||||
|
||||
jButton1.setText("Copy and CLose");
|
||||
jPanel1.setLayout(new java.awt.GridBagLayout());
|
||||
|
||||
contentTable.setModel(new javax.swing.table.DefaultTableModel(
|
||||
new Object [][] {
|
||||
{null, null, null, null},
|
||||
{null, null, null, null},
|
||||
{null, null, null, null},
|
||||
{null, null, null, null}
|
||||
},
|
||||
new String [] {
|
||||
"Title 1", "Title 2", "Title 3", "Title 4"
|
||||
}
|
||||
));
|
||||
jScrollPane1.setViewportView(contentTable);
|
||||
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 1;
|
||||
gridBagConstraints.gridwidth = 2;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
gridBagConstraints.weighty = 1.0;
|
||||
jPanel1.add(jScrollPane1, gridBagConstraints);
|
||||
|
||||
jLabel1.setFont(jLabel1.getFont().deriveFont(jLabel1.getFont().getSize()-1f));
|
||||
jLabel1.setForeground(java.awt.Color.gray);
|
||||
jLabel1.setText("<html><i>Shift-Click:</i> Add row/column to selection. <i>Ctrl-Click:</i> Toggle row/column selection.</html>");
|
||||
jLabel1.setToolTipText("<html><i>Shift-Click:</i> Add row/column to selection. <br>\n<i>Ctrl-Click:</i> Toggle row/column selection.</html>");
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 2;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
gridBagConstraints.insets = new java.awt.Insets(0, 6, 0, 0);
|
||||
jPanel1.add(jLabel1, gridBagConstraints);
|
||||
|
||||
jToolBar1.setFloatable(false);
|
||||
jToolBar1.setRollover(true);
|
||||
|
||||
maximizeButton.setText("Maximize");
|
||||
maximizeButton.setToolTipText("Maximize size of dialog");
|
||||
maximizeButton.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
|
||||
maximizeButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
|
||||
maximizeButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
maximizeButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jToolBar1.add(maximizeButton);
|
||||
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 2;
|
||||
gridBagConstraints.gridy = 2;
|
||||
jPanel1.add(jToolBar1, gridBagConstraints);
|
||||
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 1;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
gridBagConstraints.weighty = 1.0;
|
||||
add(jPanel1, gridBagConstraints);
|
||||
|
||||
jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Preview"));
|
||||
jPanel3.setLayout(new java.awt.GridBagLayout());
|
||||
|
||||
jScrollPane2.setViewportView(jEditorPane1);
|
||||
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 1;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
gridBagConstraints.weighty = 1.0;
|
||||
jPanel3.add(jScrollPane2, gridBagConstraints);
|
||||
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 2;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
|
||||
gridBagConstraints.insets = new java.awt.Insets(4, 0, 0, 0);
|
||||
add(jPanel3, gridBagConstraints);
|
||||
|
||||
jPanel2.setLayout(new java.awt.GridBagLayout());
|
||||
|
||||
copyCloseButton.setText("Copy and CLose");
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 0;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||
gridBagConstraints.insets = new java.awt.Insets(138, 163, 139, 164);
|
||||
add(jButton1, gridBagConstraints);
|
||||
jPanel2.add(copyCloseButton, gridBagConstraints);
|
||||
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 3;
|
||||
add(jPanel2, gridBagConstraints);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private Point oldLoc;
|
||||
private Dimension oldSize;
|
||||
|
||||
private void maximizeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_maximizeButtonActionPerformed
|
||||
Window dialog = SwingUtilities.getWindowAncestor(this);
|
||||
if (dialog != null) {
|
||||
Window owner = dialog.getOwner();
|
||||
if (owner != null) {
|
||||
if (oldLoc != null) {
|
||||
dialog.setLocation(oldLoc);
|
||||
dialog.setSize(oldSize);
|
||||
oldLoc = null;
|
||||
oldSize = null;
|
||||
maximizeButton.setIcon(maximizeIcon);
|
||||
} else {
|
||||
oldLoc = dialog.getLocation();
|
||||
oldSize = dialog.getSize();
|
||||
Insets insets = owner.getInsets();
|
||||
int b = 32;
|
||||
insets.top += b;
|
||||
insets.bottom += b;
|
||||
insets.left += b;
|
||||
insets.right += b;
|
||||
dialog.setLocation(owner.getLocation().x + insets.left, owner.getLocation().y + insets.top - 1);
|
||||
dialog.setSize(owner.getSize().width - insets.left - insets.right + 1, owner.getSize().height - insets.top - insets.bottom);
|
||||
maximizeButton.setIcon(unmaximizeIcon);
|
||||
}
|
||||
}
|
||||
}
|
||||
}//GEN-LAST:event_maximizeButtonActionPerformed
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton jButton1;
|
||||
private javax.swing.JTable contentTable;
|
||||
private javax.swing.JButton copyCloseButton;
|
||||
private javax.swing.JEditorPane jEditorPane1;
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JPanel jPanel1;
|
||||
private javax.swing.JPanel jPanel2;
|
||||
private javax.swing.JPanel jPanel3;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JScrollPane jScrollPane2;
|
||||
private javax.swing.JToolBar jToolBar1;
|
||||
private javax.swing.JToggleButton maximizeButton;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
private static ImageIcon maximizeIcon;
|
||||
private static ImageIcon unmaximizeIcon;
|
||||
static {
|
||||
// load images
|
||||
maximizeIcon = UIUtil.scaleIcon(new JLabel(""), UIUtil.readImage("/maximizec.png"));
|
||||
unmaximizeIcon = UIUtil.scaleIcon(new JLabel(""), UIUtil.readImage("/unmaximize.png"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1305,7 +1305,7 @@ public abstract class BrowserContentPane extends javax.swing.JPanel {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
UIUtil.copyToClipboard(rowsTable, copyAllColumns());
|
||||
// TODO
|
||||
// ExtendetCopyPanel.openDialog(rowsTable);
|
||||
ExtendetCopyPanel.openDialog(rowsTable);
|
||||
}
|
||||
};
|
||||
am.put(key, a);
|
||||
@@ -1420,6 +1420,7 @@ public abstract class BrowserContentPane extends javax.swing.JPanel {
|
||||
@Override
|
||||
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, final int row, final int column) {
|
||||
boolean cellSelected = isSelected;
|
||||
boolean isContentTable = "contentTable".equals(table.getName());
|
||||
|
||||
if (BrowserContentPane.this.getQueryBuilderDialog() != null || // SQL Console
|
||||
table.getSelectedColumnCount() <= 1 && table.getSelectedRowCount() <= 1) {
|
||||
@@ -1432,9 +1433,9 @@ public abstract class BrowserContentPane extends javax.swing.JPanel {
|
||||
TableColumnModel columnModel = rowsTable.getColumnModel();
|
||||
|
||||
boolean found = !foundColumn.isEmpty() && column < columnModel.getColumnCount() && foundColumn.contains(columnModel.getColumn(column).getModelIndex());
|
||||
isSelected = !found && (currentRowSelection == row || currentRowSelection == -2);
|
||||
isSelected = !isContentTable && !found && (currentRowSelection == row || currentRowSelection == -2);
|
||||
int bgRow = row;
|
||||
if (table != rowsTable) {
|
||||
if (table != rowsTable && !isContentTable) {
|
||||
isSelected = false;
|
||||
++bgRow;
|
||||
if (table.getSelectedRows().length <= 1 && table.getSelectedColumns().length <= 1) {
|
||||
@@ -1477,9 +1478,9 @@ public abstract class BrowserContentPane extends javax.swing.JPanel {
|
||||
((JLabel) render).setBorder(cellSelected? BorderFactory.createEtchedBorder() : null);
|
||||
int convertedColumnIndex = rowsTable.convertColumnIndexToModel(column);
|
||||
Table type = getResultSetTypeForColumn(convertedColumnIndex);
|
||||
if (!isSelected && (table == rowsTable || !cellSelected)) {
|
||||
if (isContentTable || (!isSelected && (table == rowsTable || !cellSelected))) {
|
||||
if (BrowserContentPane.this.getQueryBuilderDialog() != null && // SQL Console
|
||||
!found &&
|
||||
!isContentTable && !found &&
|
||||
BrowserContentPane.this.rowsClosure.currentClosureRowIDs != null &&
|
||||
row < rows.size() &&
|
||||
row < rowSorter.getViewRowCount() &&
|
||||
@@ -1495,7 +1496,7 @@ public abstract class BrowserContentPane extends javax.swing.JPanel {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (isEditMode && r != null && (r.rowId != null && !r.rowId.isEmpty()) && browserContentCellEditor.isEditable(type, convertedColumnIndex, r.values[convertedColumnIndex])
|
||||
if (!isContentTable && isEditMode && r != null && (r.rowId != null && !r.rowId.isEmpty()) && browserContentCellEditor.isEditable(type, convertedColumnIndex, r.values[convertedColumnIndex])
|
||||
&& isPKComplete(type, r) && !rowIdSupport.getPrimaryKey(type, BrowserContentPane.this.session).getColumns().isEmpty()) {
|
||||
((JLabel) render).setBackground((bgRow % 2 == 0) ? BG1_EM : BG2_EM);
|
||||
render.setName("final");
|
||||
@@ -1555,7 +1556,7 @@ public abstract class BrowserContentPane extends javax.swing.JPanel {
|
||||
}
|
||||
}
|
||||
boolean isNumber = false;
|
||||
if (table == rowsTable) {
|
||||
if (table == rowsTable || isContentTable) {
|
||||
synchronized (rowColumnTypes) {
|
||||
int ci = columnModel.getColumn(column).getModelIndex();
|
||||
if (rowColumnTypes.size() > ci) {
|
||||
@@ -7025,7 +7026,7 @@ public abstract class BrowserContentPane extends javax.swing.JPanel {
|
||||
detailsView.setSortColumns(currentRowsSortedReference == null? sortColumnsCheckBox.isSelected() : currentRowsSortedReference.get());
|
||||
d.pack();
|
||||
d.setLocation(x - 16, y + 2);
|
||||
d.setSize(600, Math.max(152 + 16, d.getHeight()));
|
||||
d.setSize(600, Math.max(152 + 16, d.getHeight()) + 16);
|
||||
UIUtil.fit(d);
|
||||
Window p = SwingUtilities.getWindowAncestor(rowsTable);
|
||||
if (p != null) {
|
||||
|
||||
@@ -371,6 +371,15 @@ public abstract class DesktopAnchorManager {
|
||||
Point locO = new Point();
|
||||
locO = SwingUtilities.convertPoint(tableBrowser.internalFrame.getParent().getParent(), locO, anchorPanel);
|
||||
loc = new Point(Math.max(locO.x - anchorPanel.getWidth(), loc.x) - 1, Math.max(locO.y, loc.y + 1));
|
||||
if (anchorPanel.getComponentCount() > 1 && !anchorPanel.getComponents()[0].isEnabled() && !anchorPanel.getComponents()[1].isEnabled()) {
|
||||
loc = new Point(loc.x, loc.y + anchorPanel.getComponents()[0].getHeight());
|
||||
anchorPanel.setSize(anchorPanel.getWidth(), anchorPanel.getHeight() - anchorPanel.getComponents()[0].getHeight());
|
||||
for (Component c: anchorPanel.getComponents()) {
|
||||
c.setLocation(c.getX(), c.getY() - anchorPanel.getComponents()[0].getHeight());
|
||||
}
|
||||
anchorPanel.getComponents()[0].setVisible(false);
|
||||
anchorPanel.getComponents()[1].setVisible(false);
|
||||
}
|
||||
anchorPanel.setLocation(loc);
|
||||
anchorButton.setVisible(true);
|
||||
anchorPanel.setVisible(true);
|
||||
|
||||
@@ -215,6 +215,18 @@
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="pinToggleButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="maximizeButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="jButton1"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value="Maximize"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="horizontalTextPosition" type="int" value="0"/>
|
||||
<Property name="verticalTextPosition" type="int" value="3"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="maximizeButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
|
||||
@@ -23,6 +23,7 @@ import java.awt.FlowLayout;
|
||||
import java.awt.Font;
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import java.awt.Insets;
|
||||
import java.awt.Point;
|
||||
import java.awt.Window;
|
||||
import java.awt.event.FocusEvent;
|
||||
@@ -712,7 +713,7 @@ public abstract class DetailsView extends javax.swing.JPanel {
|
||||
Dimension preferredSize = new Dimension(1, 1);
|
||||
p.setPreferredSize(preferredSize);
|
||||
p.setOpaque(true);
|
||||
p.setBackground(i % 2 == 0? BG1 : BG2);
|
||||
p.setBackground(BG2);
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.weightx = 1;
|
||||
gridBagConstraints.weighty = 1;
|
||||
@@ -870,6 +871,7 @@ public abstract class DetailsView extends javax.swing.JPanel {
|
||||
sortCheckBox = new javax.swing.JCheckBox();
|
||||
editModeToggleButton = new javax.swing.JToggleButton();
|
||||
pinToggleButton = new javax.swing.JToggleButton();
|
||||
maximizeButton = new javax.swing.JButton();
|
||||
|
||||
setLayout(new java.awt.GridBagLayout());
|
||||
|
||||
@@ -992,6 +994,18 @@ public abstract class DetailsView extends javax.swing.JPanel {
|
||||
});
|
||||
jToolBar1.add(pinToggleButton);
|
||||
|
||||
maximizeButton.setText("jButton1");
|
||||
maximizeButton.setToolTipText("Maximize");
|
||||
maximizeButton.setFocusable(false);
|
||||
maximizeButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
|
||||
maximizeButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
|
||||
maximizeButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
maximizeButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jToolBar1.add(maximizeButton);
|
||||
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 5;
|
||||
gridBagConstraints.gridy = 1;
|
||||
@@ -1050,6 +1064,40 @@ public abstract class DetailsView extends javax.swing.JPanel {
|
||||
selectButton.setEnabled(false);
|
||||
}//GEN-LAST:event_pinToggleButtonActionPerformed
|
||||
|
||||
private Point oldLoc;
|
||||
private Dimension oldSize;
|
||||
private boolean oldIsPinned;
|
||||
|
||||
private void maximizeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_maximizeButtonActionPerformed
|
||||
Window dialog = SwingUtilities.getWindowAncestor(this);
|
||||
if (dialog != null) {
|
||||
Window owner = dialog.getOwner();
|
||||
if (owner != null) {
|
||||
if (oldLoc != null) {
|
||||
dialog.setLocation(oldLoc);
|
||||
dialog.setSize(oldSize);
|
||||
oldLoc = null;
|
||||
oldSize = null;
|
||||
maximizeButton.setIcon(maximizeIcon);
|
||||
if (oldIsPinned ^ pinToggleButton.isSelected()) {
|
||||
pinToggleButton.doClick();
|
||||
}
|
||||
} else {
|
||||
oldLoc = dialog.getLocation();
|
||||
oldSize = dialog.getSize();
|
||||
oldIsPinned = pinToggleButton.isSelected();
|
||||
if (!pinToggleButton.isSelected()) {
|
||||
pinToggleButton.doClick();
|
||||
}
|
||||
final Insets insets = owner.getInsets();
|
||||
dialog.setLocation(owner.getLocation().x + insets.left, owner.getLocation().y + insets.top - 1);
|
||||
dialog.setSize(owner.getSize().width - insets.left - insets.right + 1, owner.getSize().height - insets.top - insets.bottom);
|
||||
maximizeButton.setIcon(unmaximizeIcon);
|
||||
}
|
||||
}
|
||||
}
|
||||
}//GEN-LAST:event_maximizeButtonActionPerformed
|
||||
|
||||
public boolean isPinned() {
|
||||
return pinToggleButton.isSelected();
|
||||
}
|
||||
@@ -1071,6 +1119,7 @@ public abstract class DetailsView extends javax.swing.JPanel {
|
||||
private javax.swing.JPanel jPanel3;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JToolBar jToolBar1;
|
||||
private javax.swing.JButton maximizeButton;
|
||||
private javax.swing.JToggleButton pinToggleButton;
|
||||
protected javax.swing.JSpinner rowSpinner;
|
||||
private javax.swing.JButton selectButton;
|
||||
@@ -1146,6 +1195,14 @@ public abstract class DetailsView extends javax.swing.JPanel {
|
||||
textPanel.add(tabContentPanel.textTabPanel, BorderLayout.CENTER);
|
||||
|
||||
JPanel movePanel = new MovePanel();
|
||||
movePanel.addMouseListener(new MouseAdapter() {
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent e) {
|
||||
if (SwingUtilities.isLeftMouseButton(e) && e.getClickCount() > 1) {
|
||||
maximizeButton.doClick();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 4;
|
||||
@@ -1155,6 +1212,9 @@ public abstract class DetailsView extends javax.swing.JPanel {
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
jPanel3.add(movePanel, gridBagConstraints);
|
||||
|
||||
maximizeButton.setText(null);
|
||||
maximizeButton.setIcon(maximizeIcon);
|
||||
|
||||
SmallButton closeButton = new SmallButton(closeIcon, closeOverIcon, false) {
|
||||
@Override
|
||||
protected void onClick(MouseEvent e) {
|
||||
@@ -1219,10 +1279,14 @@ public abstract class DetailsView extends javax.swing.JPanel {
|
||||
private static ImageIcon pinIcon;
|
||||
private static ImageIcon closeIcon;
|
||||
private static ImageIcon closeOverIcon;
|
||||
private static ImageIcon maximizeIcon;
|
||||
private static ImageIcon unmaximizeIcon;
|
||||
static {
|
||||
// load images
|
||||
editdetails = UIUtil.readImage("/editdetails.png");
|
||||
pinIcon = UIUtil.readImage("/pin.png");
|
||||
maximizeIcon = UIUtil.scaleIcon(new JLabel(""), UIUtil.readImage("/maximize.png"));
|
||||
unmaximizeIcon = UIUtil.scaleIcon(new JLabel(""), UIUtil.readImage("/unmaximize.png"));
|
||||
closeIcon = UIUtil.scaleIcon(new JLabel(""), UIUtil.readImage("/close.png"), 1.55);
|
||||
closeOverIcon = UIUtil.scaleIcon(new JLabel(""), UIUtil.readImage("/close_over.png"), 1.55);
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ public class MDTable extends MDObject {
|
||||
* @param schema the tables schema
|
||||
*/
|
||||
public MDTable(String name, MDSchema schema, boolean isView, boolean isSynonym) {
|
||||
super(name, schema.getMetaDataSource());
|
||||
super(name, schema != null? schema.getMetaDataSource() : null);
|
||||
this.isView = isView;
|
||||
this.isSynonym = isSynonym;
|
||||
this.schema = schema;
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 294 B |
Binary file not shown.
|
After Width: | Height: | Size: 395 B |
Reference in New Issue
Block a user