Skip to content

Commit 2f7aa96

Browse files
committed
unused code removed
1 parent d2d65e8 commit 2f7aa96

File tree

3 files changed

+3
-87
lines changed

3 files changed

+3
-87
lines changed

src/main/java/com/tagtraum/perf/gcviewer/GCDocument.java

+3-17
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ public class GCDocument extends JInternalFrame {
4545
private RefreshWatchDog refreshWatchDog;
4646
private GCPreferences preferences;
4747

48-
4948
public GCDocument(final GCViewer gcViewer, String s) {
5049
super(s, true, true, true, false);
5150
this.refreshWatchDog = new RefreshWatchDog();
@@ -143,7 +142,9 @@ public void add(final URL url) throws IOException {
143142
chartPanelViews.add(chartPanelView);
144143
chartPanelView.addPropertyChangeListener(new PropertyChangeListener() {
145144
public void propertyChange(PropertyChangeEvent event) {
146-
if (ChartPanelView.EVENT_MINIMIZED.equals(event.getPropertyName())) relayout();
145+
if (ChartPanelView.EVENT_MINIMIZED.equals(event.getPropertyName())) {
146+
relayout();
147+
}
147148
}
148149
});
149150
// make sure all models in one document have the same display properties
@@ -186,7 +187,6 @@ public void relayout() {
186187
final ChartPanelView chartPanelView = (ChartPanelView) chartPanelViews.get(i);
187188
final ModelChartImpl modelChart = (ModelChartImpl) chartPanelView.getModelChart();
188189
final ModelPanel modelPanel = chartPanelView.getModelPanel();
189-
//final JComponent parseLog = new JScrollPane(chartPanelView.getParseLog());
190190
modelChart.invalidate();
191191
GridBagConstraints constraints = new GridBagConstraints();
192192
constraints.fill = GridBagConstraints.HORIZONTAL;
@@ -211,20 +211,6 @@ public void relayout() {
211211
modelChart.setVisible(!chartPanelView.isMinimized());
212212
getContentPane().add(modelChart, constraints);
213213

214-
/*
215-
constraints.gridheight = 1;
216-
constraints.gridy = row;
217-
constraints.gridx = 1;
218-
constraints.weightx = 0;
219-
constraints.weighty = 4;
220-
constraints.fill = GridBagConstraints.BOTH;
221-
constraints.anchor = GridBagConstraints.NORTH;
222-
getContentPane().add(parseLog, constraints);
223-
parseLog.setVisible(!chartPanelView.isMinimized());
224-
225-
row++;
226-
*/
227-
228214
constraints.gridy = row;
229215
constraints.gridheight = 1;
230216
constraints.gridx = 1;

src/main/java/com/tagtraum/perf/gcviewer/GCViewer.java

-12
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ public class GCViewer extends JFrame {
9191
private About aboutAction = new About(this);
9292
private OpenFile openFileAction = new OpenFile(this);
9393
private OpenURL openURLAction = new OpenURL(this);
94-
//private AddFile addFileAction = new AddFile(this);
9594
private Refresh refreshAction = new Refresh(this);
9695
private Export exportAction = new Export(this);
9796
private Zoom zoomAction = new Zoom(this);
@@ -204,7 +203,6 @@ public void internalFrameActivated(final InternalFrameEvent e) {
204203
menuItemWatch.setSelected(getSelectedGCDocument().isWatched());
205204
getSelectedGCDocument().getRefreshWatchDog().setAction(watchAction);
206205
watchToggle.setSelected(getSelectedGCDocument().isWatched());
207-
//addFileAction.setEnabled(true);
208206
zoomAction.setEnabled(true);
209207
arrangeAction.setEnabled(true);
210208
menuItemFullGCLines.setState(getSelectedGCDocument().getModelChart().isShowFullGCLines());
@@ -223,7 +221,6 @@ public void internalFrameDeactivated(final InternalFrameEvent e) {
223221
exportAction.setEnabled(false);
224222
refreshAction.setEnabled(false);
225223
watchAction.setEnabled(false);
226-
//addFileAction.setEnabled(false);
227224
zoomAction.setEnabled(false);
228225
watchToggle.setSelected(false);
229226
menuItemWatch.setSelected(false);
@@ -251,9 +248,6 @@ public void open(final File[] files) {
251248
// delegate to open(...)
252249
try {
253250
final URL[] urls = convertFilesToURLs(files);
254-
if (files.length >= 1) {
255-
//addFileAction.setSelectedFile(files[0]);
256-
}
257251
open(urls);
258252
} catch (RuntimeException e) {
259253
e.printStackTrace();
@@ -330,7 +324,6 @@ private JToolBar initToolBar() {
330324
toolBar.setFloatable(false);
331325
toolBar.add(openFileAction);
332326
toolBar.add(openURLAction);
333-
//toolBar.add(addFileAction);
334327
toolBar.add(exportAction);
335328
toolBar.add(refreshAction);
336329
watchToggle = new JToggleButton();
@@ -397,11 +390,6 @@ private JMenuBar initMenuBar() {
397390
recentURLsMenu.setIcon(createEmptyImageIcon(20, 20));
398391
fileMenu.add(recentURLsMenu);
399392

400-
/*
401-
menuItem = new JMenuItem(addFileAction);
402-
fileMenu.add(menuItem);
403-
*/
404-
405393
exportMenuItem = new JMenuItem(exportAction);
406394
fileMenu.add(exportMenuItem);
407395

src/main/java/com/tagtraum/perf/gcviewer/action/AddFile.java

-58
This file was deleted.

0 commit comments

Comments
 (0)