From 1d0bff367b887d510b89b73364d656247125771f Mon Sep 17 00:00:00 2001 From: kjvdheide Date: Wed, 11 Oct 2017 15:48:56 +0100 Subject: [PATCH] changed Mainframe from JFrame to JInternalFrame --- forester/.classpath | 2 +- forester/.settings/org.eclipse.jdt.core.prefs | 20 ++++++++++++++++++++ forester/.settings/org.eclipse.jdt.ui.prefs | 3 +-- .../src/org/forester/archaeopteryx/MainFrame.java | 3 ++- .../archaeopteryx/MainFrameApplication.java | 10 ++++++---- forester_applications/.classpath | 2 +- 6 files changed, 31 insertions(+), 9 deletions(-) diff --git a/forester/.classpath b/forester/.classpath index baf7e77..0749cc6 100644 --- a/forester/.classpath +++ b/forester/.classpath @@ -4,6 +4,6 @@ - + diff --git a/forester/.settings/org.eclipse.jdt.core.prefs b/forester/.settings/org.eclipse.jdt.core.prefs index e21b65f..4ce7a76 100644 --- a/forester/.settings/org.eclipse.jdt.core.prefs +++ b/forester/.settings/org.eclipse.jdt.core.prefs @@ -7,6 +7,7 @@ org.eclipse.jdt.core.codeComplete.localPrefixes= org.eclipse.jdt.core.codeComplete.localSuffixes= org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= +org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=true org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=82 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 @@ -20,8 +21,10 @@ org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=50 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=82 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=82 org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 @@ -31,6 +34,8 @@ org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 +org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 org.eclipse.jdt.core.formatter.blank_lines_after_package=1 @@ -57,6 +62,7 @@ org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=false org.eclipse.jdt.core.formatter.comment.format_block_comments=false org.eclipse.jdt.core.formatter.comment.format_header=true org.eclipse.jdt.core.formatter.comment.format_html=true @@ -89,6 +95,7 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert @@ -284,11 +291,24 @@ org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=0 +org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true org.eclipse.jdt.core.formatter.tabulation.char=space org.eclipse.jdt.core.formatter.tabulation.size=4 org.eclipse.jdt.core.formatter.use_on_off_tags=false org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true +org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter diff --git a/forester/.settings/org.eclipse.jdt.ui.prefs b/forester/.settings/org.eclipse.jdt.ui.prefs index c6da1f8..d803a24 100644 --- a/forester/.settings/org.eclipse.jdt.ui.prefs +++ b/forester/.settings/org.eclipse.jdt.ui.prefs @@ -59,9 +59,8 @@ cleanup_profile=_forester_java_profile cleanup_settings_version=2 eclipse.preferences.version=1 formatter_profile=_forester -formatter_settings_version=12 +formatter_settings_version=13 org.eclipse.jdt.ui.exception.name=e org.eclipse.jdt.ui.gettersetter.use.is=true org.eclipse.jdt.ui.keywordthis=false org.eclipse.jdt.ui.overrideannotation=true -org.eclipse.jdt.ui.text.custom_code_templates= diff --git a/forester/java/src/org/forester/archaeopteryx/MainFrame.java b/forester/java/src/org/forester/archaeopteryx/MainFrame.java index 6a2f4a1..7bd6765 100644 --- a/forester/java/src/org/forester/archaeopteryx/MainFrame.java +++ b/forester/java/src/org/forester/archaeopteryx/MainFrame.java @@ -43,6 +43,7 @@ import javax.swing.Box; import javax.swing.JCheckBoxMenuItem; import javax.swing.JFileChooser; import javax.swing.JFrame; +import javax.swing.JInternalFrame; import javax.swing.JLabel; import javax.swing.JMenu; import javax.swing.JMenuBar; @@ -81,7 +82,7 @@ import org.forester.util.ForesterConstants; import org.forester.util.ForesterUtil; import org.forester.util.WindowsUtils; -public abstract class MainFrame extends JFrame implements ActionListener { +public abstract class MainFrame extends JInternalFrame implements ActionListener { final static NHFilter nhfilter = new NHFilter(); final static NHXFilter nhxfilter = new NHXFilter(); diff --git a/forester/java/src/org/forester/archaeopteryx/MainFrameApplication.java b/forester/java/src/org/forester/archaeopteryx/MainFrameApplication.java index cb5b8de..51bb251 100644 --- a/forester/java/src/org/forester/archaeopteryx/MainFrameApplication.java +++ b/forester/java/src/org/forester/archaeopteryx/MainFrameApplication.java @@ -57,6 +57,8 @@ import javax.swing.UnsupportedLookAndFeelException; import javax.swing.WindowConstants; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; +import javax.swing.event.InternalFrameAdapter; +import javax.swing.event.InternalFrameEvent; import org.forester.analysis.TaxonomyDataManager; import org.forester.archaeopteryx.Options.CLADOGRAM_TYPE; @@ -161,10 +163,10 @@ public final class MainFrameApplication extends MainFrame { setSize( MainFrameApplication.FRAME_X_SIZE, MainFrameApplication.FRAME_Y_SIZE ); // The window listener setDefaultCloseOperation( WindowConstants.DO_NOTHING_ON_CLOSE ); - addWindowListener( new WindowAdapter() { + addInternalFrameListener( new InternalFrameAdapter() { @Override - public void windowClosing( final WindowEvent e ) { + public void internalFrameClosing (final InternalFrameEvent e ) { exit(); } } ); @@ -302,10 +304,10 @@ public final class MainFrameApplication extends MainFrame { // } ); // The window listener setDefaultCloseOperation( WindowConstants.DO_NOTHING_ON_CLOSE ); - addWindowListener( new WindowAdapter() { + addInternalFrameListener( new InternalFrameAdapter() { @Override - public void windowClosing( final WindowEvent e ) { + public void internalFrameClosing( final InternalFrameEvent e ) { if ( isUnsavedDataPresent() ) { final int r = JOptionPane.showConfirmDialog( null, "Exit despite potentially unsaved changes?", diff --git a/forester_applications/.classpath b/forester_applications/.classpath index 69d0b06..63157cf 100644 --- a/forester_applications/.classpath +++ b/forester_applications/.classpath @@ -2,6 +2,6 @@ - + -- 1.7.10.2