dead code & refactoring
This commit is contained in:
parent
7028909e36
commit
e978cdc4b2
|
@ -38,7 +38,8 @@ public class MainFrame {
|
||||||
/**
|
/**
|
||||||
* here we would close the log file
|
* here we would close the log file
|
||||||
*/
|
*/
|
||||||
super.onWindowClosed();
|
FileLog.MAIN.logLine("onWindowClosed");
|
||||||
|
FileLog.MAIN.close();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -11,9 +11,8 @@ import java.awt.event.WindowEvent;
|
||||||
* (c) Andrey Belomutskiy
|
* (c) Andrey Belomutskiy
|
||||||
*/
|
*/
|
||||||
public class FrameHelper {
|
public class FrameHelper {
|
||||||
protected final JFrame frame = new JFrame();
|
private final JFrame frame = new JFrame();
|
||||||
public static int defaultFontSize;
|
|
||||||
|
|
||||||
public JFrame getFrame() {
|
public JFrame getFrame() {
|
||||||
return frame;
|
return frame;
|
||||||
}
|
}
|
||||||
|
@ -44,12 +43,6 @@ public class FrameHelper {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
frame.add(component);
|
frame.add(component);
|
||||||
frame.addWindowListener(new WindowAdapter() {
|
|
||||||
@Override
|
|
||||||
public void windowOpened(WindowEvent e) {
|
|
||||||
defaultFontSize = frame.getFont().getSize();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void onWindowOpened() {
|
protected void onWindowOpened() {
|
||||||
|
@ -57,11 +50,5 @@ public class FrameHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void onWindowClosed() {
|
protected void onWindowClosed() {
|
||||||
FileLog.MAIN.logLine("onWindowClosed");
|
|
||||||
FileLog.MAIN.close();
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getDefaultFontSize() {
|
|
||||||
return defaultFontSize;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue