Skip to content

Commit

Permalink
minor gui layout adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
Wisser committed Jul 30, 2024
1 parent 42b91b6 commit d4782fc
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/main/gui/net/sf/jailer/ui/ExtractionModelEditor.form
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
</Properties>
<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="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="40" insetsBottom="14" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
<GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="48" insetsBottom="12" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>

Expand Down Expand Up @@ -1044,7 +1044,7 @@
</Property>
<Property name="text" type="java.lang.String" value="offline"/>
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
<Color id="Default Cursor"/>
<Color id="Standardcursor"/>
</Property>
</Properties>
<AuxValues>
Expand Down
12 changes: 8 additions & 4 deletions src/main/gui/net/sf/jailer/ui/ExtractionModelEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -1674,7 +1674,7 @@ private void initComponents() {
columnMappingButtonHolder.setOpaque(false);
columnMappingButtonHolder.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 0, 0));
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.insets = new java.awt.Insets(0, 40, 14, 0);
gridBagConstraints.insets = new java.awt.Insets(0, 48, 12, 0);
cmbPanel.add(columnMappingButtonHolder, gridBagConstraints);

gridBagConstraints = new java.awt.GridBagConstraints();
Expand All @@ -1684,7 +1684,7 @@ private void initComponents() {

layeredPane.setLayer(inspectorHolder, javax.swing.JLayeredPane.PALETTE_LAYER);
layeredPane.add(inspectorHolder);
inspectorHolder.setBounds(0, 0, 40, 20);
inspectorHolder.setBounds(0, 0, 44, 10);

focusPanel.setForeground(/* Renaming also in *.form! */ Colors.Color_86_82_125);
focusPanel.setOpaque(false);
Expand Down Expand Up @@ -1757,7 +1757,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {

layeredPane.setLayer(focusPanel, javax.swing.JLayeredPane.PALETTE_LAYER);
layeredPane.add(focusPanel);
focusPanel.setBounds(0, 0, 345, 32);
focusPanel.setBounds(0, 0, 287, 33);

rightBorderPanel.setOpaque(false);
rightBorderPanel.setLayout(new java.awt.GridBagLayout());
Expand Down Expand Up @@ -2507,10 +2507,14 @@ private void treeValueChanged(javax.swing.event.TreeSelectionEvent evt) {//GEN-F
}
}//GEN-LAST:event_treeValueChanged

private Table currentTable;
Table currentTable;
Association currentAssociation;
private DefaultMutableTreeNode currentNode;
private String initialRestrictionCondition = null;

public ModelElement getCurrentSelection() {
return currentAssociation != null? currentAssociation : currentTable;
}

/**
* Opens a drop-down box which allows the user to select columns for restriction definitions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ public GraphicalDataModelView(final DataModel model, ExtractionModelEditor model
this.model = model;
this.modelEditor = modelEditor;
this.root = subject;

UIUtil.invokeLater(() -> {
if (subject != null && modelEditor.getCurrentSelection() == null) {
modelEditor.select(subject);
}
});

tableRenderer = new TableRenderer(model, this) {
@Override
Expand Down

0 comments on commit d4782fc

Please sign in to comment.