Skip to content

Commit 897baf1

Browse files
Edit relative location of ConfigureConditionsDialog.
1 parent d5d87c9 commit 897baf1

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

src/main/java/com/oxygenxml/docbook/checker/gui/ConfigureConditionsDialog.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
import javax.swing.AbstractAction;
1616
import javax.swing.JButton;
17-
import javax.swing.JFrame;
1817
import javax.swing.JLabel;
1918
import javax.swing.JPanel;
2019
import javax.swing.JScrollPane;
@@ -101,12 +100,11 @@ public class ConfigureConditionsDialog extends OKCancelDialog implements Profile
101100
* @param urls List with URLs in String format.
102101
* @param profilingPanel Profiling panel.
103102
* @param translator Translator
104-
* @param parentComponent parent frame
105103
* @param conditionsInformations Conditions information
106104
*/
107105
public ConfigureConditionsDialog(ProblemReporter problemReporter, List<URL> urls, ProfilingPanel profilingPanel,
108-
Translator translator, JFrame parentComponent , ProfilingConditionsInformations conditionsInformations) {
109-
super(parentComponent, translator.getTranslation(Tags.CONFIGURE_CONDITIONS_DIALOG_TITLE) , true);
106+
Translator translator, ProfilingConditionsInformations conditionsInformations) {
107+
super(null, translator.getTranslation(Tags.CONFIGURE_CONDITIONS_DIALOG_TITLE) , true);
110108
this.problemReporter = problemReporter;
111109
this.urlsToCheck = urls;
112110
this.profilingPanel = profilingPanel;
@@ -191,8 +189,8 @@ public void actionPerformed(ActionEvent e) {
191189

192190
this.add(configuteConditionPanel);
193191
pack();
194-
this.setMinimumSize(getSize());
195-
this.setLocationRelativeTo(super.getParent());
192+
this.setMinimumSize(new Dimension(getSize().width + 20, getSize().height));
193+
this.setLocationRelativeTo(profilingPanel.getParent());
196194
this.setResizable(true);
197195
this.setVisible(true);
198196
}

src/main/java/com/oxygenxml/docbook/checker/gui/DocBookCheckerDialog.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public DocBookCheckerDialog(ApplicationSourceDescription sourceDescription, Appl
134134

135135
selectFilePanel = new SelectFilesPanel(translator, this.getOkButton());
136136

137-
profilingPanel = new ProfilingPanel(selectFilePanel, sourceDescription, applicationInteractor, problemReporter, translator);
137+
profilingPanel = new ProfilingPanel(selectFilePanel, sourceDescription, problemReporter, translator);
138138

139139
// Initialize GUI
140140
initGUI();

src/main/java/com/oxygenxml/docbook/checker/gui/ProfilingPanel.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,11 @@ public class ProfilingPanel extends JPanel {
137137
* Constructor
138138
* @param selectFilePanel selectedFilePanel
139139
* @param sourceDescription ApplicationSourceDescription
140-
* @param oxygenInteractor Application interactor,
141140
* @param problemReporter Problem reporter
142141
* @param translator Translator
143142
*/
144143
public ProfilingPanel(final SelectFilesPanel selectFilePanel, final ApplicationSourceDescription sourceDescription,
145-
final ApplicationInteractor oxygenInteractor, final ProblemReporter problemReporter, final Translator translator) {
144+
final ProblemReporter problemReporter, final Translator translator) {
146145
this.translator = translator;
147146

148147
useProfilingCondCBox = new JCheckBox(translator.getTranslation(Tags.USE_PROFLING_CBOX));
@@ -179,7 +178,7 @@ public void actionPerformed(ActionEvent e) {
179178
urls = selectFilePanel.getFilesFromTable();
180179
}
181180
new ConfigureConditionsDialog(problemReporter, urls, ProfilingPanel.this,
182-
translator, oxygenInteractor.getApplicationFrame(), profilingConditionsInformations );
181+
translator, profilingConditionsInformations );
183182
}
184183
});
185184

0 commit comments

Comments
 (0)