cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r411747 - in /incubator/cayenne/main/branches/PROTO-3.0/swing-plugin: ./ .settings/ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/cayenne/ src/main/java/org/apache/cayenne/swing/ src/mai...
Date Mon, 05 Jun 2006 11:24:06 GMT
Author: aadamchik
Date: Mon Jun  5 04:24:05 2006
New Revision: 411747

URL: http://svn.apache.org/viewvc?rev=411747&view=rev
Log:
A prototype Swing plugin shell.

Added:
    incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/.classpath
    incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/.project
    incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/.settings/
    incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/.settings/org.eclipse.jdt.core.prefs
    incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/.settings/org.eclipse.jdt.ui.prefs
    incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/pom.xml
    incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/
    incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/
    incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/
    incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/
    incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/
    incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/
    incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/
    incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/BoundsBinding.java
    incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/CayenneSwingException.java
    incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/plugin/
    incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/plugin/CayennePluginEngine.java
    incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/plugin/Launcher.java
    incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/plugin/frame/
    incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/plugin/frame/FrameBuilderExtension.java
    incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/plugin/frame/FrameController.java
    incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/plugin/frame/FramePlugin.java
    incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/plugin.xml
    incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/test/

Added: incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/.classpath
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/.classpath?rev=411747&view=auto
==============================================================================
--- incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/.classpath (added)
+++ incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/.classpath Mon Jun  5 04:24:05 2006
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/main/java"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

Added: incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/.project
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/.project?rev=411747&view=auto
==============================================================================
--- incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/.project (added)
+++ incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/.project Mon Jun  5 04:24:05 2006
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>swing-plugin</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.maven.ide.eclipse.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.maven.ide.eclipse.maven2Nature</nature>
+	</natures>
+</projectDescription>

Added: incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/.settings/org.eclipse.jdt.core.prefs?rev=411747&view=auto
==============================================================================
--- incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/.settings/org.eclipse.jdt.core.prefs (added)
+++ incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/.settings/org.eclipse.jdt.core.prefs Mon Jun  5 04:24:05 2006
@@ -0,0 +1,253 @@
+#Mon Jun 05 04:47:12 EDT 2006
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.source=1.4
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=48
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=48
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=48
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=48
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=48
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=48
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=48
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=48
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+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.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=1
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+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=true
+org.eclipse.jdt.core.formatter.comment.format_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=90
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+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=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=90
+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=1
+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_tabs_only_for_leading_indentations=false

Added: incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/.settings/org.eclipse.jdt.ui.prefs
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/.settings/org.eclipse.jdt.ui.prefs?rev=411747&view=auto
==============================================================================
--- incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/.settings/org.eclipse.jdt.ui.prefs (added)
+++ incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/.settings/org.eclipse.jdt.ui.prefs Mon Jun  5 04:24:05 2006
@@ -0,0 +1,8 @@
+#Mon Jun 05 04:47:12 EDT 2006
+eclipse.preferences.version=1
+formatter_settings_version=8
+internal.default.compliance=user
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment"></template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment"></template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment"></template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecom
 ment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author \n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"></template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment"></template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"></template><templ
 ate autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*\n *  Copyright 2006 The Apache Software Foundation\n *\n *  Licensed under the Apache License, Version 2.0 (the "License");\n *  you may not use this file except in compliance with the License.\n *  You may obtain a copy of the License at\n *\n *      http\://www.apache.org/licenses/LICENSE-2.0\n *\n *  Unless required by applicable law or agreed to in writing, software\n *  distributed under the License is distributed on an "AS IS" BASIS,\n *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *  See the License for the specific language governing permissions and\n *  limitations under the License.\n */\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="
 Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in c
 reated setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies
 " enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template></templates>

