Nieuwe reorganisaties en onder andere Gui gebruikersvriendelijker gemaakt. Meeste dingen zouden moeten werken, maar toch nog testen!
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="Mimis/native"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="Mimis"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="resource"/>
|
||||
<classpathentry kind="lib" path="lib/commons-logging-1.1.1.jar"/>
|
||||
<classpathentry kind="lib" path="lib/log4j-1.2.16.jar"/>
|
||||
<classpathentry kind="lib" path="lib/jacob-1.15-M3.jar"/>
|
||||
<classpathentry kind="lib" path="lib/jxinput.jar"/>
|
||||
<classpathentry kind="lib" path="cfg"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
@@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>Mimis</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -1,280 +0,0 @@
|
||||
#Wed Feb 02 12:09:06 CET 2011
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
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=error
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
||||
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
|
||||
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=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
|
||||
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_parameters_in_constructor_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
|
||||
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=0
|
||||
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_import_groups=1
|
||||
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_in_block_comment=false
|
||||
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
|
||||
org.eclipse.jdt.core.formatter.comment.format_block_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_javadoc_comments=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_line_comments=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=insert
|
||||
org.eclipse.jdt.core.formatter.comment.line_length=80
|
||||
org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
|
||||
org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
|
||||
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.disabling_tag=@formatter\:off
|
||||
org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
|
||||
org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
|
||||
org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
|
||||
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_empty_lines=false
|
||||
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_on_local_variable=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not 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=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not 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_annotation_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=do not 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=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=do not 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_parenthesized_expression_in_return=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=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.join_lines_in_comments=true
|
||||
org.eclipse.jdt.core.formatter.join_wrapped_lines=true
|
||||
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=true
|
||||
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
|
||||
org.eclipse.jdt.core.formatter.lineSplit=80
|
||||
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=1
|
||||
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
|
||||
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_binary_operator=true
|
||||
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
|
||||
@@ -1,4 +0,0 @@
|
||||
#Wed Feb 02 12:09:06 CET 2011
|
||||
eclipse.preferences.version=1
|
||||
formatter_profile=_Rik
|
||||
formatter_settings_version=11
|
||||
@@ -1,4 +1,4 @@
|
||||
log4j.rootLogger=DEBUG, CA
|
||||
log4j.rootLogger=TRACE, CA
|
||||
log4j.appender.CA=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.CA.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.CA.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
|
||||
BIN
java/mimis.exe
BIN
java/mimis.exe
Binary file not shown.
@@ -1,6 +1,7 @@
|
||||
package com.dt.iTunesController;
|
||||
|
||||
import com.jacob.activeX.ActiveXComponent;
|
||||
import com.jacob.com.ComThread;
|
||||
import com.jacob.com.Dispatch;
|
||||
import com.jacob.com.DispatchEvents;
|
||||
|
||||
@@ -531,4 +532,8 @@ public class iTunes {
|
||||
public void playlistAddCurrentTrack(String name) {
|
||||
playlistAddTrack(name, getCurrentTrack());
|
||||
}
|
||||
|
||||
public void release() {
|
||||
ComThread.Release();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,4 @@ package mimis;
|
||||
|
||||
import mimis.input.Input;
|
||||
|
||||
public interface Button extends Input {
|
||||
//public String getCode();
|
||||
}
|
||||
public interface Button extends Input {}
|
||||
|
||||
@@ -1,23 +1,24 @@
|
||||
package mimis;
|
||||
|
||||
import mimis.exception.worker.ActivateException;
|
||||
import mimis.util.swing.Dialog;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
public class Client {
|
||||
protected Log log = LogFactory.getLog(getClass());
|
||||
|
||||
public class Client extends Main {
|
||||
public static final String IP = "127.0.0.1";
|
||||
public static final int PORT = 6789;
|
||||
|
||||
public Client(String ip, int port) {
|
||||
super();
|
||||
//eventRouter = new GlobalRouter(ip, port);
|
||||
}
|
||||
|
||||
public void activate() throws ActivateException {
|
||||
super.activate();
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String ip = Dialog.question("Server IP:", IP);
|
||||
int port = Integer.valueOf(Dialog.question("Server Port:", PORT));
|
||||
//new Client(ip, port).start();
|
||||
new Client(ip, port).start();
|
||||
}
|
||||
}
|
||||
@@ -5,10 +5,7 @@ import java.awt.TextArea;
|
||||
import java.awt.event.WindowEvent;
|
||||
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JToggleButton;
|
||||
import javax.swing.SwingConstants;
|
||||
import javax.swing.WindowConstants;
|
||||
|
||||
import mimis.exception.worker.ActivateException;
|
||||
@@ -41,7 +38,7 @@ public class Gui extends Component {
|
||||
createFrame(buttonManagerArray);
|
||||
}
|
||||
|
||||
public void activate() throws ActivateException {
|
||||
protected void activate() throws ActivateException {
|
||||
listen(Feedback.class);
|
||||
super.activate();
|
||||
}
|
||||
@@ -67,12 +64,7 @@ public class Gui extends Component {
|
||||
JPanel controlPanel = new JPanel(new GridLayout(1, 0));
|
||||
for (ButtonManager buttonManager : buttonManagerArray) {
|
||||
if (buttonManager.count() > 0) {
|
||||
JPanel panel = new JPanel(new GridLayout(0, 1));
|
||||
panel.add(new JLabel(buttonManager.getTitle(), SwingConstants.CENTER));
|
||||
for (JToggleButton button : buttonManager.getButtons()) {
|
||||
panel.add(button);
|
||||
}
|
||||
controlPanel.add(panel);
|
||||
controlPanel.add(buttonManager.createPanel());
|
||||
}
|
||||
}
|
||||
return controlPanel;
|
||||
|
||||
@@ -1,56 +1,70 @@
|
||||
package mimis;
|
||||
|
||||
import mimis.application.TestApplication;
|
||||
import javax.swing.UIManager;
|
||||
|
||||
import mimis.application.cmd.windows.gomplayer.GomPlayerApplication;
|
||||
import mimis.application.cmd.windows.photoviewer.PhotoViewerApplication;
|
||||
import mimis.application.cmd.windows.winamp.WinampApplication;
|
||||
import mimis.application.cmd.windows.wmp.WMPApplication;
|
||||
import mimis.application.itunes.iTunesApplication;
|
||||
import mimis.application.lirc.ipod.iPodApplication;
|
||||
import mimis.application.mpc.MPCApplication;
|
||||
import mimis.application.vlc.VLCApplication;
|
||||
import mimis.device.javainput.extreme3d.Extreme3DDevice;
|
||||
import mimis.device.javainput.rumblepad.RumblepadDevice;
|
||||
import mimis.device.jintellitype.JIntellitypeDevice;
|
||||
import mimis.device.lirc.LircDevice;
|
||||
import mimis.device.network.NetworkDevice;
|
||||
import mimis.device.panel.PanelDevice;
|
||||
import mimis.device.wiimote.WiimoteDevice;
|
||||
import mimis.exception.worker.ActivateException;
|
||||
import mimis.exception.worker.DeactivateException;
|
||||
import mimis.input.Feedback;
|
||||
import mimis.input.Task;
|
||||
import mimis.manager.ButtonManager;
|
||||
import mimis.manager.Manager;
|
||||
import mimis.parser.Parser;
|
||||
import mimis.router.Router;
|
||||
import mimis.util.ArrayCycle;
|
||||
import mimis.manager.CurrentButtonManager;
|
||||
import mimis.value.Action;
|
||||
import mimis.value.Target;
|
||||
import mimis.worker.Component;
|
||||
|
||||
public class Main extends Component {
|
||||
protected TestApplication app;
|
||||
protected Manager manager;
|
||||
protected ButtonManager applicationManager, deviceManager;
|
||||
public class Main extends Mimis {
|
||||
protected CurrentButtonManager applicationManager;
|
||||
protected ButtonManager deviceManager;
|
||||
protected Gui gui;
|
||||
protected ArrayCycle<Component> componentCycle;
|
||||
|
||||
static {
|
||||
try {
|
||||
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
|
||||
} catch (Exception e) {}
|
||||
|
||||
}
|
||||
|
||||
public Main() {
|
||||
this.router = new Router();
|
||||
super(
|
||||
new WinampApplication(), new GomPlayerApplication(), new WMPApplication(), new MPCApplication(), // WindowsApplication
|
||||
new VLCApplication(), // CMDApplication
|
||||
new iPodApplication(), // LircApplication
|
||||
new PhotoViewerApplication(), // RobotApplication
|
||||
new iTunesApplication()); // Component
|
||||
|
||||
/* Create gui from application and device managers */
|
||||
applicationManager = new CurrentButtonManager(router, componentCycle, "Applications", currentArray);
|
||||
deviceManager = new ButtonManager("Devices", initialize(false,
|
||||
new Extreme3DDevice(), new RumblepadDevice(), // JavaInputDevice
|
||||
new JIntellitypeDevice(), new PanelDevice(), new LircDevice(), new WiimoteDevice(), new NetworkDevice())); // Component
|
||||
gui = new Gui(this, applicationManager, deviceManager);
|
||||
manager.add(initialize(false, gui));
|
||||
}
|
||||
|
||||
public void activate() throws ActivateException {
|
||||
/* Create gui from application and device managers */
|
||||
Component[] applicationArray = initialize(false, app = new TestApplication(), new iTunesApplication());
|
||||
applicationManager = new ButtonManager("Applications", applicationArray);
|
||||
deviceManager = new ButtonManager("Devices", initialize(false, new PanelDevice(), new LircDevice()));
|
||||
gui = new Gui(this, applicationManager, deviceManager);
|
||||
|
||||
/* Create general manager */
|
||||
manager = new Manager(initialize(true, router, new Parser(), gui));
|
||||
super.activate();
|
||||
listen(Task.class);
|
||||
|
||||
/* Start managers */
|
||||
applicationManager.start();
|
||||
deviceManager.start();
|
||||
manager.start();
|
||||
|
||||
/* Initialize component cycle */
|
||||
componentCycle = new ArrayCycle<Component>(applicationArray);
|
||||
|
||||
listen(Task.class);
|
||||
super.activate();
|
||||
|
||||
app.start();
|
||||
app.test();
|
||||
/* Force display of currenct component when gui started */
|
||||
gui.start();
|
||||
while (!gui.active());
|
||||
end(Action.CURRENT);
|
||||
}
|
||||
|
||||
protected void deactivate() throws DeactivateException {
|
||||
@@ -59,7 +73,6 @@ public class Main extends Component {
|
||||
log.debug("Stop managers");
|
||||
applicationManager.stop();
|
||||
deviceManager.stop();
|
||||
manager.stop();
|
||||
}
|
||||
|
||||
public void exit() {
|
||||
@@ -68,39 +81,15 @@ public class Main extends Component {
|
||||
log.debug("Exit managers");
|
||||
applicationManager.exit();
|
||||
deviceManager.exit();
|
||||
manager.exit();
|
||||
}
|
||||
|
||||
public Component[] initialize(boolean start, Component... componentArray) {
|
||||
for (Component component : componentArray) {
|
||||
component.setRouter(router);
|
||||
if (start) {
|
||||
component.start();
|
||||
}
|
||||
}
|
||||
return componentArray;
|
||||
}
|
||||
|
||||
public void task(Task task) {
|
||||
if (task.getTarget().equals(Target.CURRENT)) {
|
||||
componentCycle.current().add(task);
|
||||
} else {
|
||||
super.task(task);
|
||||
}
|
||||
}
|
||||
|
||||
public void end(Action action) {
|
||||
super.end(action);
|
||||
switch (action) {
|
||||
case CURRENT:
|
||||
case NEXT:
|
||||
log.debug("Next component");
|
||||
route(new Feedback("Next component: " + componentCycle.next().getTitle()));
|
||||
break;
|
||||
case PREVIOUS:
|
||||
log.debug("Previous component");
|
||||
route(new Feedback("Previous component: " + componentCycle.previous().getTitle()));
|
||||
break;
|
||||
case EXIT:
|
||||
exit();
|
||||
applicationManager.currentChanged();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
79
java/src/mimis/Mimis.java
Normal file
79
java/src/mimis/Mimis.java
Normal file
@@ -0,0 +1,79 @@
|
||||
package mimis;
|
||||
|
||||
import mimis.exception.worker.ActivateException;
|
||||
import mimis.exception.worker.DeactivateException;
|
||||
import mimis.input.Feedback;
|
||||
import mimis.input.Task;
|
||||
import mimis.manager.Manager;
|
||||
import mimis.parser.Parser;
|
||||
import mimis.router.Router;
|
||||
import mimis.util.ArrayCycle;
|
||||
import mimis.value.Action;
|
||||
import mimis.value.Target;
|
||||
import mimis.worker.Component;
|
||||
|
||||
public abstract class Mimis extends Component {
|
||||
protected Component[] currentArray;
|
||||
protected Manager manager;
|
||||
|
||||
protected ArrayCycle<Component> componentCycle;
|
||||
|
||||
public Mimis(Component... currentArray) {
|
||||
this.currentArray = initialize(false, currentArray);
|
||||
componentCycle = new ArrayCycle<Component>(currentArray);
|
||||
router = new Router();
|
||||
manager = new Manager(initialize(true, router, new Parser()));
|
||||
}
|
||||
|
||||
public void activate() throws ActivateException {
|
||||
manager.start();
|
||||
super.activate();
|
||||
}
|
||||
|
||||
protected void deactivate() throws DeactivateException {
|
||||
super.deactivate();
|
||||
manager.stop();
|
||||
}
|
||||
|
||||
public void exit() {
|
||||
super.exit();
|
||||
manager.exit();
|
||||
}
|
||||
|
||||
public Component[] initialize(boolean start, Component... componentArray) {
|
||||
for (Component component : componentArray) {
|
||||
component.setRouter(router);
|
||||
if (start) {
|
||||
component.start();
|
||||
}
|
||||
}
|
||||
return componentArray;
|
||||
}
|
||||
|
||||
public void task(Task task) {
|
||||
if (task.getTarget().equals(Target.CURRENT)) {
|
||||
componentCycle.current().add(task);
|
||||
} else {
|
||||
super.task(task);
|
||||
}
|
||||
}
|
||||
|
||||
public void end(Action action) {
|
||||
switch (action) {
|
||||
case CURRENT:
|
||||
route(new Feedback("Current component: " + componentCycle.current().getTitle()));
|
||||
break;
|
||||
case NEXT:
|
||||
log.debug("Next component");
|
||||
route(new Feedback("Next component: " + componentCycle.next().getTitle()));
|
||||
break;
|
||||
case PREVIOUS:
|
||||
log.debug("Previous component");
|
||||
route(new Feedback("Previous component: " + componentCycle.previous().getTitle()));
|
||||
break;
|
||||
case EXIT:
|
||||
exit();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
package mimis.application;
|
||||
|
||||
import mimis.device.lirc.button.ColorButton;
|
||||
import mimis.device.wiimote.WiimoteButton;
|
||||
import mimis.exception.worker.ActivateException;
|
||||
import mimis.input.Input;
|
||||
import mimis.input.Task;
|
||||
import mimis.input.state.Hold;
|
||||
import mimis.input.state.Press;
|
||||
import mimis.input.state.Release;
|
||||
import mimis.input.state.sequence.Sequence;
|
||||
import mimis.parser.ParserInput;
|
||||
import mimis.state.TaskMap;
|
||||
import mimis.value.Action;
|
||||
import mimis.value.Target;
|
||||
import mimis.worker.Component;
|
||||
|
||||
public class TestApplication extends Component {
|
||||
public TestApplication() {
|
||||
super("Test App");
|
||||
}
|
||||
|
||||
public void activate() throws ActivateException {
|
||||
TaskMap taskMap = new TaskMap();
|
||||
taskMap.add(new Sequence(
|
||||
new Hold(ColorButton.BLUE), new Press(WiimoteButton.A), new Release(ColorButton.BLUE)),
|
||||
new Task(Action.TEST, Target.CURRENT));
|
||||
route(new ParserInput(Action.ADD, taskMap));
|
||||
|
||||
listen(Task.class);
|
||||
|
||||
super.activate();
|
||||
}
|
||||
|
||||
public void test() {
|
||||
while (!active());
|
||||
|
||||
route(new Press(ColorButton.BLUE));
|
||||
/*sleep(1000);
|
||||
route(new ParserInput(Action.RESET, this, false));*/
|
||||
sleep(1000);
|
||||
route(new Press(WiimoteButton.A));
|
||||
}
|
||||
|
||||
public void input(Input input) {
|
||||
if (input instanceof Task) {
|
||||
Task task = (Task) input;
|
||||
log.debug(task.getAction() + " " + task.getSignal() + " " + task.getTarget());
|
||||
} else {
|
||||
log.debug(input.getClass());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,7 @@ public abstract class CMDApplication extends Component {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public void activate() throws ActivateException {
|
||||
protected void activate() throws ActivateException {
|
||||
super.activate();
|
||||
String path = getPath();
|
||||
if (path == null) {
|
||||
@@ -40,12 +40,16 @@ public abstract class CMDApplication extends Component {
|
||||
}
|
||||
|
||||
public boolean active() {
|
||||
return active = Native.isRunning(program);
|
||||
boolean running = Native.isRunning(program);
|
||||
if (!active && running) {
|
||||
active = true;
|
||||
start();
|
||||
}
|
||||
return active = running;
|
||||
}
|
||||
|
||||
protected synchronized void deactivate() throws DeactivateException {
|
||||
super.deactivate();
|
||||
log.debug(process);
|
||||
if (process != null) {
|
||||
process.destroy();
|
||||
}
|
||||
|
||||
@@ -16,14 +16,20 @@ public abstract class WindowsApplication extends CMDApplication {
|
||||
protected String window;
|
||||
protected int handle;
|
||||
|
||||
public WindowsApplication(String title, String window) {
|
||||
this(null, title, window);
|
||||
}
|
||||
|
||||
public WindowsApplication(String program, String title, String window) {
|
||||
super(program, title);
|
||||
this.window = window;
|
||||
handle = 0;
|
||||
}
|
||||
|
||||
public void activate() throws ActivateException {
|
||||
protected void activate() throws ActivateException {
|
||||
if (program != null) {
|
||||
super.activate();
|
||||
}
|
||||
handle = Native.getHandle(window);
|
||||
if (handle < 1) {
|
||||
sleep(START_SLEEP);
|
||||
@@ -36,15 +42,21 @@ public abstract class WindowsApplication extends CMDApplication {
|
||||
}
|
||||
|
||||
public boolean active() {
|
||||
if (!active) {
|
||||
if (!active || program == null) {
|
||||
handle = Native.getHandle(window);
|
||||
system(Command.System.MAXIMIZE);
|
||||
if (handle > 0 && program == null) {
|
||||
start();
|
||||
}
|
||||
return super.active();
|
||||
}
|
||||
return program == null ? handle > 0 : super.active();
|
||||
}
|
||||
|
||||
protected void deactivate() throws DeactivateException {
|
||||
if (process == null) {
|
||||
active = false;
|
||||
} else {
|
||||
super.deactivate();
|
||||
}
|
||||
close();
|
||||
}
|
||||
|
||||
@@ -62,7 +74,6 @@ public abstract class WindowsApplication extends CMDApplication {
|
||||
|
||||
protected int user(int wParam, int lParam) {
|
||||
return Native.sendMessage(handle, Windows.WM_USER, wParam, lParam);
|
||||
//return Windows.sendMessage(handle, Windows.WM_USER + wParam, 0, 0);
|
||||
}
|
||||
|
||||
protected void system(Command.System system) {
|
||||
@@ -75,7 +86,8 @@ public abstract class WindowsApplication extends CMDApplication {
|
||||
|
||||
protected void key(Type type, int code) {
|
||||
int scanCode = Native.mapVirtualKey(code, Windows.MAPVK_VK_TO_VSC);
|
||||
Native.postMessage(handle, type.getCode(), code, 1 | (scanCode << 16));
|
||||
Native.postMessage(handle, type.getCode(), code, 1 | (scanCode << 16) | 1 << 30);
|
||||
sleep(200);
|
||||
}
|
||||
|
||||
protected void key(Type type, char character) {
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
package mimis.application;
|
||||
package mimis.application.cmd.windows.photoviewer;
|
||||
|
||||
import mimis.application.robot.RobotApplication;
|
||||
import mimis.application.cmd.windows.WindowsApplication;
|
||||
import mimis.exception.worker.DeactivateException;
|
||||
import mimis.value.Action;
|
||||
import mimis.value.Key;
|
||||
import mimis.value.Type;
|
||||
import mimis.worker.Worker;
|
||||
|
||||
public class PhotoViewerApplication extends RobotApplication {
|
||||
public class PhotoViewerApplication extends WindowsApplication {
|
||||
protected final static String TITLE = "Photo Viewer";
|
||||
protected final static String WINDOW = "Photo_Lightweight_Viewer";
|
||||
|
||||
protected static final int ZOOM_SLEEP = 100;
|
||||
protected static final int DELETE_SLEEP = 2000;
|
||||
@@ -16,7 +18,7 @@ public class PhotoViewerApplication extends RobotApplication {
|
||||
protected boolean fullscreen;
|
||||
|
||||
public PhotoViewerApplication() {
|
||||
super(TITLE);
|
||||
super(TITLE, WINDOW);
|
||||
zoomWorker = new ZoomWorker();
|
||||
fullscreen = false;
|
||||
}
|
||||
@@ -49,38 +51,44 @@ public class PhotoViewerApplication extends RobotApplication {
|
||||
case VOLUME_DOWN:
|
||||
zoomWorker.stop();
|
||||
break;
|
||||
case FORWARD:
|
||||
break;
|
||||
case REWIND:
|
||||
break;
|
||||
case NEXT:
|
||||
press(Key.RIGHT);
|
||||
key(Type.DOWN, Key.RIGHT);
|
||||
break;
|
||||
case PREVIOUS:
|
||||
press(Key.LEFT);
|
||||
key(Type.DOWN, Key.LEFT);
|
||||
break;
|
||||
case FORWARD:
|
||||
key(Type.DOWN, Key.CONTROL);
|
||||
//key(Type.DOWN, '.');
|
||||
//key(Type.DOWN, Key.DECIMAL);
|
||||
key(Type.DOWN, Key.OEM_PERIOD);
|
||||
//key(Type.UP, Key.OEM_PERIOD);
|
||||
//key(Type.UP, Key.CONTROL);
|
||||
break;
|
||||
case MUTE:
|
||||
press(Key.CONTROL);
|
||||
press(Key.NUMPAD0);
|
||||
release(Key.CONTROL);
|
||||
key(Type.DOWN, Key.CONTROL);
|
||||
key(Type.DOWN, Key.NUMPAD0);
|
||||
//press(Key.CONTROL);
|
||||
//press(Key.NUMPAD0);
|
||||
//release(Key.CONTROL);
|
||||
break;
|
||||
case FULLSCREEN:
|
||||
press(fullscreen ? Key.ESCAPE : Key.F11);
|
||||
key(Type.DOWN, fullscreen ? Key.ESCAPE : Key.F11);
|
||||
fullscreen = !fullscreen;
|
||||
break;
|
||||
case DISLIKE:
|
||||
boolean restore = false;
|
||||
/*boolean restore = false;
|
||||
if (fullscreen) {
|
||||
end(Action.FULLSCREEN);
|
||||
sleep(DELETE_SLEEP);
|
||||
restore = true;
|
||||
}
|
||||
press(Key.F16);
|
||||
press('Y');
|
||||
key(Type.DOWN, Key.F16);
|
||||
key(Type.DOWN, 'Y');
|
||||
if (restore) {
|
||||
sleep(DELETE_SLEEP);
|
||||
end(Action.FULLSCREEN);
|
||||
}
|
||||
}*/
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -95,7 +103,7 @@ public class PhotoViewerApplication extends RobotApplication {
|
||||
|
||||
public void work() {
|
||||
Key key = zoomDirection > 0 ? Key.ADD : Key.SUBTRACT;
|
||||
press(key);
|
||||
key(Type.DOWN, key);
|
||||
sleep(ZOOM_SLEEP);
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package mimis.application.cmd.windows.winamp;
|
||||
import mimis.application.cmd.windows.WindowsApplication;
|
||||
import mimis.exception.worker.DeactivateException;
|
||||
import mimis.value.Action;
|
||||
import mimis.value.Command;
|
||||
import mimis.worker.Worker;
|
||||
|
||||
public class WinampApplication extends WindowsApplication {
|
||||
@@ -48,7 +49,7 @@ public class WinampApplication extends WindowsApplication {
|
||||
seekWorker = new SeekWorker();
|
||||
}
|
||||
|
||||
protected void deactivate() throws DeactivateException {
|
||||
public void deactivate() throws DeactivateException {
|
||||
super.deactivate();
|
||||
volumeWorker.stop();
|
||||
seekWorker.stop();
|
||||
@@ -82,6 +83,7 @@ public class WinampApplication extends WindowsApplication {
|
||||
log.trace("WinampApplication end: " + action);
|
||||
switch (action) {
|
||||
case PLAY:
|
||||
log.debug("play");
|
||||
switch (user(0, IPC_ISPLAYING)) {
|
||||
case STATUS_STOPPED:
|
||||
command(WINAMP_BUTTON2);
|
||||
@@ -127,6 +129,7 @@ public class WinampApplication extends WindowsApplication {
|
||||
command(WINAMP_FILE_QUIT);
|
||||
break;
|
||||
case VISUALISER:
|
||||
system(Command.System.MAXIMIZE);
|
||||
command(WINAMP_VISPLUGIN);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package mimis.application.itunes;
|
||||
|
||||
import mimis.exception.worker.ActivateException;
|
||||
import mimis.exception.worker.DeactivateException;
|
||||
import mimis.util.Native;
|
||||
import mimis.value.Action;
|
||||
import mimis.worker.Component;
|
||||
import mimis.worker.Worker;
|
||||
@@ -14,8 +13,7 @@ import com.dt.iTunesController.iTunesEventsInterface;
|
||||
|
||||
public class iTunesApplication extends Component implements iTunesEventsInterface {
|
||||
protected static final String TITLE = "iTunes";
|
||||
protected static final String PROGRAM = "iTunes.exe";
|
||||
protected static final boolean QUIT = false;
|
||||
protected static final boolean EVENTS = false;
|
||||
|
||||
protected static final int VOLUME_CHANGE_RATE = 5;
|
||||
protected static final int VOLUME_SLEEP = 100;
|
||||
@@ -24,35 +22,29 @@ public class iTunesApplication extends Component implements iTunesEventsInterfac
|
||||
|
||||
protected iTunes iTunes;
|
||||
protected VolumeWorker volumeWorker;
|
||||
protected boolean handle;
|
||||
protected boolean quiting;
|
||||
protected boolean events, handle;
|
||||
|
||||
public iTunesApplication() {
|
||||
super(TITLE);
|
||||
iTunes = new iTunes();
|
||||
volumeWorker = new VolumeWorker();
|
||||
handle = quiting = false;
|
||||
this(EVENTS);
|
||||
}
|
||||
|
||||
protected void activate() throws ActivateException {
|
||||
synchronized (iTunes) {
|
||||
iTunes.connect();
|
||||
if (!handle) {
|
||||
iTunes.addEventHandler(this);
|
||||
handle = true;
|
||||
public iTunesApplication(boolean events) {
|
||||
super(TITLE);
|
||||
this.events = events;
|
||||
volumeWorker = new VolumeWorker();
|
||||
handle = false;
|
||||
}
|
||||
|
||||
protected synchronized void activate() throws ActivateException {
|
||||
iTunes = new iTunes();
|
||||
iTunes.connect();
|
||||
if (events) {
|
||||
iTunes.addEventHandler(this);
|
||||
}
|
||||
super.activate();
|
||||
}
|
||||
|
||||
public boolean active() {
|
||||
if (!active && !quiting && Native.isRunning(PROGRAM)) {
|
||||
try {
|
||||
activate();
|
||||
} catch (ActivateException e) {
|
||||
log.error(e);
|
||||
}
|
||||
}
|
||||
public synchronized boolean active() {
|
||||
try {
|
||||
iTunes.getMute();
|
||||
active = true;
|
||||
@@ -62,21 +54,28 @@ public class iTunesApplication extends Component implements iTunesEventsInterfac
|
||||
return active;
|
||||
}
|
||||
|
||||
protected void deactivate() throws DeactivateException {
|
||||
protected synchronized void deactivate() throws DeactivateException {
|
||||
if (events) {
|
||||
exit();
|
||||
} else {
|
||||
super.deactivate();
|
||||
volumeWorker.stop();
|
||||
try {
|
||||
if (QUIT) {
|
||||
quiting = true;
|
||||
synchronized (iTunes) {
|
||||
iTunes.quit();
|
||||
}
|
||||
quiting = false;
|
||||
}
|
||||
iTunes.release();
|
||||
} catch (Exception e) {
|
||||
log.error(e);
|
||||
throw new DeactivateException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void exit() {
|
||||
try {
|
||||
iTunes.quit();
|
||||
} catch (Exception e) {}
|
||||
volumeWorker.exit();
|
||||
super.exit();
|
||||
}
|
||||
|
||||
protected void begin(Action action) {
|
||||
log.trace("iTunesApplication begin: " + action);
|
||||
|
||||
@@ -10,10 +10,6 @@ import mimis.worker.Component;
|
||||
public class RobotApplication extends Component {
|
||||
protected Robot robot;
|
||||
|
||||
public RobotApplication(String title) {
|
||||
super(title);
|
||||
}
|
||||
|
||||
public void activate() throws ActivateException {
|
||||
try {
|
||||
robot = new Robot();
|
||||
|
||||
@@ -75,6 +75,10 @@ public class LircDevice extends Component implements LircButtonListener, SignalL
|
||||
}
|
||||
|
||||
public void add(Signal signal, Button button) {
|
||||
add(signal, button, true);
|
||||
}
|
||||
|
||||
public void add(Signal signal, Button button, boolean general) {
|
||||
switch (signal) {
|
||||
case BEGIN:
|
||||
route(new Press(button));
|
||||
@@ -84,15 +88,17 @@ public class LircDevice extends Component implements LircButtonListener, SignalL
|
||||
break;
|
||||
}
|
||||
|
||||
if (general) {
|
||||
String string = button.toString();
|
||||
for (Button colorButton : ColorButton.values()) {
|
||||
if (colorButton.toString().equals(string)) {
|
||||
add(signal, ColorButton.valueOf(string));
|
||||
add(signal, ColorButton.valueOf(string), false);
|
||||
}
|
||||
}
|
||||
for (Button numberButton : NumberButton.values()) {
|
||||
if (numberButton.toString().equals(string)) {
|
||||
add(signal, ColorButton.valueOf(string));
|
||||
add(signal, NumberButton.valueOf(string), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import java.io.InputStreamReader;
|
||||
import java.io.OutputStream;
|
||||
import java.io.PrintWriter;
|
||||
import java.net.Socket;
|
||||
import java.net.SocketTimeoutException;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@@ -64,6 +65,7 @@ public class LircService extends Worker {
|
||||
log.trace("Activate LircService");
|
||||
try {
|
||||
socket = new Socket(ip, port);
|
||||
socket.setSoTimeout(SLEEP);
|
||||
|
||||
inputStream = socket.getInputStream();
|
||||
bufferedReader = new BufferedReader(new InputStreamReader(inputStream));
|
||||
@@ -87,7 +89,7 @@ public class LircService extends Worker {
|
||||
return active;
|
||||
}
|
||||
|
||||
public synchronized void deactivate() throws DeactivateException {
|
||||
public void deactivate() throws DeactivateException {
|
||||
log.trace("Deactivate LircService");
|
||||
super.deactivate();
|
||||
try {
|
||||
@@ -114,6 +116,7 @@ public class LircService extends Worker {
|
||||
} catch (UnknownButtonException e) {
|
||||
log.error(e);
|
||||
}
|
||||
} catch (SocketTimeoutException e) {
|
||||
} catch (IOException e) {
|
||||
log.error(e);
|
||||
}
|
||||
|
||||
7
java/src/mimis/device/lirc/remote/ColorButton.java
Normal file
7
java/src/mimis/device/lirc/remote/ColorButton.java
Normal file
@@ -0,0 +1,7 @@
|
||||
package mimis.device.lirc.remote;
|
||||
|
||||
import mimis.Button;
|
||||
|
||||
public enum ColorButton implements Button {
|
||||
RED, GREEN, YELLOW, BLUE;
|
||||
}
|
||||
@@ -9,7 +9,7 @@ import mimis.exception.worker.DeactivateException;
|
||||
import mimis.worker.Worker;
|
||||
|
||||
public class WiimoteDiscovery extends Worker {
|
||||
protected static final String WIISCAN = "wiiscan.exe";
|
||||
protected static final String WIISCAN = "wiiscan";
|
||||
protected static final int TIMEOUT = 1000;
|
||||
protected WiimoteDevice wiimoteDevice;
|
||||
protected Process process;
|
||||
@@ -36,7 +36,6 @@ public class WiimoteDiscovery extends Worker {
|
||||
Scanner scanner = new Scanner(process.getInputStream());
|
||||
while (scanner.hasNext()) {
|
||||
String line = scanner.nextLine();
|
||||
log.error(line);
|
||||
if (line.contains("error: BluetoothSetServiceState()")) {
|
||||
disconnect = true;
|
||||
return false;
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
package mimis.manager;
|
||||
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JToggleButton;
|
||||
import javax.swing.border.TitledBorder;
|
||||
|
||||
import mimis.worker.Worker;
|
||||
|
||||
@@ -19,7 +23,7 @@ public class ButtonManager extends Manager {
|
||||
}
|
||||
|
||||
public ButtonManager(String title, Worker... workerArray) {
|
||||
this.workerArray = workerArray;
|
||||
super(workerArray);
|
||||
this.title = title;
|
||||
createButtons();
|
||||
}
|
||||
@@ -28,21 +32,46 @@ public class ButtonManager extends Manager {
|
||||
return title;
|
||||
}
|
||||
|
||||
public JToggleButton[] getButtons() {
|
||||
return buttonMap.values().toArray(new JToggleButton[]{});
|
||||
public WorkerButton[] getButtons() {
|
||||
return buttonMap.values().toArray(new WorkerButton[]{});
|
||||
}
|
||||
|
||||
protected void createButtons() {
|
||||
buttonMap = new HashMap<Worker, WorkerButton>();
|
||||
for (Worker worker : workerArray) {
|
||||
for (Worker worker : workerList) {
|
||||
WorkerButton button = new WorkerButton(worker);
|
||||
buttonMap.put(worker, button);
|
||||
}
|
||||
}
|
||||
|
||||
public JPanel createPanel() {
|
||||
/* Initialize components */
|
||||
GridBagLayout gridBagLayout = new GridBagLayout();
|
||||
GridBagConstraints gridBagConstraints = new GridBagConstraints();
|
||||
JPanel panel = new JPanel(gridBagLayout);
|
||||
|
||||
/* Set border */
|
||||
TitledBorder border = new TitledBorder(getTitle());
|
||||
border.setTitleJustification(TitledBorder.CENTER);
|
||||
panel.setBorder(border);
|
||||
|
||||
/* Initialize constraints */
|
||||
gridBagConstraints.fill = GridBagConstraints.BOTH;
|
||||
gridBagConstraints.gridwidth = GridBagConstraints.REMAINDER;
|
||||
gridBagConstraints.weightx = 1;
|
||||
gridBagConstraints.weighty = 1;
|
||||
|
||||
/* Add buttons */
|
||||
for (JToggleButton button : getButtons()) {
|
||||
gridBagLayout.setConstraints(button, gridBagConstraints);
|
||||
panel.add(button);
|
||||
}
|
||||
return panel;
|
||||
}
|
||||
|
||||
protected void work() {
|
||||
long before = Calendar.getInstance().getTimeInMillis();
|
||||
for (Worker worker : workerArray) {
|
||||
for (Worker worker : workerList) {
|
||||
buttonMap.get(worker).setPressed(worker.active());
|
||||
}
|
||||
long after = Calendar.getInstance().getTimeInMillis();
|
||||
|
||||
99
java/src/mimis/manager/CurrentButtonManager.java
Normal file
99
java/src/mimis/manager/CurrentButtonManager.java
Normal file
@@ -0,0 +1,99 @@
|
||||
package mimis.manager;
|
||||
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import javax.swing.ButtonGroup;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JRadioButton;
|
||||
import javax.swing.border.TitledBorder;
|
||||
|
||||
import mimis.input.Task;
|
||||
import mimis.router.Router;
|
||||
import mimis.util.ArrayCycle;
|
||||
import mimis.value.Action;
|
||||
import mimis.value.Signal;
|
||||
import mimis.value.Target;
|
||||
import mimis.worker.Component;
|
||||
import mimis.worker.Worker;
|
||||
|
||||
public class CurrentButtonManager extends ButtonManager implements ActionListener {
|
||||
protected Router router;
|
||||
protected ArrayCycle<Component> componentCycle;
|
||||
protected Map<JRadioButton, Worker> radioButtonMap;
|
||||
|
||||
public CurrentButtonManager(Router router, ArrayCycle<Component> componentCycle, String title, Worker... workerArray) {
|
||||
super(title, workerArray);
|
||||
this.componentCycle = componentCycle;
|
||||
this.router = router;
|
||||
radioButtonMap = new HashMap<JRadioButton, Worker>();
|
||||
}
|
||||
|
||||
public JPanel createPanel() {
|
||||
/* Initialize components */
|
||||
ButtonGroup buttonGroup = new ButtonGroup();
|
||||
GridBagLayout gridBagLayout = new GridBagLayout();
|
||||
GridBagConstraints gridBagConstraints = new GridBagConstraints();
|
||||
JPanel panel = new JPanel(gridBagLayout);
|
||||
|
||||
/* Set border */
|
||||
TitledBorder border = new TitledBorder(getTitle());
|
||||
border.setTitleJustification(TitledBorder.CENTER);
|
||||
panel.setBorder(border);
|
||||
|
||||
/* Initialize constraints */
|
||||
gridBagConstraints.fill = GridBagConstraints.BOTH;
|
||||
gridBagConstraints.weighty = 1;
|
||||
|
||||
for (WorkerButton button : getButtons()) {
|
||||
/* Add button */
|
||||
gridBagConstraints.gridwidth = GridBagConstraints.RELATIVE;
|
||||
gridBagConstraints.weightx = 1;
|
||||
gridBagLayout.setConstraints(button, gridBagConstraints);
|
||||
panel.add(button);
|
||||
|
||||
/* Add radio button */
|
||||
JRadioButton radioButton = new JRadioButton();
|
||||
buttonGroup.add(radioButton);
|
||||
radioButton.addActionListener(this);
|
||||
radioButtonMap.put(radioButton, button.worker);
|
||||
gridBagConstraints.gridwidth = GridBagConstraints.REMAINDER;
|
||||
gridBagConstraints.weightx = 0;
|
||||
gridBagLayout.setConstraints(radioButton, gridBagConstraints);
|
||||
panel.add(radioButton);
|
||||
}
|
||||
return panel;
|
||||
}
|
||||
|
||||
public void actionPerformed(ActionEvent event) {
|
||||
JRadioButton radioButton = (JRadioButton) event.getSource();
|
||||
if (radioButtonMap.containsKey(radioButton)) {
|
||||
Worker worker = radioButtonMap.get(radioButton);
|
||||
if (componentCycle.contains(worker)) {
|
||||
while (!componentCycle.current().equals(worker)) {
|
||||
componentCycle.next();
|
||||
}
|
||||
router.add(new Task(Action.CURRENT, Target.MAIN, Signal.END));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void currentChanged() {
|
||||
Worker worker = componentCycle.current();
|
||||
if (radioButtonMap.containsValue(worker)) {
|
||||
for (Entry<JRadioButton, Worker> entry : radioButtonMap.entrySet()) {
|
||||
if (entry.getValue().equals(worker)) {
|
||||
JRadioButton radioButton = (JRadioButton) entry.getKey();
|
||||
radioButton.setSelected(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package mimis.manager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
|
||||
import mimis.exception.worker.DeactivateException;
|
||||
@@ -8,33 +10,42 @@ import mimis.worker.Worker;
|
||||
public class Manager extends Worker {
|
||||
protected static final int INTERVAL = 1000;
|
||||
|
||||
protected Worker[] workerArray;
|
||||
protected ArrayList<Worker> workerList;
|
||||
|
||||
public Manager(Worker... workerArray) {
|
||||
this.workerArray = workerArray;
|
||||
workerList = new ArrayList<Worker>();
|
||||
add(workerArray);
|
||||
}
|
||||
|
||||
public void add(Worker... workerArray) {
|
||||
workerList.addAll(Arrays.asList(workerArray));
|
||||
}
|
||||
|
||||
public void remove(Worker... workerArray) {
|
||||
workerList.removeAll(Arrays.asList(workerArray));
|
||||
}
|
||||
|
||||
protected void deactivate() throws DeactivateException {
|
||||
super.deactivate();
|
||||
for (Worker worker : workerArray) {
|
||||
for (Worker worker : workerList) {
|
||||
worker.stop();
|
||||
}
|
||||
}
|
||||
|
||||
public void exit() {
|
||||
super.exit();
|
||||
for (Worker worker : workerArray) {
|
||||
for (Worker worker : workerList) {
|
||||
worker.exit();
|
||||
}
|
||||
}
|
||||
|
||||
public int count() {
|
||||
return workerArray.length;
|
||||
return workerList.size();
|
||||
}
|
||||
|
||||
protected void work() {
|
||||
long before = Calendar.getInstance().getTimeInMillis();
|
||||
for (Worker worker : workerArray) {
|
||||
for (Worker worker : workerList) {
|
||||
worker.active();
|
||||
}
|
||||
long after = Calendar.getInstance().getTimeInMillis();
|
||||
|
||||
@@ -62,7 +62,7 @@ public class Parser extends Component {
|
||||
}
|
||||
|
||||
public void input(State state) {
|
||||
log.trace("input(State)");
|
||||
//log.trace("input(State)");
|
||||
Component component = state.getComponent();
|
||||
if (!activeMap.containsKey(component)) {
|
||||
activeMap.put(component, new ArrayList<Active>());
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
package mimis.event.router;
|
||||
|
||||
import mimis.Event;
|
||||
import mimis.event.EventListener;
|
||||
import mimis.event.EventRouter;
|
||||
import mimis.event.Task;
|
||||
import mimis.event.feedback.TextFeedback;
|
||||
import mimis.value.Target;
|
||||
|
||||
public class LocalRouter extends EventRouter {
|
||||
public void event(Event event) {
|
||||
Target target = event.getTarget();
|
||||
switch (target) {
|
||||
case APPLICATION:
|
||||
if (application != null) {
|
||||
application.add(event);
|
||||
}
|
||||
if (event instanceof Task) {
|
||||
Task task = (Task) event;
|
||||
add(new TextFeedback(String.format("Action (%s): %s", task.getSignal(), task.getAction())));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
for (EventListener eventListener : eventListenerList) {
|
||||
if (event.compatible(eventListener)) {
|
||||
eventListener.add(event);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,28 +8,6 @@ public class Native {
|
||||
System.loadLibrary("mimis");
|
||||
}
|
||||
|
||||
public void start() {
|
||||
int handle = getHandle("Winamp v1.x");
|
||||
System.out.println(handle);
|
||||
//sendMessage(handle, Windows.WM_CLOSE, 0, 0);
|
||||
/*
|
||||
while (true) {//Winamp v1.x
|
||||
System.out.println(isRunning("winamp.exe"));
|
||||
//System.out.println(new Native().terminate("winamp.exe"));
|
||||
//System.out.println(new Native().running("wmplayer.exe"));
|
||||
try {
|
||||
Thread.sleep(500);
|
||||
} catch (InterruptedException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
new Native().start();
|
||||
}
|
||||
|
||||
public native static int getHandle(String window);
|
||||
|
||||
public static int sendMessage(int handle, Windows windows, int wParam, int lParam) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package mimis.value;
|
||||
|
||||
public enum Action {
|
||||
EXIT, FORWARD, MUTE, NEXT, PAUSE, PLAY, PREVIOUS, REPEAT, RESUME, REWIND, START, TEST, VOLUME_DOWN, VOLUME_UP, FULLSCREEN, TRAIN, STOP, SAVE, RECOGNIZE, LOAD, SHUFFLE, FADEOUT, QUIT, VISUALISER, LIKE, DISLIKE, ACTIVATE, SHIFT, UNSHIFT, ADD, REMOVE, RESET;
|
||||
EXIT, FORWARD, MUTE, NEXT, PAUSE, PLAY, PREVIOUS, REPEAT, RESUME, REWIND, START, TEST, VOLUME_DOWN, VOLUME_UP, FULLSCREEN, TRAIN, STOP, SAVE, RECOGNIZE, LOAD, SHUFFLE, FADEOUT, QUIT, VISUALISER, LIKE, DISLIKE, ACTIVATE, SHIFT, UNSHIFT, ADD, REMOVE, RESET, CURRENT;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package mimis.value;
|
||||
|
||||
public enum Target {
|
||||
ALL, MAIN, DEVICES, APPLICATIONS, SELF, CURRENT;
|
||||
ALL, MAIN, DEVICES, APPLICATIONS, SELF, CURRENT, MIMIS, APPLICATION;
|
||||
}
|
||||
@@ -61,6 +61,7 @@ public abstract class Component extends Listener<Input> {
|
||||
|
||||
public void input(Input input) {
|
||||
if (input instanceof Task) {
|
||||
log.debug("task " + ((Task) input).getAction());
|
||||
task((Task) input);
|
||||
} else if (input instanceof Feedback) {
|
||||
feedback((Feedback) input);
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
package mimis.worker;
|
||||
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
import mimis.exception.worker.ActivateException;
|
||||
import mimis.exception.worker.DeactivateException;
|
||||
|
||||
public class Periodic extends Worker {
|
||||
public static final int PERIOD = 500;
|
||||
|
||||
protected TimerTask timerTask;
|
||||
protected Timer timer;
|
||||
protected int period;
|
||||
|
||||
public Periodic() {
|
||||
this(PERIOD);
|
||||
}
|
||||
|
||||
public Periodic(int period) {
|
||||
this.period = period;
|
||||
timerTask = new TimerTask() {
|
||||
public void run() {
|
||||
if (deactivate) {
|
||||
cancel();
|
||||
}
|
||||
work();
|
||||
}
|
||||
};
|
||||
timer = new Timer();
|
||||
}
|
||||
|
||||
protected void activate() throws ActivateException {
|
||||
timer.scheduleAtFixedRate(timerTask, 0, period);
|
||||
|
||||
}
|
||||
|
||||
protected void deactivate() throws DeactivateException {
|
||||
//timer.cancel();
|
||||
}
|
||||
|
||||
protected void work() {
|
||||
log.debug("work!");
|
||||
}
|
||||
|
||||
public void test() {
|
||||
Periodic periodic = new Periodic();
|
||||
periodic.start();
|
||||
sleep(1000);
|
||||
periodic.stop();
|
||||
sleep(1000);
|
||||
periodic.start();
|
||||
sleep(10000);
|
||||
System.exit(1);
|
||||
Worker worker = new Worker() {
|
||||
protected void work() {
|
||||
log.debug("work()");
|
||||
sleep();
|
||||
}
|
||||
};
|
||||
worker.start();
|
||||
sleep(1000);
|
||||
worker.stop();
|
||||
sleep(1000);
|
||||
worker.start();
|
||||
worker.start();
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
new Periodic().test();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,9 +9,11 @@ import org.apache.commons.logging.LogFactory;
|
||||
public abstract class Worker implements Runnable {
|
||||
protected Log log = LogFactory.getLog(getClass());
|
||||
|
||||
protected static final boolean THREAD = true;
|
||||
protected static final boolean THREAD = false;
|
||||
protected static final boolean INTERRUPT = false;
|
||||
protected static final int SLEEP = 100;
|
||||
|
||||
protected boolean interrupt;
|
||||
protected boolean run = false;
|
||||
protected boolean active = false;
|
||||
protected boolean activate = false;
|
||||
@@ -24,11 +26,11 @@ public abstract class Worker implements Runnable {
|
||||
if (!run) {
|
||||
run = true;
|
||||
if (thread) {
|
||||
log.debug("Start thread");
|
||||
new Thread(this, getClass().getName()).start();
|
||||
} else {
|
||||
log.debug("Run directly");
|
||||
run();
|
||||
} else {
|
||||
log.debug("Start thread");
|
||||
new Thread(this, getClass().getName()).start();
|
||||
}
|
||||
} else {
|
||||
notifyAll();
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
package wiiusej.wiiusejevents.physicalevents;
|
||||
|
||||
public class BalanceBoardEvent extends ExpansionEvent {
|
||||
protected BalanceBoardButtonsEvent buttonsEvent;
|
||||
protected JoystickEvent balanceBoardJoystickEvent;
|
||||
|
||||
public BalanceBoardEvent(int id, float topRight, float bottomRight,
|
||||
float bottomLeft, float topLeft) {
|
||||
super(id);
|
||||
|
||||
System.out.println(String.format("%f %f %f %f", topRight, bottomRight, bottomLeft, topLeft));
|
||||
/*balanceBoardJoystickEvent = new JoystickEvent(id, angle,
|
||||
magnitude, max1, max2, min1, min2, center1, center2);*/
|
||||
|
||||
Binary file not shown.
BIN
java/wiiuse.dll
BIN
java/wiiuse.dll
Binary file not shown.
BIN
java/wiiusej.dll
BIN
java/wiiusej.dll
Binary file not shown.
Reference in New Issue
Block a user