Added: incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/pom.xml?rev=411747&view=auto
==============================================================================
--- incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/pom.xml (added)
+++ incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/pom.xml Mon Jun  5 04:24:05 2006
@@ -0,0 +1,40 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.cayenne</groupId>
+  <artifactId>swing-plugin</artifactId>
+  <packaging>jar</packaging>
+  <version>3.0-SNAPSHOT</version>
+  <name>Maven Quick Start Archetype</name>
+  <url>http://maven.apache.org</url>
+	<dependencies>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>3.8.1</version>
+			<scope>test</scope>
+		</dependency>
+    
+		<!-- provided dependencies -->
+		<dependency>
+			<groupId>org.platonos</groupId>
+			<artifactId>plugin-engine</artifactId>
+			<version>1.1-SNAPSHOT</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.cayenne</groupId>
+			<artifactId>cayenne-modeler-launcher</artifactId>
+			<version>3.0-SNAPSHOT</version>
+			<scope>provided</scope>
+		</dependency>
+  </dependencies>
+  
+  <repositories>
+		<repository>
+			<id>objectstyle</id>
+			<name>ObjectStyle Public Maven2 repo</name>
+			<url>http://objectstyle.org/maven2</url>
+		</repository>
+	</repositories>
+</project>

Added: incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/BoundsBinding.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/BoundsBinding.java?rev=411747&view=auto
==============================================================================
--- incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/BoundsBinding.java (added)
+++ incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/BoundsBinding.java Mon Jun  5 04:24:05 2006
@@ -0,0 +1,83 @@
+/*
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.cayenne.swing;
+
+import java.awt.Component;
+import java.awt.Rectangle;
+import java.awt.event.ComponentAdapter;
+import java.awt.event.ComponentEvent;
+
+import org.objectstyle.cayenne.swing.BindingBase;
+import org.objectstyle.cayenne.swing.BindingException;
+
+/**
+ * A binding that ties a component to a Rectangle shape.
+ * 
+ * @author Andrus Adamchik
+ */
+public class BoundsBinding extends BindingBase {
+
+    protected Component component;
+
+    public BoundsBinding(Component component, String propertyExpression) {
+        super(propertyExpression);
+        this.component = component;
+
+        component.addComponentListener(new ComponentAdapter() {
+
+            public void componentMoved(ComponentEvent e) {
+                updateModel();
+            }
+
+            public void componentResized(ComponentEvent e) {
+                updateModel();
+            }
+        });
+    }
+
+    public Component getView() {
+        return component;
+    }
+
+    public void updateView() {
+        Object value = getValue();
+
+        if (value == null) {
+            return;
+        }
+
+        if (!(value instanceof Rectangle)) {
+            throw new BindingException("Expected a vlaue of class "
+                    + Rectangle.class.getName()
+                    + ", got: "
+                    + value.getClass().getName());
+        }
+
+        Rectangle r = (Rectangle) value;
+
+        modelUpdateDisabled = true;
+        try {
+            component.setBounds(r);
+        }
+        finally {
+            modelUpdateDisabled = false;
+        }
+    }
+
+    protected void updateModel() {
+        setValue(component.getBounds());
+    }
+}

Added: incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/CayenneSwingException.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/CayenneSwingException.java?rev=411747&view=auto
==============================================================================
--- incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/CayenneSwingException.java (added)
+++ incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/CayenneSwingException.java Mon Jun  5 04:24:05 2006
@@ -0,0 +1,20 @@
+package org.apache.cayenne.swing;
+
+
+public class CayenneSwingException extends RuntimeException {
+
+	public CayenneSwingException() {
+	}
+
+	public CayenneSwingException(String message) {
+		super(message);
+	}
+
+	public CayenneSwingException(Throwable cause) {
+		super(cause);
+	}
+
+	public CayenneSwingException(String message, Throwable cause) {
+		super(message, cause);
+	}
+}

Added: incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/plugin/CayennePluginEngine.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/plugin/CayennePluginEngine.java?rev=411747&view=auto
==============================================================================
--- incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/plugin/CayennePluginEngine.java (added)
+++ incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/plugin/CayennePluginEngine.java Mon Jun  5 04:24:05 2006
@@ -0,0 +1,93 @@
+package org.apache.cayenne.swing.plugin;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.platonos.pluginengine.PluginEngine;
+import org.platonos.pluginengine.PluginEngineException;
+import org.platonos.pluginengine.logging.ILogger;
+import org.platonos.pluginengine.logging.LoggerLevel;
+
+/**
+ * An extension of PluginEngine that allows to store arbitrary attributes in the
+ * engine and also load plugins from CLASSPATH.
+ * 
+ * @author andrus
+ */
+public class CayennePluginEngine extends PluginEngine {
+
+	public static final String PLUGIN_LOCATION = "plugin.xml";
+
+	protected Map attributes = new HashMap();
+
+	public CayennePluginEngine(String uid, ILogger logger) {
+		super(uid, logger);
+	}
+
+	public CayennePluginEngine(String uid) {
+		super(uid);
+	}
+
+	/**
+	 * Loads all plugin descriptors that are available to the current
+	 * ClassLoader.
+	 */
+	public void loadBundledPlugins() {
+		Enumeration urls;
+
+		try {
+			urls = Thread.currentThread().getContextClassLoader().getResources(
+					PLUGIN_LOCATION);
+
+		} catch (IOException e) {
+			throw new RuntimeException(
+					"Error reading plugins infor from ClassLoader", e);
+		}
+
+		while (urls.hasMoreElements()) {
+			URL pluginURL = (URL) urls.nextElement();
+			try {
+				// TODO, andrus, 6/5/2006 - plugins loaded in this fashion will
+				// only be able to resolve classes from the same filesystem
+				// folder as plugin.xml. Will need a specialized ClassLoader for
+				// this case.
+				loadPluginXML(pluginURL);
+			} catch (PluginEngineException ex) {
+				getLogger().log(LoggerLevel.SEVERE,
+						"Error loading Plugin archive from URL: " + pluginURL,
+						ex);
+			}
+		}
+	}
+
+	/**
+	 * Returns a previously stored attribute for a given key or null if no
+	 * attribute matches the key.
+	 */
+	public Object getAttribute(String key) {
+		if (key == null) {
+			throw new NullPointerException("Invalid argument: key");
+		}
+
+		return (String) attributes.get(key);
+	}
+
+	public void setAttribute(String key, Object value) {
+		if (key == null) {
+			throw new NullPointerException("Invalid argument: key");
+		}
+
+		attributes.put(key, value);
+	}
+
+	public void removeAttribute(String key) {
+		if (key == null) {
+			throw new NullPointerException("Invalid argument: key");
+		}
+
+		attributes.remove(key);
+	}
+}

Added: incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/plugin/Launcher.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/plugin/Launcher.java?rev=411747&view=auto
==============================================================================
--- incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/plugin/Launcher.java (added)
+++ incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/plugin/Launcher.java Mon Jun  5 04:24:05 2006
@@ -0,0 +1,63 @@
+package org.apache.cayenne.swing.plugin;
+
+import java.util.Iterator;
+import java.util.StringTokenizer;
+
+import org.platonos.pluginengine.Plugin;
+import org.platonos.pluginengine.logging.LoggerLevel;
+
+/**
+ * Starts a plugin shell for a Swing application.
+ */
+public class Launcher {
+
+	public static final String COMMAND_LINE_ATTRIBUTE = "command.line";
+
+	static final String ENGINE_NAME = "Cayenne Plugin Engine";
+
+	/**
+	 * A property specifying a location of the plugins directory. It can be a
+	 * comma separated list of directories. If not set, current directory is
+	 * used.
+	 */
+	public static final String PLUGINS_DIR_PROPERTY = "plugins.dirs";
+
+	public static void main(String[] args) {
+
+		CayennePluginEngine pluginEngine = new CayennePluginEngine(ENGINE_NAME);
+		pluginEngine.setAttribute(COMMAND_LINE_ATTRIBUTE, args);
+
+		// load plugins from ClassPath
+		pluginEngine.loadBundledPlugins();
+
+		// load plugins from extra directories
+		String pluginDirectories = System.getProperty(PLUGINS_DIR_PROPERTY);
+		if (pluginDirectories != null) {
+			StringTokenizer toks = new StringTokenizer(pluginDirectories, ",");
+			while (toks.hasMoreTokens()) {
+				pluginEngine.loadPlugins(toks.nextToken());
+			}
+		}
+
+		pluginEngine.start();
+
+		boolean hasStartedPlugins = false;
+		Iterator it = pluginEngine.getPlugins().iterator();
+		while (it.hasNext()) {
+			Plugin p = (Plugin) it.next();
+			if (p.isStarted()) {
+				hasStartedPlugins = true;
+				break;
+			}
+		}
+
+		// either no plugins configured, all all of them failed to start.
+		if (!hasStartedPlugins) {
+			pluginEngine.getLogger().log(LoggerLevel.INFO,
+					"No plugins started, exiting", null);
+			
+			// must explicitly kill all UI threads
+			System.exit(0);
+		}
+	}
+}

Added: incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/plugin/frame/FrameBuilderExtension.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/plugin/frame/FrameBuilderExtension.java?rev=411747&view=auto
==============================================================================
--- incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/plugin/frame/FrameBuilderExtension.java (added)
+++ incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/plugin/frame/FrameBuilderExtension.java Mon Jun  5 04:24:05 2006
@@ -0,0 +1,11 @@
+package org.apache.cayenne.swing.plugin.frame;
+
+
+public interface FrameBuilderExtension {
+
+    void initActions(FramePlugin plugin);
+
+    void initMenus(FramePlugin plugin);
+
+    void initFrame(FramePlugin plugin);
+}

Added: incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/plugin/frame/FrameController.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/plugin/frame/FrameController.java?rev=411747&view=auto
==============================================================================
--- incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/plugin/frame/FrameController.java (added)
+++ incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/plugin/frame/FrameController.java Mon Jun  5 04:24:05 2006
@@ -0,0 +1,168 @@
+/*
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.cayenne.swing.plugin.frame;
+
+import java.awt.Component;
+import java.awt.Rectangle;
+import java.awt.event.ActionEvent;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+import java.util.prefs.Preferences;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.JFrame;
+
+import org.apache.cayenne.swing.BoundsBinding;
+import org.objectstyle.cayenne.modeler.util.CayenneController;
+import org.objectstyle.cayenne.swing.ObjectBinding;
+
+public class FrameController extends CayenneController {
+
+    protected String name;
+    protected JFrame frame;
+    protected FramePlugin framePlugin;
+    protected ObjectBinding boundsBinding;
+    protected int newFrameOffset;
+
+    public FrameController(FramePlugin framePlugin) {
+        super((CayenneController) null);
+
+        this.framePlugin = framePlugin;
+        this.frame = new JFrame();
+        this.newFrameOffset = 30;
+    }
+
+    public Component getView() {
+        return frame;
+    }
+
+    public FramePlugin getFramePlugin() {
+        return framePlugin;
+    }
+
+    public JFrame getFrame() {
+        return frame;
+    }
+
+    /**
+     * Returns an action that calls 'shutdownAction' on this controller.
+     */
+    public Action getDefaultShutdownAction() {
+        return new AbstractAction() {
+
+            public void actionPerformed(ActionEvent e) {
+                shutdown();
+            }
+        };
+    }
+
+    public Action getShutdownAction() {
+        Action action = framePlugin.getActionMap().get(FramePlugin.QUIT_ACTION);
+        return action != null ? action : getDefaultShutdownAction();
+    }
+
+    /**
+     * Starts the application frame.
+     */
+    public void startup() {
+
+        if (name == null) {
+            name = framePlugin.getPlugin().getName();
+        }
+
+        if (frame.getTitle() == null || frame.getTitle().trim().length() == 0) {
+            frame.setTitle(name);
+        }
+
+        // make closeable frame
+        frame.addWindowListener(new WindowAdapter() {
+
+            public void windowClosing(WindowEvent e) {
+                getShutdownAction().actionPerformed(new ActionEvent(this, 1, null));
+            }
+        });
+
+        // setup preferred bounds offset...
+        if (newFrameOffset > 0) {
+            Preferences prefs = getPreferences();
+
+            int xOffset = (int) (Math.random() * newFrameOffset);
+            prefs.putInt("x", prefs.getInt("x", 0) + xOffset);
+
+            int yOffset = (int) (Math.random() * newFrameOffset);
+            prefs.putInt("y", prefs.getInt("y", 0) + yOffset);
+        }
+
+        boundsBinding = new BoundsBinding(frame, "bounds");
+        boundsBinding.setContext(this);
+        boundsBinding.updateView();
+        frame.setVisible(true);
+    }
+
+    /**
+     * Shuts down the application frame.
+     */
+    public void shutdown() {
+        if (this.frame != null) {
+            this.frame.dispose();
+        }
+
+        System.exit(0);
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Rectangle getBounds() {
+        Preferences prefs = getPreferences();
+
+        int x = prefs.getInt("x", 0);
+        int y = prefs.getInt("y", 0);
+        int w = prefs.getInt("w", 600);
+        int h = prefs.getInt("h", 400);
+
+        // TODO: andrus, 6/5/2006 - validate bounds
+
+        return new Rectangle(x, y, w, h);
+    }
+
+    public void setBounds(Rectangle bounds) {
+        Preferences prefs = getPreferences();
+
+        prefs.putInt("w", frame.getWidth());
+        prefs.putInt("h", frame.getHeight());
+        prefs.putInt("x", frame.getX());
+        prefs.putInt("y", frame.getY());
+    }
+
+    protected Preferences getPreferences() {
+        return Preferences.userNodeForPackage(getClass()).node(name);
+    }
+
+    public int getNewFrameOffset() {
+        return newFrameOffset;
+    }
+
+    public void setNewFrameOffset(int newFrameOffset) {
+        this.newFrameOffset = newFrameOffset;
+    }
+}

Added: incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/plugin/frame/FramePlugin.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/plugin/frame/FramePlugin.java?rev=411747&view=auto
==============================================================================
--- incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/plugin/frame/FramePlugin.java (added)
+++ incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/org/apache/cayenne/swing/plugin/frame/FramePlugin.java Mon Jun  5 04:24:05 2006
@@ -0,0 +1,95 @@
+package org.apache.cayenne.swing.plugin.frame;
+
+import java.util.Iterator;
+import java.util.List;
+
+import javax.swing.ActionMap;
+
+import org.platonos.pluginengine.Extension;
+import org.platonos.pluginengine.PluginLifecycle;
+
+/**
+ * A plugin that starts an empty closeable frame intended for customization by extension.
+ * 
+ * @author Andrus Adamchik
+ */
+public class FramePlugin extends PluginLifecycle {
+
+    public static final String QUIT_ACTION = "frame.action.quit";
+
+    public static final String FRAME_BUILDERS_EXT = "frameBuilders";
+
+    protected FrameController frameController;
+    protected ActionMap actionMap;
+
+    protected void start() {
+
+        frameController = new FrameController(this);
+        actionMap = new ActionMap();
+
+        List extensions = getExtensionPoint(FRAME_BUILDERS_EXT).getExtensions();
+
+        initActions(extensions);
+        initMenus(extensions);
+        initFrame(extensions);
+
+        frameController.startup();
+    }
+
+    protected void initActions(List extensions) {
+
+        Iterator it = extensions.iterator();
+        while (it.hasNext()) {
+            Extension extension = (Extension) it.next();
+            FrameBuilderExtension ext = (FrameBuilderExtension) extension
+                    .getExtensionInstance();
+
+            ext.initActions(this);
+        }
+
+        // add default close action
+        if (actionMap.get(QUIT_ACTION) == null) {
+            actionMap.put(QUIT_ACTION, frameController.getDefaultShutdownAction());
+        }
+    }
+
+    protected void initMenus(List extensions) {
+
+        Iterator it = extensions.iterator();
+        while (it.hasNext()) {
+            Extension extension = (Extension) it.next();
+            FrameBuilderExtension ext = (FrameBuilderExtension) extension
+                    .getExtensionInstance();
+
+            ext.initMenus(this);
+        }
+    }
+
+    protected void initFrame(List extensions) {
+
+        Iterator it = extensions.iterator();
+        while (it.hasNext()) {
+            Extension extension = (Extension) it.next();
+            FrameBuilderExtension ext = (FrameBuilderExtension) extension
+                    .getExtensionInstance();
+
+            ext.initFrame(this);
+        }
+    }
+
+    public ActionMap getActionMap() {
+        return actionMap;
+    }
+
+    public void setActionMap(ActionMap actionMap) {
+        this.actionMap = actionMap;
+    }
+
+    public FrameController getFrameController() {
+        return frameController;
+    }
+
+    public void setFrameController(FrameController frameController) {
+        this.frameController = frameController;
+    }
+}

Added: incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/plugin.xml
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/plugin.xml?rev=411747&view=auto
==============================================================================
--- incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/plugin.xml (added)
+++ incubator/cayenne/main/branches/PROTO-3.0/swing-plugin/src/main/java/plugin.xml Mon Jun  5 04:24:05 2006
@@ -0,0 +1,8 @@
+<plugin start="true">
+   <uid>org.apache.cayenne:swing-frame-plugin</uid>
+   <name>Generic Application Frame</name>
+   <lifecycleclass>org.apache.cayenne.swing.plugin.frame.FramePlugin</lifecycleclass>
+   <extensionpoints>
+		<extensionpoint name="frameBuilders" interface="org.apache.cayenne.swing.plugin.frame.FrameBuilderExtension"/>
+   </extensionpoints>
+</plugin>
\ No newline at end of file



Mime
View raw message