diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..5eaee23 --- /dev/null +++ b/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/.project b/.project new file mode 100644 index 0000000..0b52937 --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ + + + JHeatMapControl + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/.settings/net.sf.jautodoc.prefs b/.settings/net.sf.jautodoc.prefs new file mode 100644 index 0000000..17aecf0 --- /dev/null +++ b/.settings/net.sf.jautodoc.prefs @@ -0,0 +1,9 @@ +add_header=true +add_todo=false +eclipse.preferences.version=1 +header_text=/*\n* JHC - Java Heatmap Control\n* Copyright (C) 2014 Fabian Prasser\n*\n* This program is free software\: you can redistribute it and/or modify\n* it under the terms of the GNU General Public License as published by\n* the Free Software Foundation, either version 3 of the License, or\n* (at your option) any later version.\n*\n* This program is distributed in the hope that it will be useful,\n* but WITHOUT ANY WARRANTY; without even the implied warranty of\n* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n* GNU General Public License for more details.\n*\n* You should have received a copy of the GNU General Public License\n* along with this program. If not, see .\n*/ +mode=mode_replace +multi_header=true +project_specific_settings=true +replace_header=true +replacements=\n\n\nReturns the\nSets the\nAdds the\nEdits the\nRemoves the\nInits the\nParses the\nCreates the\nBuilds the\nChecks if is\nPrints the\nChecks for\n\n\n diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..122d80f --- /dev/null +++ b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,291 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.7 +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.7 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=true +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=82 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=82 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=82 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=82 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=82 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=18 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=0 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=83 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=82 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=82 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=82 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=82 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=82 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=83 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=82 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=82 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +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.comment.preserve_white_space_between_code_and_line_comments=false +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=true +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=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=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_annotation_on_type=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=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=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_try=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_semicolon_in_try_resources=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_try=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_try=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_semicolon_in_try_resources=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=true +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=true +org.eclipse.jdt.core.formatter.lineSplit=100 +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=true +org.eclipse.jdt.core.formatter.tabulation.char=space +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=false +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/.settings/org.eclipse.jdt.ui.prefs b/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000..1eb3592 --- /dev/null +++ b/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +formatter_profile=_eclipse-cs FLASH +formatter_settings_version=12 diff --git a/.settings/org.jboss.ide.eclipse.as.core.prefs b/.settings/org.jboss.ide.eclipse.as.core.prefs new file mode 100644 index 0000000..c6c028c --- /dev/null +++ b/.settings/org.jboss.ide.eclipse.as.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.jboss.ide.eclipse.as.core.singledeployable.deployableList=\n diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..1dd90f2 --- /dev/null +++ b/LICENSE @@ -0,0 +1,165 @@ +GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..9e8908d --- /dev/null +++ b/README.md @@ -0,0 +1,89 @@ +JHC - Java Heatmap Control +==== + +This project implements a widget/control that displays [heat maps](https://en.wikipedia.org/wiki/Heat_map). +JHMC is available for all major Java toolkits, the Standard Widget Toolkit (SWT), Swing and the Abstract Window Toolkit (AWT). For rendering, +the native interfaces of the toolkits are used (avoiding the infamous SWT_AWT bridge). The main feature of JHC is that it is able +to display very large heat maps efficiently. + +[![Screenshot-1](https://raw.github.com/prasser/jhc/master/img/screenshot1.png)](https://raw.github.com/prasser/jhc/master/img/screenshot1.png) + +Introduction +------ + +In JHC heat maps are not represented as two-dimensional arrays but as sets of points. This allows to only sparsely populate the space +defined by the domains of the attributes involved. Moreover, heat maps are computed on-demand for the current size of the widget, +respecting a pre-defined maximal size. In case of very large heat maps, the data itself is scaled down instead of a rendered image. +Computations are performed in a background thread, allowing time-consuming processes, e.g. extensive disk access, when rendering a heat map. + +When scaling heat maps down, JHC currently uses the arithmetic mean to aggregate values and dynamically +adjusts the minimum and maximum of the scale to these aggregates. In future releases, it is planned to +make this process configurable (e.g. using static minima and maxima or different aggregate functions). + +There are multiple ways in which data can be provided to JHC. Firstly, different variants of the static method JHCData.create(...) +allow handling two-dimensional arrays of primitive Java data types. Secondly, the interface JHCDataProvider can be implemented +to provide arbitrary two-dimensional data, e.g. from disk, via JHCData.create(...). Finally, the abstract class +JHCData can itself be extended to implement a custom process for computing heat maps. To this end, the following classes must be implemented: + +[![Classes](https://raw.github.com/prasser/jhc/master/img/classes.png)](https://raw.github.com/prasser/jhc/master/img/classes.png) + +JHC will repeatedly call JHCData.getHeatmap(...) to retrieve an instance of the heat map for a specific +size. This call will be performed from a background thread. As a result, an instance of JHCHeatmap must be returned +that provides data points via an iterator over instances of the interface JHCHeatmap.Point. Each data point +associates a value with an x-coordinate and a y-coordinate. Each coordinate represents one tick on the according +axis. Associated labels must be returned from calls to JHCHeatmap.getXLabel(x) and getYLabel(y), respectively. + +Customization +------ + +JHC currently supports a customizable layout as well as different gradients for the heat map. Gradients are +inspired by [plotly](https://plot.ly/). See [here](http://nbviewer.ipython.org/github/plotly/python-user-guide/blob/master/s5_heatmaps/s5_heatmaps.ipynb#Plotly%27s-pre-defined-color-scales) +for a description of the color scales currently implemented. + +The class JHCLayout allows defining the following offsets and lengths: +* Offsets: from left, right, top, bottom, between heat map and scale and between labels +* Length: length of small and large ticks +* Rotation: labels for ticks can be rotated and drawn within given maximal bounds + +Compatibility +------ +JHC has been tested on all major platforms, MS Windows, Linux and OS X (with and without Retina-Displays), and all major toolkits, +SWT, AWT and Swing. + +Example (SWT) +------ + +```Java +// Define scales +JHCScale xScale = new JHCScale.String(new String[] { "X1", "X2", "X3" }); +JHCScale yScale = new JHCScale.String(new String[] { "Y1", "Y2", "Y3" }); + +// Configure +JHCLayout layout = new JHCLayout(true, 20, true, 20); +JHCConfiguration config = new JHCConfiguration("x-label", "y-label", JHCGradient.GRADIENT_HEAT, layout); + +// Create array +int[][] array = {{0,1,0}, {1,0,1}, {0,1,0}}; + +// Create data object +JHCData data = JHCData.create(array, xScale, yScale); + +// Create JHC widget +JHC jhc = new JHC(shell, SWT.NONE); +jhc.setData(data, config); +``` + +Download +------ +A binary version for AWT is available for download [here](https://rawgithub.com/prasser/jhc/master/jars/jhc-1.0.0-awt.jar) +([Javadoc](https://rawgithub.com/prasser/jhc/master/jars/jhc-1.0.0-awt-doc.jar)). +A binary version for Swing is available for download [here](https://rawgithub.com/prasser/jhc/master/jars/jhc-1.0.0-swing.jar) +([Javadoc](https://rawgithub.com/prasser/jhc/master/jars/jhc-1.0.0-swing-doc.jar)). +A binary version for SWT is available for download [here](https://rawgithub.com/prasser/jhc/master/jars/jhc-1.0.0-swt.jar) +([Javadoc](https://rawgithub.com/prasser/jhc/master/jars/jhc-1.0.0-swt-doc.jar)). + +Documentation +------ +Online Javadoc for AWT can be found [here](https://rawgithub.com/prasser/jhc/master/doc/awt/index.html). +Online Javadoc for Swing can be found [here](https://rawgithub.com/prasser/jhc/master/doc/swing/index.html). +Online Javadoc for SWT can be found [here](https://rawgithub.com/prasser/jhc/master/doc/swt/index.html). \ No newline at end of file diff --git a/bin/de/linearbits/examples/ExampleData.class b/bin/de/linearbits/examples/ExampleData.class new file mode 100644 index 0000000..c62c3d8 Binary files /dev/null and b/bin/de/linearbits/examples/ExampleData.class differ diff --git a/bin/de/linearbits/examples/Examples.class b/bin/de/linearbits/examples/Examples.class new file mode 100644 index 0000000..7b0dece Binary files /dev/null and b/bin/de/linearbits/examples/Examples.class differ diff --git a/bin/de/linearbits/examples/ExamplesSWT.class b/bin/de/linearbits/examples/ExamplesSWT.class new file mode 100644 index 0000000..5081d09 Binary files /dev/null and b/bin/de/linearbits/examples/ExamplesSWT.class differ diff --git a/bin/de/linearbits/examples/Window.class b/bin/de/linearbits/examples/Window.class new file mode 100644 index 0000000..703acf0 Binary files /dev/null and b/bin/de/linearbits/examples/Window.class differ diff --git a/bin/de/linearbits/examples/WindowSWT.class b/bin/de/linearbits/examples/WindowSWT.class new file mode 100644 index 0000000..4425be8 Binary files /dev/null and b/bin/de/linearbits/examples/WindowSWT.class differ diff --git a/bin/de/linearbits/jhc/Canvas$CanvasListener.class b/bin/de/linearbits/jhc/Canvas$CanvasListener.class new file mode 100644 index 0000000..252983e Binary files /dev/null and b/bin/de/linearbits/jhc/Canvas$CanvasListener.class differ diff --git a/bin/de/linearbits/jhc/Canvas.class b/bin/de/linearbits/jhc/Canvas.class new file mode 100644 index 0000000..7c6e51b Binary files /dev/null and b/bin/de/linearbits/jhc/Canvas.class differ diff --git a/bin/de/linearbits/jhc/CanvasSWT$1.class b/bin/de/linearbits/jhc/CanvasSWT$1.class new file mode 100644 index 0000000..5b62f71 Binary files /dev/null and b/bin/de/linearbits/jhc/CanvasSWT$1.class differ diff --git a/bin/de/linearbits/jhc/CanvasSWT$2.class b/bin/de/linearbits/jhc/CanvasSWT$2.class new file mode 100644 index 0000000..07687db Binary files /dev/null and b/bin/de/linearbits/jhc/CanvasSWT$2.class differ diff --git a/bin/de/linearbits/jhc/CanvasSWT$3$1.class b/bin/de/linearbits/jhc/CanvasSWT$3$1.class new file mode 100644 index 0000000..ba29a2c Binary files /dev/null and b/bin/de/linearbits/jhc/CanvasSWT$3$1.class differ diff --git a/bin/de/linearbits/jhc/CanvasSWT$3.class b/bin/de/linearbits/jhc/CanvasSWT$3.class new file mode 100644 index 0000000..fa7d6f6 Binary files /dev/null and b/bin/de/linearbits/jhc/CanvasSWT$3.class differ diff --git a/bin/de/linearbits/jhc/CanvasSWT$4.class b/bin/de/linearbits/jhc/CanvasSWT$4.class new file mode 100644 index 0000000..0e663dc Binary files /dev/null and b/bin/de/linearbits/jhc/CanvasSWT$4.class differ diff --git a/bin/de/linearbits/jhc/CanvasSWT$5.class b/bin/de/linearbits/jhc/CanvasSWT$5.class new file mode 100644 index 0000000..1d5b902 Binary files /dev/null and b/bin/de/linearbits/jhc/CanvasSWT$5.class differ diff --git a/bin/de/linearbits/jhc/CanvasSWT$6.class b/bin/de/linearbits/jhc/CanvasSWT$6.class new file mode 100644 index 0000000..e4aa024 Binary files /dev/null and b/bin/de/linearbits/jhc/CanvasSWT$6.class differ diff --git a/bin/de/linearbits/jhc/CanvasSWT.class b/bin/de/linearbits/jhc/CanvasSWT.class new file mode 100644 index 0000000..2eb5088 Binary files /dev/null and b/bin/de/linearbits/jhc/CanvasSWT.class differ diff --git a/bin/de/linearbits/jhc/Dimension.class b/bin/de/linearbits/jhc/Dimension.class new file mode 100644 index 0000000..3281afd Binary files /dev/null and b/bin/de/linearbits/jhc/Dimension.class differ diff --git a/bin/de/linearbits/jhc/Graphics.class b/bin/de/linearbits/jhc/Graphics.class new file mode 100644 index 0000000..07622a9 Binary files /dev/null and b/bin/de/linearbits/jhc/Graphics.class differ diff --git a/bin/de/linearbits/jhc/GraphicsSWT.class b/bin/de/linearbits/jhc/GraphicsSWT.class new file mode 100644 index 0000000..2bc17ea Binary files /dev/null and b/bin/de/linearbits/jhc/GraphicsSWT.class differ diff --git a/bin/de/linearbits/jhc/JHC.class b/bin/de/linearbits/jhc/JHC.class new file mode 100644 index 0000000..5f8ab20 Binary files /dev/null and b/bin/de/linearbits/jhc/JHC.class differ diff --git a/bin/de/linearbits/jhc/JHCConfiguration.class b/bin/de/linearbits/jhc/JHCConfiguration.class new file mode 100644 index 0000000..c6944f5 Binary files /dev/null and b/bin/de/linearbits/jhc/JHCConfiguration.class differ diff --git a/bin/de/linearbits/jhc/JHCData.class b/bin/de/linearbits/jhc/JHCData.class new file mode 100644 index 0000000..eb4716c Binary files /dev/null and b/bin/de/linearbits/jhc/JHCData.class differ diff --git a/bin/de/linearbits/jhc/JHCDataProvider$Orientation.class b/bin/de/linearbits/jhc/JHCDataProvider$Orientation.class new file mode 100644 index 0000000..b2ec513 Binary files /dev/null and b/bin/de/linearbits/jhc/JHCDataProvider$Orientation.class differ diff --git a/bin/de/linearbits/jhc/JHCDataProvider.class b/bin/de/linearbits/jhc/JHCDataProvider.class new file mode 100644 index 0000000..30077e5 Binary files /dev/null and b/bin/de/linearbits/jhc/JHCDataProvider.class differ diff --git a/bin/de/linearbits/jhc/JHCGradient.class b/bin/de/linearbits/jhc/JHCGradient.class new file mode 100644 index 0000000..628727d Binary files /dev/null and b/bin/de/linearbits/jhc/JHCGradient.class differ diff --git a/bin/de/linearbits/jhc/JHCHeatmap$Point.class b/bin/de/linearbits/jhc/JHCHeatmap$Point.class new file mode 100644 index 0000000..70c3111 Binary files /dev/null and b/bin/de/linearbits/jhc/JHCHeatmap$Point.class differ diff --git a/bin/de/linearbits/jhc/JHCHeatmap.class b/bin/de/linearbits/jhc/JHCHeatmap.class new file mode 100644 index 0000000..baaf89b Binary files /dev/null and b/bin/de/linearbits/jhc/JHCHeatmap.class differ diff --git a/bin/de/linearbits/jhc/JHCLayout.class b/bin/de/linearbits/jhc/JHCLayout.class new file mode 100644 index 0000000..f852787 Binary files /dev/null and b/bin/de/linearbits/jhc/JHCLayout.class differ diff --git a/bin/de/linearbits/jhc/JHCScale$Date.class b/bin/de/linearbits/jhc/JHCScale$Date.class new file mode 100644 index 0000000..5d484fa Binary files /dev/null and b/bin/de/linearbits/jhc/JHCScale$Date.class differ diff --git a/bin/de/linearbits/jhc/JHCScale$Decimal.class b/bin/de/linearbits/jhc/JHCScale$Decimal.class new file mode 100644 index 0000000..e22d516 Binary files /dev/null and b/bin/de/linearbits/jhc/JHCScale$Decimal.class differ diff --git a/bin/de/linearbits/jhc/JHCScale$Integer.class b/bin/de/linearbits/jhc/JHCScale$Integer.class new file mode 100644 index 0000000..a3727a2 Binary files /dev/null and b/bin/de/linearbits/jhc/JHCScale$Integer.class differ diff --git a/bin/de/linearbits/jhc/JHCScale$String.class b/bin/de/linearbits/jhc/JHCScale$String.class new file mode 100644 index 0000000..a8017e6 Binary files /dev/null and b/bin/de/linearbits/jhc/JHCScale$String.class differ diff --git a/bin/de/linearbits/jhc/JHCScale.class b/bin/de/linearbits/jhc/JHCScale.class new file mode 100644 index 0000000..ba53261 Binary files /dev/null and b/bin/de/linearbits/jhc/JHCScale.class differ diff --git a/bin/de/linearbits/jhc/Painter.class b/bin/de/linearbits/jhc/Painter.class new file mode 100644 index 0000000..525dbef Binary files /dev/null and b/bin/de/linearbits/jhc/Painter.class differ diff --git a/bin/de/linearbits/jhc/PainterSWT.class b/bin/de/linearbits/jhc/PainterSWT.class new file mode 100644 index 0000000..d2ae2fa Binary files /dev/null and b/bin/de/linearbits/jhc/PainterSWT.class differ diff --git a/bin/de/linearbits/jhc/Pixels.class b/bin/de/linearbits/jhc/Pixels.class new file mode 100644 index 0000000..01f0f47 Binary files /dev/null and b/bin/de/linearbits/jhc/Pixels.class differ diff --git a/bin/de/linearbits/jhc/PixelsSWT.class b/bin/de/linearbits/jhc/PixelsSWT.class new file mode 100644 index 0000000..8a9f449 Binary files /dev/null and b/bin/de/linearbits/jhc/PixelsSWT.class differ diff --git a/bin/de/linearbits/jhc/ProviderCharArray.class b/bin/de/linearbits/jhc/ProviderCharArray.class new file mode 100644 index 0000000..7536c9f Binary files /dev/null and b/bin/de/linearbits/jhc/ProviderCharArray.class differ diff --git a/bin/de/linearbits/jhc/ProviderData$1.class b/bin/de/linearbits/jhc/ProviderData$1.class new file mode 100644 index 0000000..eddfdfa Binary files /dev/null and b/bin/de/linearbits/jhc/ProviderData$1.class differ diff --git a/bin/de/linearbits/jhc/ProviderData$2.class b/bin/de/linearbits/jhc/ProviderData$2.class new file mode 100644 index 0000000..ea8ce49 Binary files /dev/null and b/bin/de/linearbits/jhc/ProviderData$2.class differ diff --git a/bin/de/linearbits/jhc/ProviderData$3.class b/bin/de/linearbits/jhc/ProviderData$3.class new file mode 100644 index 0000000..657d5a5 Binary files /dev/null and b/bin/de/linearbits/jhc/ProviderData$3.class differ diff --git a/bin/de/linearbits/jhc/ProviderData$4.class b/bin/de/linearbits/jhc/ProviderData$4.class new file mode 100644 index 0000000..459ea7c Binary files /dev/null and b/bin/de/linearbits/jhc/ProviderData$4.class differ diff --git a/bin/de/linearbits/jhc/ProviderData$ProviderDataPoint.class b/bin/de/linearbits/jhc/ProviderData$ProviderDataPoint.class new file mode 100644 index 0000000..3fc6f2f Binary files /dev/null and b/bin/de/linearbits/jhc/ProviderData$ProviderDataPoint.class differ diff --git a/bin/de/linearbits/jhc/ProviderData.class b/bin/de/linearbits/jhc/ProviderData.class new file mode 100644 index 0000000..b496cc1 Binary files /dev/null and b/bin/de/linearbits/jhc/ProviderData.class differ diff --git a/bin/de/linearbits/jhc/ProviderDoubleArray.class b/bin/de/linearbits/jhc/ProviderDoubleArray.class new file mode 100644 index 0000000..5305a00 Binary files /dev/null and b/bin/de/linearbits/jhc/ProviderDoubleArray.class differ diff --git a/bin/de/linearbits/jhc/ProviderFloatArray.class b/bin/de/linearbits/jhc/ProviderFloatArray.class new file mode 100644 index 0000000..87ce5cb Binary files /dev/null and b/bin/de/linearbits/jhc/ProviderFloatArray.class differ diff --git a/bin/de/linearbits/jhc/ProviderIntegerArray.class b/bin/de/linearbits/jhc/ProviderIntegerArray.class new file mode 100644 index 0000000..39fe53b Binary files /dev/null and b/bin/de/linearbits/jhc/ProviderIntegerArray.class differ diff --git a/bin/de/linearbits/jhc/ProviderLongArray.class b/bin/de/linearbits/jhc/ProviderLongArray.class new file mode 100644 index 0000000..7793233 Binary files /dev/null and b/bin/de/linearbits/jhc/ProviderLongArray.class differ diff --git a/bin/de/linearbits/jhc/Rectangle.class b/bin/de/linearbits/jhc/Rectangle.class new file mode 100644 index 0000000..a477daf Binary files /dev/null and b/bin/de/linearbits/jhc/Rectangle.class differ diff --git a/bin/de/linearbits/jhc/RenderedHeatmap.class b/bin/de/linearbits/jhc/RenderedHeatmap.class new file mode 100644 index 0000000..8f254a9 Binary files /dev/null and b/bin/de/linearbits/jhc/RenderedHeatmap.class differ diff --git a/bin/de/linearbits/jhc/RenderedLayout.class b/bin/de/linearbits/jhc/RenderedLayout.class new file mode 100644 index 0000000..5d856a3 Binary files /dev/null and b/bin/de/linearbits/jhc/RenderedLayout.class differ diff --git a/bin/de/linearbits/jhc/Renderer$1.class b/bin/de/linearbits/jhc/Renderer$1.class new file mode 100644 index 0000000..3d9bc63 Binary files /dev/null and b/bin/de/linearbits/jhc/Renderer$1.class differ diff --git a/bin/de/linearbits/jhc/Renderer$Job.class b/bin/de/linearbits/jhc/Renderer$Job.class new file mode 100644 index 0000000..f87ed4f Binary files /dev/null and b/bin/de/linearbits/jhc/Renderer$Job.class differ diff --git a/bin/de/linearbits/jhc/Renderer.class b/bin/de/linearbits/jhc/Renderer.class new file mode 100644 index 0000000..d854163 Binary files /dev/null and b/bin/de/linearbits/jhc/Renderer.class differ diff --git a/bin/de/linearbits/jhc/RendererSWT.class b/bin/de/linearbits/jhc/RendererSWT.class new file mode 100644 index 0000000..2102936 Binary files /dev/null and b/bin/de/linearbits/jhc/RendererSWT.class differ diff --git a/bin/de/linearbits/jhc/ToolTip.class b/bin/de/linearbits/jhc/ToolTip.class new file mode 100644 index 0000000..0c1a387 Binary files /dev/null and b/bin/de/linearbits/jhc/ToolTip.class differ diff --git a/bin/de/linearbits/jhc/_JHC$1.class b/bin/de/linearbits/jhc/_JHC$1.class new file mode 100644 index 0000000..a6d6259 Binary files /dev/null and b/bin/de/linearbits/jhc/_JHC$1.class differ diff --git a/bin/de/linearbits/jhc/_JHC.class b/bin/de/linearbits/jhc/_JHC.class new file mode 100644 index 0000000..41f3c58 Binary files /dev/null and b/bin/de/linearbits/jhc/_JHC.class differ diff --git a/bin/de/linearbits/jhc/package-info.class b/bin/de/linearbits/jhc/package-info.class new file mode 100644 index 0000000..9ca55a9 Binary files /dev/null and b/bin/de/linearbits/jhc/package-info.class differ diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..a67635d --- /dev/null +++ b/build.xml @@ -0,0 +1,172 @@ + + + + Builds, tests, and runs the project. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/awt/allclasses-frame.html b/doc/awt/allclasses-frame.html new file mode 100644 index 0000000..85d0c2b --- /dev/null +++ b/doc/awt/allclasses-frame.html @@ -0,0 +1,31 @@ + + + + + +All Classes (JHC API Documentation) + + + + +

All Classes

+ + + diff --git a/doc/awt/allclasses-noframe.html b/doc/awt/allclasses-noframe.html new file mode 100644 index 0000000..12e1268 --- /dev/null +++ b/doc/awt/allclasses-noframe.html @@ -0,0 +1,31 @@ + + + + + +All Classes (JHC API Documentation) + + + + +

All Classes

+ + + diff --git a/doc/awt/constant-values.html b/doc/awt/constant-values.html new file mode 100644 index 0000000..6ccc99f --- /dev/null +++ b/doc/awt/constant-values.html @@ -0,0 +1,113 @@ + + + + + +Constant Field Values (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
+

Constant Field Values

+

Contents

+
+ +
+ + + + + +
+ + + + diff --git a/doc/awt/de/linearbits/jhc/JHC.html b/doc/awt/de/linearbits/jhc/JHC.html new file mode 100644 index 0000000..0e2b024 --- /dev/null +++ b/doc/awt/de/linearbits/jhc/JHC.html @@ -0,0 +1,396 @@ + + + + + +JHC (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHC

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.awt.Component
    • +
    • +
        +
      • java.awt.Container
      • +
      • +
          +
        • javax.swing.JComponent
        • +
        • +
            +
          • de.linearbits.jhc.JHC
          • +
          +
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
    +
    +
    +
    +
    public class JHC
    +extends javax.swing.JComponent
    +
    This class provides a heatmap control for AWT
    +
    See Also:
    Serialized Form
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      +
        +
      • + + +

        Nested classes/interfaces inherited from class javax.swing.JComponent

        +javax.swing.JComponent.AccessibleJComponent
      • +
      +
        +
      • + + +

        Nested classes/interfaces inherited from class java.awt.Component

        +java.awt.Component.BaselineResizeBehavior
      • +
      +
    • +
    + +
      +
    • + + +

      Field Summary

      +
        +
      • + + +

        Fields inherited from class javax.swing.JComponent

        +TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
      • +
      +
        +
      • + + +

        Fields inherited from class java.awt.Component

        +BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
      • +
      +
        +
      • + + +

        Fields inherited from interface java.awt.image.ImageObserver

        +ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      JHC() +
      Creates a new instance
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      voidsetBackground(java.awt.Color bg) +
      Sets the background color
      +
      voidsetData(JHCData data, + JHCConfiguration config) +
      Updates the data displayed by this control
      +
      voidsetFont(java.awt.Font font) +
      Sets the font
      +
      +
        +
      • + + +

        Methods inherited from class javax.swing.JComponent

        +addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
      • +
      +
        +
      • + + +

        Methods inherited from class java.awt.Container

        +add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate
      • +
      +
        +
      • + + +

        Methods inherited from class java.awt.Component

        +action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHC

        +
        public JHC()
        +
        Creates a new instance
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        setData

        +
        public void setData(JHCData data,
        +           JHCConfiguration config)
        +
        Updates the data displayed by this control
        +
        Parameters:
        data -
        config -
        +
      • +
      + + + +
        +
      • +

        setFont

        +
        public void setFont(java.awt.Font font)
        +
        Sets the font
        +
        +
        Overrides:
        +
        setFont in class javax.swing.JComponent
        +
        +
      • +
      + + + +
        +
      • +

        setBackground

        +
        public void setBackground(java.awt.Color bg)
        +
        Sets the background color
        +
        +
        Overrides:
        +
        setBackground in class javax.swing.JComponent
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/awt/de/linearbits/jhc/JHCConfiguration.html b/doc/awt/de/linearbits/jhc/JHCConfiguration.html new file mode 100644 index 0000000..3ccc265 --- /dev/null +++ b/doc/awt/de/linearbits/jhc/JHCConfiguration.html @@ -0,0 +1,307 @@ + + + + + +JHCConfiguration (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHCConfiguration

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • de.linearbits.jhc.JHCConfiguration
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class JHCConfiguration
    +extends java.lang.Object
    +
    This class allows to configure how the heatmap is displayed.
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      JHCConfiguration(java.lang.String xLabel, + java.lang.String yLabel, + int maximalWidth, + int maximalHeight, + JHCGradient gradient) +
      Instantiates a new configuration.
      +
      JHCConfiguration(java.lang.String xLabel, + java.lang.String yLabel, + int maximalWidth, + int maximalHeight, + JHCGradient gradient, + JHCLayout layout) +
      Instantiates a new configuration.
      +
      JHCConfiguration(java.lang.String xLabel, + java.lang.String yLabel, + JHCGradient gradient) +
      Instantiates a new configuration.
      +
      JHCConfiguration(java.lang.String xLabel, + java.lang.String yLabel, + JHCGradient gradient, + JHCLayout layout) +
      Instantiates a new configuration.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHCConfiguration

        +
        public JHCConfiguration(java.lang.String xLabel,
        +                java.lang.String yLabel,
        +                int maximalWidth,
        +                int maximalHeight,
        +                JHCGradient gradient)
        +
        Instantiates a new configuration.
        +
        Parameters:
        xLabel - the x label
        yLabel - the y label
        maximalWidth - the maximal width
        maximalHeight - the maximal height
        gradient - the gradient
        +
      • +
      + + + +
        +
      • +

        JHCConfiguration

        +
        public JHCConfiguration(java.lang.String xLabel,
        +                java.lang.String yLabel,
        +                int maximalWidth,
        +                int maximalHeight,
        +                JHCGradient gradient,
        +                JHCLayout layout)
        +
        Instantiates a new configuration.
        +
        Parameters:
        xLabel - the x label
        yLabel - the y label
        maximalSize - the maximal size
        gradient - the gradient
        layout - the layout
        +
      • +
      + + + +
        +
      • +

        JHCConfiguration

        +
        public JHCConfiguration(java.lang.String xLabel,
        +                java.lang.String yLabel,
        +                JHCGradient gradient)
        +
        Instantiates a new configuration.
        +
        Parameters:
        xLabel - the x label
        yLabel - the y label
        gradient - the gradient
        +
      • +
      + + + +
        +
      • +

        JHCConfiguration

        +
        public JHCConfiguration(java.lang.String xLabel,
        +                java.lang.String yLabel,
        +                JHCGradient gradient,
        +                JHCLayout layout)
        +
        Instantiates a new configuration.
        +
        Parameters:
        xLabel - the x label
        yLabel - the y label
        gradient - the gradient
        layout - the layout
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/awt/de/linearbits/jhc/JHCData.html b/doc/awt/de/linearbits/jhc/JHCData.html new file mode 100644 index 0000000..473f215 --- /dev/null +++ b/doc/awt/de/linearbits/jhc/JHCData.html @@ -0,0 +1,636 @@ + + + + + +JHCData (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHCData

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • de.linearbits.jhc.JHCData
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public abstract class JHCData
    +extends java.lang.Object
    +
    This class defines the abstract base type for data that can be handled by the widget/control. Moreover, it offers + static methods for deriving instances for typical data representations, e.g., arrays. Extend this class, if you want to + encapsule potentially long-running processes that compute the heatmap
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHCData

        +
        public JHCData()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        create

        +
        public static JHCData create(double[][] data)
        +
        Creates a data object. Assumes a row-oriented layout.
        +
        Parameters:
        data - the data
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(double[][] data,
        +             JHCScale<?> xScale,
        +             JHCScale<?> yScale)
        +
        Creates a data object. Assumes a row-oriented layout.
        +
        Parameters:
        data - the data
        xScale - the x scale
        yScale - the y scale
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(double[][] data,
        +             JHCDataProvider.Orientation orientation,
        +             JHCScale<?> xScale,
        +             JHCScale<?> yScale)
        +
        Creates a data object
        +
        Parameters:
        data - the data
        orientation - the orientation
        xScale - the x scale
        yScale - the y scale
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(char[][] data)
        +
        Creates a data object. Assumes a row-oriented layout.
        +
        Parameters:
        data - the data
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(char[][] data,
        +             JHCScale<?> xScale,
        +             JHCScale<?> yScale)
        +
        Creates a data object. Assumes a row-oriented layout.
        +
        Parameters:
        data - the data
        xScale - the x scale
        yScale - the y scale
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(char[][] data,
        +             JHCDataProvider.Orientation orientation,
        +             JHCScale<?> xScale,
        +             JHCScale<?> yScale)
        +
        Creates a data object
        +
        Parameters:
        data - the data
        orientation - the orientation
        xScale - the x scale
        yScale - the y scale
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(int[][] data)
        +
        Creates a data object. Assumes a row-oriented layout.
        +
        Parameters:
        data - the data
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(int[][] data,
        +             JHCScale<?> xScale,
        +             JHCScale<?> yScale)
        +
        Creates a data object. Assumes a row-oriented layout.
        +
        Parameters:
        data - the data
        xScale - the x scale
        yScale - the y scale
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(int[][] data,
        +             JHCDataProvider.Orientation orientation,
        +             JHCScale<?> xScale,
        +             JHCScale<?> yScale)
        +
        Creates a data object
        +
        Parameters:
        data - the data
        orientation - the orientation
        xScale - the x scale
        yScale - the y scale
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(long[][] data)
        +
        Creates a data object. Assumes a row-oriented layout.
        +
        Parameters:
        data - the data
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(long[][] data,
        +             JHCScale<?> xScale,
        +             JHCScale<?> yScale)
        +
        Creates a data object. Assumes a row-oriented layout.
        +
        Parameters:
        data - the data
        xScale - the x scale
        yScale - the y scale
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(long[][] data,
        +             JHCDataProvider.Orientation orientation,
        +             JHCScale<?> xScale,
        +             JHCScale<?> yScale)
        +
        Creates a data object
        +
        Parameters:
        data - the data
        orientation - the orientation
        xScale - the x scale
        yScale - the y scale
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(float[][] data)
        +
        Creates a data object. Assumes a row-oriented layout.
        +
        Parameters:
        data - the data
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(float[][] data,
        +             JHCScale<?> xScale,
        +             JHCScale<?> yScale)
        +
        Creates a data object. Assumes a row-oriented layout.
        +
        Parameters:
        data - the data
        xScale - the x scale
        yScale - the y scale
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(float[][] data,
        +             JHCDataProvider.Orientation orientation,
        +             JHCScale<?> xScale,
        +             JHCScale<?> yScale)
        +
        Creates a data object
        +
        Parameters:
        data - the data
        orientation - the orientation
        xScale - the x scale
        yScale - the y scale
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(JHCDataProvider provider)
        +
        Creates the.
        +
        Parameters:
        provider - the provider
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        getHeatmap

        +
        public abstract JHCHeatmap getHeatmap(int width,
        +                    int height)
        +
        Gets the heat.
        +
        Parameters:
        width - the width
        height - the height
        +
        Returns:
        the heat
        +
      • +
      + + + +
        +
      • +

        getWidth

        +
        public abstract int getWidth()
        +
        Gets the original width of the data
        +
        Returns:
        the width
        +
      • +
      + + + +
        +
      • +

        getHeight

        +
        public abstract int getHeight()
        +
        Gets the original height of the data
        +
        Returns:
        the height
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/awt/de/linearbits/jhc/JHCDataProvider.Orientation.html b/doc/awt/de/linearbits/jhc/JHCDataProvider.Orientation.html new file mode 100644 index 0000000..32d2a91 --- /dev/null +++ b/doc/awt/de/linearbits/jhc/JHCDataProvider.Orientation.html @@ -0,0 +1,324 @@ + + + + + +JHCDataProvider.Orientation (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Enum JHCDataProvider.Orientation

+
+
+ +
+ +
+
+
    +
  • + +
      +
    • + + +

      Enum Constant Summary

      + + + + + + + + + + + +
      Enum Constants 
      Enum Constant and Description
      COLUMN 
      ROW 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      static JHCDataProvider.OrientationvalueOf(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static JHCDataProvider.Orientation[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static JHCDataProvider.Orientation[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (JHCDataProvider.Orientation c : JHCDataProvider.Orientation.values())
        +    System.out.println(c);
        +
        +
        Returns:
        an array containing the constants of this enum type, in +the order they are declared
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static JHCDataProvider.Orientation valueOf(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
        +
        Parameters:
        name - the name of the enum constant to be returned.
        +
        Returns:
        the enum constant with the specified name
        +
        Throws:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant +with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/awt/de/linearbits/jhc/JHCDataProvider.html b/doc/awt/de/linearbits/jhc/JHCDataProvider.html new file mode 100644 index 0000000..2bd96e4 --- /dev/null +++ b/doc/awt/de/linearbits/jhc/JHCDataProvider.html @@ -0,0 +1,318 @@ + + + + + +JHCDataProvider (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Interface JHCDataProvider

+
+
+
+
    +
  • +
    +
    +
    public interface JHCDataProvider
    +
    This interface can be implemented to convert data into a representation suitable for the widget
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        get

        +
        double get(int x,
        +         int y)
        +
        Returns the.
        +
        Parameters:
        x - the x
        y - the y
        +
        Returns:
        the double
        +
      • +
      + + + +
        +
      • +

        getHeight

        +
        int getHeight()
        +
        Gets the height.
        +
        Returns:
        the height
        +
      • +
      + + + +
        +
      • +

        getWidth

        +
        int getWidth()
        +
        Gets the width.
        +
        Returns:
        the width
        +
      • +
      + + + + + + + +
        +
      • +

        getXScale

        +
        JHCScale<?> getXScale()
        +
        Gets the x labels.
        +
        Returns:
        the x scale
        +
      • +
      + + + +
        +
      • +

        getYScale

        +
        JHCScale<?> getYScale()
        +
        Gets the y labels.
        +
        Returns:
        the y scale
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/awt/de/linearbits/jhc/JHCGradient.html b/doc/awt/de/linearbits/jhc/JHCGradient.html new file mode 100644 index 0000000..32aa17d --- /dev/null +++ b/doc/awt/de/linearbits/jhc/JHCGradient.html @@ -0,0 +1,513 @@ + + + + + +JHCGradient (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHCGradient

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • de.linearbits.jhc.JHCGradient
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class JHCGradient
    +extends java.lang.Object
    +
    The class implements gradients for the heatmap. Some predefined gradients are + inspired by plotly (https://github.com/plotly).
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        GRADIENT_GRAYSCALE

        +
        public static final JHCGradient GRADIENT_GRAYSCALE
        +
        BLACK, GRAY, WHITE
        +
      • +
      + + + +
        +
      • +

        GRADIENT_HEAT

        +
        public static final JHCGradient GRADIENT_HEAT
        +
        BLUE, CYAN, GREEN, YELLOW, ORANGE, RED
        +
      • +
      + + + +
        +
      • +

        GRADIENT_GRAYS

        +
        public static final JHCGradient GRADIENT_GRAYS
        +
        BLACK, LIGHT_GRAY
        +
      • +
      + + + +
        +
      • +

        GRADIENT_YIGNBN

        +
        public static final JHCGradient GRADIENT_YIGNBN
        +
        WHITE, GREEN
        +
      • +
      + + + +
        +
      • +

        GRADIENT_GREENS

        +
        public static final JHCGradient GRADIENT_GREENS
        +
        DARK_GREEN, LIGHT_GREEN
        +
      • +
      + + + +
        +
      • +

        GRADIENT_YIORRD

        +
        public static final JHCGradient GRADIENT_YIORRD
        +
        RED, ORANGE, GOLD, TAN, WHITE
        +
      • +
      + + + +
        +
      • +

        GRADIENT_BLUERED

        +
        public static final JHCGradient GRADIENT_BLUERED
        +
        BRIGHT_BLUE, PURPLE, BRIGHT_RED
        +
      • +
      + + + +
        +
      • +

        GRADIENT_RDBU

        +
        public static final JHCGradient GRADIENT_RDBU
        +
        BLUE, RED
        +
      • +
      + + + +
        +
      • +

        GRADIENT_PICNIC

        +
        public static final JHCGradient GRADIENT_PICNIC
        +
        BLUE, LIGHT_BLUE, WHITE, PINK
        +
      • +
      + + + +
        +
      • +

        GRADIENT_PORTLAND

        +
        public static final JHCGradient GRADIENT_PORTLAND
        +
        BLUE, GREEN, YELLOW, ORANGE, RED
        +
      • +
      + + + +
        +
      • +

        GRADIENT_JET

        +
        public static final JHCGradient GRADIENT_JET
        +
        BLUE, LIGHT_BLUE, GREEN, YELLOW, ORANGE, RED
        +
      • +
      + + + +
        +
      • +

        GRADIENT_HOT

        +
        public static final JHCGradient GRADIENT_HOT
        +
        TAN, YELLOW, RED, BLACK
        +
      • +
      + + + +
        +
      • +

        GRADIENT_BLACKBODY

        +
        public static final JHCGradient GRADIENT_BLACKBODY
        +
        BLACK, RED, YELLOW, WHITE, LIGHT_BLUE
        +
      • +
      + + + +
        +
      • +

        GRADIENT_EARTH

        +
        public static final JHCGradient GRADIENT_EARTH
        +
        BLUE, GREEN, YELLOW, BROWN, TAN, WHITE
        +
      • +
      + + + +
        +
      • +

        GRADIENT_ELECTRIC

        +
        public static final JHCGradient GRADIENT_ELECTRIC
        +
        BLACK, PURPLE, ORANGE, YELLOW, TAN, WHITE
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHCGradient

        +
        public JHCGradient(java.awt.Color[] _colors)
        +
        Instantiates a new gradient.
        +
        Parameters:
        _colors - the _colors
        +
      • +
      + + + +
        +
      • +

        JHCGradient

        +
        public JHCGradient(java.awt.Color[] _colors,
        +           int steps)
        +
        Instantiates a new gradient.
        +
        Parameters:
        _colors - the _colors
        steps - the steps
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/awt/de/linearbits/jhc/JHCHeatmap.Point.html b/doc/awt/de/linearbits/jhc/JHCHeatmap.Point.html new file mode 100644 index 0000000..641b16a --- /dev/null +++ b/doc/awt/de/linearbits/jhc/JHCHeatmap.Point.html @@ -0,0 +1,248 @@ + + + + + +JHCHeatmap.Point (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Interface JHCHeatmap.Point

+
+
+
+
    +
  • +
    +
    Enclosing class:
    +
    JHCHeatmap
    +
    +
    +
    +
    public static interface JHCHeatmap.Point
    +
    This interface represents a point in the heatmap. It is defined by indices on the x- and y-axis where each + index corresponds to the according entry in the current scale.
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      doublegetValue() +
      Gets the value.
      +
      intgetX() +
      Gets the x.
      +
      intgetY() +
      Gets the y.
      +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getValue

        +
        double getValue()
        +
        Gets the value.
        +
        Returns:
        the value
        +
      • +
      + + + +
        +
      • +

        getX

        +
        int getX()
        +
        Gets the x.
        +
        Returns:
        the x
        +
      • +
      + + + +
        +
      • +

        getY

        +
        int getY()
        +
        Gets the y.
        +
        Returns:
        the y
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/awt/de/linearbits/jhc/JHCHeatmap.html b/doc/awt/de/linearbits/jhc/JHCHeatmap.html new file mode 100644 index 0000000..e02f71f --- /dev/null +++ b/doc/awt/de/linearbits/jhc/JHCHeatmap.html @@ -0,0 +1,384 @@ + + + + + +JHCHeatmap (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHCHeatmap

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • de.linearbits.jhc.JHCHeatmap
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public abstract class JHCHeatmap
    +extends java.lang.Object
    +
    This abstract class represents a (potentially scaled) heatmap that has been retrieved from an instance of JHCData
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      + + + + + + + + + + +
      Nested Classes 
      Modifier and TypeClass and Description
      static interface JHCHeatmap.Point +
      This interface represents a point in the heatmap.
      +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      JHCHeatmap() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      abstract intgetHeight() +
      Gets the height.
      +
      abstract doublegetMax() +
      Gets the max.
      +
      abstract doublegetMin() +
      Gets the min.
      +
      abstract intgetWidth() +
      Gets the width.
      +
      abstract java.lang.StringgetXLabel(int index) +
      Gets the x label.
      +
      abstract java.lang.StringgetYLabel(int index) +
      Gets the y label.
      +
      abstract java.util.Iterator<JHCHeatmap.Point>iterator() +
      Iterator.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHCHeatmap

        +
        public JHCHeatmap()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getHeight

        +
        public abstract int getHeight()
        +
        Gets the height.
        +
        Returns:
        the height
        +
      • +
      + + + +
        +
      • +

        getMax

        +
        public abstract double getMax()
        +
        Gets the max.
        +
        Returns:
        the max
        +
      • +
      + + + +
        +
      • +

        getMin

        +
        public abstract double getMin()
        +
        Gets the min.
        +
        Returns:
        the min
        +
      • +
      + + + +
        +
      • +

        getWidth

        +
        public abstract int getWidth()
        +
        Gets the width.
        +
        Returns:
        the width
        +
      • +
      + + + +
        +
      • +

        getXLabel

        +
        public abstract java.lang.String getXLabel(int index)
        +
        Gets the x label.
        +
        Parameters:
        index - the index
        +
        Returns:
        the x label
        +
      • +
      + + + +
        +
      • +

        getYLabel

        +
        public abstract java.lang.String getYLabel(int index)
        +
        Gets the y label.
        +
        Parameters:
        index - the index
        +
        Returns:
        the y label
        +
      • +
      + + + +
        +
      • +

        iterator

        +
        public abstract java.util.Iterator<JHCHeatmap.Point> iterator()
        +
        Iterator.
        +
        Returns:
        the iterator
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/awt/de/linearbits/jhc/JHCLayout.html b/doc/awt/de/linearbits/jhc/JHCLayout.html new file mode 100644 index 0000000..ad9bbea --- /dev/null +++ b/doc/awt/de/linearbits/jhc/JHCLayout.html @@ -0,0 +1,432 @@ + + + + + +JHCLayout (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHCLayout

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • de.linearbits.jhc.JHCLayout
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class JHCLayout
    +extends java.lang.Object
    +
    This class represents the layout that is to be used when displaying the heatmap
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      JHCLayout() +
      Instantiates a new layout.
      +
      JHCLayout(boolean xTickRotate, + int xTickSpace, + boolean yTickRotate, + int yTickSpace) +
      Instantiates a new layout.
      +
      JHCLayout(int legendWidth, + int largeTickLength, + int smallTickLength) +
      Instantiates a new layout.
      +
      JHCLayout(int legendWidth, + int largeTickLength, + int smallTickLength, + boolean xTickRotate, + int xTickSpace, + boolean yTickRotate, + int yTickSpace) +
      Instantiates a new layout.
      +
      JHCLayout(int offsetLeft, + int offsetRight, + int offsetTop, + int offsetBottom, + int offsetCenter) +
      Instantiates a new layout.
      +
      JHCLayout(int offsetLeft, + int offsetRight, + int offsetTop, + int offsetBottom, + int offsetCenter, + boolean xTickRotate, + int xTickSpace, + boolean yTickRotate, + int yTickSpace) +
      Instantiates a new layout.
      +
      JHCLayout(int offsetLeft, + int offsetRight, + int offsetTop, + int offsetBottom, + int offsetCenter, + int minimalTextWidth, + int legendWidth, + int largeTickLength, + int smallTickLength, + int textOffset) +
      Instantiates a new layout.
      +
      JHCLayout(int offsetLeft, + int offsetRight, + int offsetTop, + int offsetBottom, + int offsetCenter, + int minimalTextWidth, + int legendWidth, + int largeTickLength, + int smallTickLength, + int textOffset, + boolean xTickRotate, + int xTickSpace, + boolean yTickRotate, + int yTickSpace) +
      Instantiates a new layout.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHCLayout

        +
        public JHCLayout()
        +
        Instantiates a new layout.
        +
      • +
      + + + +
        +
      • +

        JHCLayout

        +
        public JHCLayout(boolean xTickRotate,
        +         int xTickSpace,
        +         boolean yTickRotate,
        +         int yTickSpace)
        +
        Instantiates a new layout.
        +
        Parameters:
        xTickRotate - the x tick rotate
        xTickSpace - the x tick space
        yTickRotate - the y tick rotate
        yTickSpace - the y tick space
        +
      • +
      + + + +
        +
      • +

        JHCLayout

        +
        public JHCLayout(int legendWidth,
        +         int largeTickLength,
        +         int smallTickLength)
        +
        Instantiates a new layout.
        +
        Parameters:
        legendWidth - the legend width
        largeTickLength - the large tick length
        smallTickLength - the small tick length
        +
      • +
      + + + +
        +
      • +

        JHCLayout

        +
        public JHCLayout(int legendWidth,
        +         int largeTickLength,
        +         int smallTickLength,
        +         boolean xTickRotate,
        +         int xTickSpace,
        +         boolean yTickRotate,
        +         int yTickSpace)
        +
        Instantiates a new layout.
        +
        Parameters:
        legendWidth - the legend width
        largeTickLength - the large tick length
        smallTickLength - the small tick length
        xTickRotate - the x tick rotate
        xTickSpace - the x tick space
        yTickRotate - the y tick rotate
        yTickSpace - the y tick space
        +
      • +
      + + + +
        +
      • +

        JHCLayout

        +
        public JHCLayout(int offsetLeft,
        +         int offsetRight,
        +         int offsetTop,
        +         int offsetBottom,
        +         int offsetCenter)
        +
        Instantiates a new layout.
        +
        Parameters:
        offsetLeft - the offset left
        offsetRight - the offset right
        offsetTop - the offset top
        offsetBottom - the offset bottom
        offsetCenter - the offset center
        +
      • +
      + + + +
        +
      • +

        JHCLayout

        +
        public JHCLayout(int offsetLeft,
        +         int offsetRight,
        +         int offsetTop,
        +         int offsetBottom,
        +         int offsetCenter,
        +         boolean xTickRotate,
        +         int xTickSpace,
        +         boolean yTickRotate,
        +         int yTickSpace)
        +
        Instantiates a new layout.
        +
        Parameters:
        offsetLeft - the offset left
        offsetRight - the offset right
        offsetTop - the offset top
        offsetBottom - the offset bottom
        offsetCenter - the offset center
        xTickRotate - the x tick rotate
        xTickSpace - the x tick space
        yTickRotate - the y tick rotate
        yTickSpace - the y tick space
        +
      • +
      + + + +
        +
      • +

        JHCLayout

        +
        public JHCLayout(int offsetLeft,
        +         int offsetRight,
        +         int offsetTop,
        +         int offsetBottom,
        +         int offsetCenter,
        +         int minimalTextWidth,
        +         int legendWidth,
        +         int largeTickLength,
        +         int smallTickLength,
        +         int textOffset)
        +
        Instantiates a new layout.
        +
        Parameters:
        offsetLeft - the offset left
        offsetRight - the offset right
        offsetTop - the offset top
        offsetBottom - the offset bottom
        offsetCenter - the offset center
        minimalTextWidth - the minimal text width
        legendWidth - the legend width
        largeTickLength - the large tick length
        smallTickLength - the small tick length
        textOffset - the text offset
        +
      • +
      + + + +
        +
      • +

        JHCLayout

        +
        public JHCLayout(int offsetLeft,
        +         int offsetRight,
        +         int offsetTop,
        +         int offsetBottom,
        +         int offsetCenter,
        +         int minimalTextWidth,
        +         int legendWidth,
        +         int largeTickLength,
        +         int smallTickLength,
        +         int textOffset,
        +         boolean xTickRotate,
        +         int xTickSpace,
        +         boolean yTickRotate,
        +         int yTickSpace)
        +
        Instantiates a new layout.
        +
        Parameters:
        offsetLeft - the offset left
        offsetRight - the offset right
        offsetTop - the offset top
        offsetBottom - the offset bottom
        offsetCenter - the offset center
        minimalTextWidth - the minimal text width
        legendWidth - the legend width
        largeTickLength - the large tick length
        smallTickLength - the small tick length
        textOffset - the text offset
        xTickRotate - the x tick rotate
        xTickSpace - the x tick space
        yTickRotate - the y tick rotate
        yTickSpace - the y tick space
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/awt/de/linearbits/jhc/JHCScale.Date.html b/doc/awt/de/linearbits/jhc/JHCScale.Date.html new file mode 100644 index 0000000..5f2682a --- /dev/null +++ b/doc/awt/de/linearbits/jhc/JHCScale.Date.html @@ -0,0 +1,277 @@ + + + + + +JHCScale.Date (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHCScale.Date

+
+
+ +
+
    +
  • +
    +
    Enclosing class:
    +
    JHCScale<T>
    +
    +
    +
    +
    public static class JHCScale.Date
    +extends JHCScale<java.util.Date>
    +
    This class implements a data/time scale
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      JHCScale.Date(java.util.Date from, + java.util.Date to) +
      Instantiates a new scale date.
      +
      JHCScale.Date(java.util.Date from, + java.util.Date to, + java.text.DateFormat format) +
      Instantiates a new scale date.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHCScale.Date

        +
        public JHCScale.Date(java.util.Date from,
        +             java.util.Date to)
        +
        Instantiates a new scale date.
        +
        Parameters:
        from - the from
        to - the to
        +
      • +
      + + + +
        +
      • +

        JHCScale.Date

        +
        public JHCScale.Date(java.util.Date from,
        +             java.util.Date to,
        +             java.text.DateFormat format)
        +
        Instantiates a new scale date.
        +
        Parameters:
        from - the from
        to - the to
        format - the format
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/awt/de/linearbits/jhc/JHCScale.Decimal.html b/doc/awt/de/linearbits/jhc/JHCScale.Decimal.html new file mode 100644 index 0000000..e008651 --- /dev/null +++ b/doc/awt/de/linearbits/jhc/JHCScale.Decimal.html @@ -0,0 +1,277 @@ + + + + + +JHCScale.Decimal (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHCScale.Decimal

+
+
+ +
+
    +
  • +
    +
    Enclosing class:
    +
    JHCScale<T>
    +
    +
    +
    +
    public static class JHCScale.Decimal
    +extends JHCScale<java.lang.Double>
    +
    This class implements a decimal scale
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      JHCScale.Decimal(double from, + double to) +
      Instantiates a new scale decimal.
      +
      JHCScale.Decimal(double from, + double to, + java.text.DecimalFormat format) +
      Instantiates a new scale decimal.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHCScale.Decimal

        +
        public JHCScale.Decimal(double from,
        +                double to)
        +
        Instantiates a new scale decimal.
        +
        Parameters:
        from - the from
        to - the to
        +
      • +
      + + + +
        +
      • +

        JHCScale.Decimal

        +
        public JHCScale.Decimal(double from,
        +                double to,
        +                java.text.DecimalFormat format)
        +
        Instantiates a new scale decimal.
        +
        Parameters:
        from - the from
        to - the to
        format - the format
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/awt/de/linearbits/jhc/JHCScale.Integer.html b/doc/awt/de/linearbits/jhc/JHCScale.Integer.html new file mode 100644 index 0000000..9277cec --- /dev/null +++ b/doc/awt/de/linearbits/jhc/JHCScale.Integer.html @@ -0,0 +1,257 @@ + + + + + +JHCScale.Integer (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHCScale.Integer

+
+
+ +
+
    +
  • +
    +
    Enclosing class:
    +
    JHCScale<T>
    +
    +
    +
    +
    public static class JHCScale.Integer
    +extends JHCScale<java.lang.Integer>
    +
    This class implements an integer scale
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      JHCScale.Integer(int from, + int to) +
      Instantiates a new scale integer.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHCScale.Integer

        +
        public JHCScale.Integer(int from,
        +                int to)
        +
        Instantiates a new scale integer.
        +
        Parameters:
        from - the from
        to - the to
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/awt/de/linearbits/jhc/JHCScale.String.html b/doc/awt/de/linearbits/jhc/JHCScale.String.html new file mode 100644 index 0000000..1e52cce --- /dev/null +++ b/doc/awt/de/linearbits/jhc/JHCScale.String.html @@ -0,0 +1,255 @@ + + + + + +JHCScale.String (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHCScale.String

+
+
+ +
+
    +
  • +
    +
    Enclosing class:
    +
    JHCScale<T>
    +
    +
    +
    +
    public static class JHCScale.String
    +extends JHCScale<java.lang.String>
    +
    This class implements a string scale
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      JHCScale.String(java.lang.String[] values) +
      Instantiates a new scale string.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHCScale.String

        +
        public JHCScale.String(java.lang.String[] values)
        +
        Instantiates a new scale string.
        +
        Parameters:
        values - the values
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/awt/de/linearbits/jhc/JHCScale.html b/doc/awt/de/linearbits/jhc/JHCScale.html new file mode 100644 index 0000000..7eeb141 --- /dev/null +++ b/doc/awt/de/linearbits/jhc/JHCScale.html @@ -0,0 +1,271 @@ + + + + + +JHCScale (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHCScale<T>

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • de.linearbits.jhc.JHCScale<T>
    • +
    +
  • +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      Nested Classes 
      Modifier and TypeClass and Description
      static class JHCScale.Date +
      This class implements a data/time scale
      +
      static class JHCScale.Decimal +
      This class implements a decimal scale
      +
      static class JHCScale.Integer +
      This class implements an integer scale
      +
      static class JHCScale.String +
      This class implements a string scale
      +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      JHCScale() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHCScale

        +
        public JHCScale()
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/awt/de/linearbits/jhc/class-use/JHC.html b/doc/awt/de/linearbits/jhc/class-use/JHC.html new file mode 100644 index 0000000..7e1dda7 --- /dev/null +++ b/doc/awt/de/linearbits/jhc/class-use/JHC.html @@ -0,0 +1,113 @@ + + + + + +Uses of Class de.linearbits.jhc.JHC (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHC

+
+
No usage of de.linearbits.jhc.JHC
+ + + + + + diff --git a/doc/awt/de/linearbits/jhc/class-use/JHCConfiguration.html b/doc/awt/de/linearbits/jhc/class-use/JHCConfiguration.html new file mode 100644 index 0000000..76f5acb --- /dev/null +++ b/doc/awt/de/linearbits/jhc/class-use/JHCConfiguration.html @@ -0,0 +1,141 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCConfiguration (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCConfiguration

+
+
+ +
+ + + + + + diff --git a/doc/awt/de/linearbits/jhc/class-use/JHCData.html b/doc/awt/de/linearbits/jhc/class-use/JHCData.html new file mode 100644 index 0000000..220206d --- /dev/null +++ b/doc/awt/de/linearbits/jhc/class-use/JHCData.html @@ -0,0 +1,271 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCData (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCData

+
+
+ +
+ + + + + + diff --git a/doc/awt/de/linearbits/jhc/class-use/JHCDataProvider.Orientation.html b/doc/awt/de/linearbits/jhc/class-use/JHCDataProvider.Orientation.html new file mode 100644 index 0000000..2bbf9a0 --- /dev/null +++ b/doc/awt/de/linearbits/jhc/class-use/JHCDataProvider.Orientation.html @@ -0,0 +1,207 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCDataProvider.Orientation (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCDataProvider.Orientation

+
+
+ +
+ + + + + + diff --git a/doc/awt/de/linearbits/jhc/class-use/JHCDataProvider.html b/doc/awt/de/linearbits/jhc/class-use/JHCDataProvider.html new file mode 100644 index 0000000..0462dae --- /dev/null +++ b/doc/awt/de/linearbits/jhc/class-use/JHCDataProvider.html @@ -0,0 +1,140 @@ + + + + + +Uses of Interface de.linearbits.jhc.JHCDataProvider (JHC API Documentation) + + + + + + + + + + +
+

Uses of Interface
de.linearbits.jhc.JHCDataProvider

+
+
+ +
+ + + + + + diff --git a/doc/awt/de/linearbits/jhc/class-use/JHCGradient.html b/doc/awt/de/linearbits/jhc/class-use/JHCGradient.html new file mode 100644 index 0000000..2efa1f2 --- /dev/null +++ b/doc/awt/de/linearbits/jhc/class-use/JHCGradient.html @@ -0,0 +1,266 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCGradient (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCGradient

+
+
+ +
+ + + + + + diff --git a/doc/awt/de/linearbits/jhc/class-use/JHCHeatmap.Point.html b/doc/awt/de/linearbits/jhc/class-use/JHCHeatmap.Point.html new file mode 100644 index 0000000..c1a0182 --- /dev/null +++ b/doc/awt/de/linearbits/jhc/class-use/JHCHeatmap.Point.html @@ -0,0 +1,140 @@ + + + + + +Uses of Interface de.linearbits.jhc.JHCHeatmap.Point (JHC API Documentation) + + + + + + + + + + +
+

Uses of Interface
de.linearbits.jhc.JHCHeatmap.Point

+
+
+ +
+ + + + + + diff --git a/doc/awt/de/linearbits/jhc/class-use/JHCHeatmap.html b/doc/awt/de/linearbits/jhc/class-use/JHCHeatmap.html new file mode 100644 index 0000000..b732e54 --- /dev/null +++ b/doc/awt/de/linearbits/jhc/class-use/JHCHeatmap.html @@ -0,0 +1,141 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCHeatmap (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCHeatmap

+
+
+ +
+ + + + + + diff --git a/doc/awt/de/linearbits/jhc/class-use/JHCLayout.html b/doc/awt/de/linearbits/jhc/class-use/JHCLayout.html new file mode 100644 index 0000000..051b219 --- /dev/null +++ b/doc/awt/de/linearbits/jhc/class-use/JHCLayout.html @@ -0,0 +1,151 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCLayout (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCLayout

+
+
+ +
+ + + + + + diff --git a/doc/awt/de/linearbits/jhc/class-use/JHCScale.Date.html b/doc/awt/de/linearbits/jhc/class-use/JHCScale.Date.html new file mode 100644 index 0000000..47a1ec7 --- /dev/null +++ b/doc/awt/de/linearbits/jhc/class-use/JHCScale.Date.html @@ -0,0 +1,113 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCScale.Date (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCScale.Date

+
+
No usage of de.linearbits.jhc.JHCScale.Date
+ + + + + + diff --git a/doc/awt/de/linearbits/jhc/class-use/JHCScale.Decimal.html b/doc/awt/de/linearbits/jhc/class-use/JHCScale.Decimal.html new file mode 100644 index 0000000..4f963f9 --- /dev/null +++ b/doc/awt/de/linearbits/jhc/class-use/JHCScale.Decimal.html @@ -0,0 +1,113 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCScale.Decimal (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCScale.Decimal

+
+
No usage of de.linearbits.jhc.JHCScale.Decimal
+ + + + + + diff --git a/doc/awt/de/linearbits/jhc/class-use/JHCScale.Integer.html b/doc/awt/de/linearbits/jhc/class-use/JHCScale.Integer.html new file mode 100644 index 0000000..69e54b0 --- /dev/null +++ b/doc/awt/de/linearbits/jhc/class-use/JHCScale.Integer.html @@ -0,0 +1,113 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCScale.Integer (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCScale.Integer

+
+
No usage of de.linearbits.jhc.JHCScale.Integer
+ + + + + + diff --git a/doc/awt/de/linearbits/jhc/class-use/JHCScale.String.html b/doc/awt/de/linearbits/jhc/class-use/JHCScale.String.html new file mode 100644 index 0000000..8fe2a8b --- /dev/null +++ b/doc/awt/de/linearbits/jhc/class-use/JHCScale.String.html @@ -0,0 +1,113 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCScale.String (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCScale.String

+
+
No usage of de.linearbits.jhc.JHCScale.String
+ + + + + + diff --git a/doc/awt/de/linearbits/jhc/class-use/JHCScale.html b/doc/awt/de/linearbits/jhc/class-use/JHCScale.html new file mode 100644 index 0000000..918f897 --- /dev/null +++ b/doc/awt/de/linearbits/jhc/class-use/JHCScale.html @@ -0,0 +1,358 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCScale (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCScale

+
+
+ +
+ + + + + + diff --git a/doc/awt/de/linearbits/jhc/package-frame.html b/doc/awt/de/linearbits/jhc/package-frame.html new file mode 100644 index 0000000..7c8bcd2 --- /dev/null +++ b/doc/awt/de/linearbits/jhc/package-frame.html @@ -0,0 +1,38 @@ + + + + + +de.linearbits.jhc (JHC API Documentation) + + + + +

de.linearbits.jhc

+ + + diff --git a/doc/awt/de/linearbits/jhc/package-summary.html b/doc/awt/de/linearbits/jhc/package-summary.html new file mode 100644 index 0000000..8211c8d --- /dev/null +++ b/doc/awt/de/linearbits/jhc/package-summary.html @@ -0,0 +1,242 @@ + + + + + +de.linearbits.jhc (JHC API Documentation) + + + + + + + + + + +
+

Package de.linearbits.jhc

+
+
This package provides a heatmap control for AWT
+
+

See: Description

+
+
+
    +
  • + + + + + + + + + + + + + + + + +
    Interface Summary 
    InterfaceDescription
    JHCDataProvider +
    This interface can be implemented to convert data into a representation suitable for the widget
    +
    JHCHeatmap.Point +
    This interface represents a point in the heatmap.
    +
    +
  • +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    JHC +
    This class provides a heatmap control for AWT
    +
    JHCConfiguration +
    This class allows to configure how the heatmap is displayed.
    +
    JHCData +
    This class defines the abstract base type for data that can be handled by the widget/control.
    +
    JHCGradient +
    The class implements gradients for the heatmap.
    +
    JHCHeatmap +
    This abstract class represents a (potentially scaled) heatmap that has been retrieved from an instance of JHCData
    +
    JHCLayout +
    This class represents the layout that is to be used when displaying the heatmap
    +
    JHCScale<T> +
    This class provides an abstract type for scales
    +
    JHCScale.Date +
    This class implements a data/time scale
    +
    JHCScale.Decimal +
    This class implements a decimal scale
    +
    JHCScale.Integer +
    This class implements an integer scale
    +
    JHCScale.String +
    This class implements a string scale
    +
    +
  • +
  • + + + + + + + + + + + + +
    Enum Summary 
    EnumDescription
    JHCDataProvider.Orientation +
    Data orientation
    +
    +
  • +
+ + + +

Package de.linearbits.jhc Description

+
This package provides a heatmap control for AWT
+
+ + + + + + diff --git a/doc/awt/de/linearbits/jhc/package-tree.html b/doc/awt/de/linearbits/jhc/package-tree.html new file mode 100644 index 0000000..d1ae662 --- /dev/null +++ b/doc/awt/de/linearbits/jhc/package-tree.html @@ -0,0 +1,164 @@ + + + + + +de.linearbits.jhc Class Hierarchy (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
+

Hierarchy For Package de.linearbits.jhc

+
+
+

Class Hierarchy

+ +

Interface Hierarchy

+ +

Enum Hierarchy

+
    +
  • java.lang.Object + +
  • +
+
+ +
+ + + + + +
+ + + + diff --git a/doc/awt/de/linearbits/jhc/package-use.html b/doc/awt/de/linearbits/jhc/package-use.html new file mode 100644 index 0000000..2c09ba5 --- /dev/null +++ b/doc/awt/de/linearbits/jhc/package-use.html @@ -0,0 +1,173 @@ + + + + + +Uses of Package de.linearbits.jhc (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Package
de.linearbits.jhc

+
+
+
    +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Classes in de.linearbits.jhc used by de.linearbits.jhc 
    Class and Description
    JHCConfiguration +
    This class allows to configure how the heatmap is displayed.
    +
    JHCData +
    This class defines the abstract base type for data that can be handled by the widget/control.
    +
    JHCDataProvider +
    This interface can be implemented to convert data into a representation suitable for the widget
    +
    JHCDataProvider.Orientation +
    Data orientation
    +
    JHCGradient +
    The class implements gradients for the heatmap.
    +
    JHCHeatmap +
    This abstract class represents a (potentially scaled) heatmap that has been retrieved from an instance of JHCData
    +
    JHCHeatmap.Point +
    This interface represents a point in the heatmap.
    +
    JHCLayout +
    This class represents the layout that is to be used when displaying the heatmap
    +
    JHCScale +
    This class provides an abstract type for scales
    +
    +
  • +
+
+ +
+ + + + + +
+ + + + diff --git a/doc/awt/deprecated-list.html b/doc/awt/deprecated-list.html new file mode 100644 index 0000000..6970e84 --- /dev/null +++ b/doc/awt/deprecated-list.html @@ -0,0 +1,113 @@ + + + + + +Deprecated List (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
+

Deprecated API

+

Contents

+
+ +
+ + + + + +
+ + + + diff --git a/doc/awt/help-doc.html b/doc/awt/help-doc.html new file mode 100644 index 0000000..79a181e --- /dev/null +++ b/doc/awt/help-doc.html @@ -0,0 +1,214 @@ + + + + + +API Help (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
+

How This API Document Is Organized

+
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+
    +
  • +

    Package

    +

    Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:

    +
      +
    • Interfaces (italic)
    • +
    • Classes
    • +
    • Enums
    • +
    • Exceptions
    • +
    • Errors
    • +
    • Annotation Types
    • +
    +
  • +
  • +

    Class/Interface

    +

    Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

    +
      +
    • Class inheritance diagram
    • +
    • Direct Subclasses
    • +
    • All Known Subinterfaces
    • +
    • All Known Implementing Classes
    • +
    • Class/interface declaration
    • +
    • Class/interface description
    • +
    +
      +
    • Nested Class Summary
    • +
    • Field Summary
    • +
    • Constructor Summary
    • +
    • Method Summary
    • +
    +
      +
    • Field Detail
    • +
    • Constructor Detail
    • +
    • Method Detail
    • +
    +

    Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

    +
  • +
  • +

    Annotation Type

    +

    Each annotation type has its own separate page with the following sections:

    +
      +
    • Annotation Type declaration
    • +
    • Annotation Type description
    • +
    • Required Element Summary
    • +
    • Optional Element Summary
    • +
    • Element Detail
    • +
    +
  • +
  • +

    Enum

    +

    Each enum has its own separate page with the following sections:

    +
      +
    • Enum declaration
    • +
    • Enum description
    • +
    • Enum Constant Summary
    • +
    • Enum Constant Detail
    • +
    +
  • +
  • +

    Use

    +

    Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.

    +
  • +
  • +

    Tree (Class Hierarchy)

    +

    There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.

    +
      +
    • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
    • +
    • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
    • +
    +
  • +
  • +

    Deprecated API

    +

    The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

    +
  • +
  • +

    Index

    +

    The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

    +
  • +
  • +

    Prev/Next

    +

    These links take you to the next or previous class, interface, package, or related page.

    +
  • +
  • +

    Frames/No Frames

    +

    These links show and hide the HTML frames. All pages are available with or without frames.

    +
  • +
  • +

    All Classes

    +

    The All Classes link shows all classes and interfaces except non-static nested types.

    +
  • +
  • +

    Serialized Form

    +

    Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

    +
  • +
  • +

    Constant Field Values

    +

    The Constant Field Values page lists the static final fields and their values.

    +
  • +
+This help file applies to API documentation generated using the standard doclet.
+ +
+ + + + + +
+ + + + diff --git a/doc/awt/index-files/index-1.html b/doc/awt/index-files/index-1.html new file mode 100644 index 0000000..c71e831 --- /dev/null +++ b/doc/awt/index-files/index-1.html @@ -0,0 +1,180 @@ + + + + + +C-Index (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
C D G I J S V  + + +

C

+
+
create(double[][]) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object.
+
+
create(double[][], JHCScale<?>, JHCScale<?>) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object.
+
+
create(double[][], JHCDataProvider.Orientation, JHCScale<?>, JHCScale<?>) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object
+
+
create(char[][]) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object.
+
+
create(char[][], JHCScale<?>, JHCScale<?>) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object.
+
+
create(char[][], JHCDataProvider.Orientation, JHCScale<?>, JHCScale<?>) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object
+
+
create(int[][]) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object.
+
+
create(int[][], JHCScale<?>, JHCScale<?>) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object.
+
+
create(int[][], JHCDataProvider.Orientation, JHCScale<?>, JHCScale<?>) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object
+
+
create(long[][]) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object.
+
+
create(long[][], JHCScale<?>, JHCScale<?>) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object.
+
+
create(long[][], JHCDataProvider.Orientation, JHCScale<?>, JHCScale<?>) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object
+
+
create(float[][]) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object.
+
+
create(float[][], JHCScale<?>, JHCScale<?>) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object.
+
+
create(float[][], JHCDataProvider.Orientation, JHCScale<?>, JHCScale<?>) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object
+
+
create(JHCDataProvider) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates the.
+
+
+C D G I J S V 
+ +
+ + + + + +
+ + + + diff --git a/doc/awt/index-files/index-2.html b/doc/awt/index-files/index-2.html new file mode 100644 index 0000000..402af96 --- /dev/null +++ b/doc/awt/index-files/index-2.html @@ -0,0 +1,120 @@ + + + + + +D-Index (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
C D G I J S V  + + +

D

+
+
de.linearbits.jhc - package de.linearbits.jhc
+
+
This package provides a heatmap control for AWT
+
+
+C D G I J S V 
+ +
+ + + + + +
+ + + + diff --git a/doc/awt/index-files/index-3.html b/doc/awt/index-files/index-3.html new file mode 100644 index 0000000..99167f1 --- /dev/null +++ b/doc/awt/index-files/index-3.html @@ -0,0 +1,248 @@ + + + + + +G-Index (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
C D G I J S V  + + +

G

+
+
get(int, int) - Method in interface de.linearbits.jhc.JHCDataProvider
+
+
Returns the.
+
+
getHeatmap(int, int) - Method in class de.linearbits.jhc.JHCData
+
+
Gets the heat.
+
+
getHeight() - Method in class de.linearbits.jhc.JHCData
+
+
Gets the original height of the data
+
+
getHeight() - Method in interface de.linearbits.jhc.JHCDataProvider
+
+
Gets the height.
+
+
getHeight() - Method in class de.linearbits.jhc.JHCHeatmap
+
+
Gets the height.
+
+
getMax() - Method in class de.linearbits.jhc.JHCHeatmap
+
+
Gets the max.
+
+
getMin() - Method in class de.linearbits.jhc.JHCHeatmap
+
+
Gets the min.
+
+
getOrientation() - Method in interface de.linearbits.jhc.JHCDataProvider
+
+
Gets the orientation.
+
+
getValue() - Method in interface de.linearbits.jhc.JHCHeatmap.Point
+
+
Gets the value.
+
+
getWidth() - Method in class de.linearbits.jhc.JHCData
+
+
Gets the original width of the data
+
+
getWidth() - Method in interface de.linearbits.jhc.JHCDataProvider
+
+
Gets the width.
+
+
getWidth() - Method in class de.linearbits.jhc.JHCHeatmap
+
+
Gets the width.
+
+
getX() - Method in interface de.linearbits.jhc.JHCHeatmap.Point
+
+
Gets the x.
+
+
getXLabel(int) - Method in class de.linearbits.jhc.JHCHeatmap
+
+
Gets the x label.
+
+
getXScale() - Method in interface de.linearbits.jhc.JHCDataProvider
+
+
Gets the x labels.
+
+
getY() - Method in interface de.linearbits.jhc.JHCHeatmap.Point
+
+
Gets the y.
+
+
getYLabel(int) - Method in class de.linearbits.jhc.JHCHeatmap
+
+
Gets the y label.
+
+
getYScale() - Method in interface de.linearbits.jhc.JHCDataProvider
+
+
Gets the y labels.
+
+
GRADIENT_BLACKBODY - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BLACK, RED, YELLOW, WHITE, LIGHT_BLUE
+
+
GRADIENT_BLUERED - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BRIGHT_BLUE, PURPLE, BRIGHT_RED
+
+
GRADIENT_EARTH - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BLUE, GREEN, YELLOW, BROWN, TAN, WHITE
+
+
GRADIENT_ELECTRIC - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BLACK, PURPLE, ORANGE, YELLOW, TAN, WHITE
+
+
GRADIENT_GRAYS - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BLACK, LIGHT_GRAY
+
+
GRADIENT_GRAYSCALE - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BLACK, GRAY, WHITE
+
+
GRADIENT_GREENS - Static variable in class de.linearbits.jhc.JHCGradient
+
+
DARK_GREEN, LIGHT_GREEN
+
+
GRADIENT_HEAT - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BLUE, CYAN, GREEN, YELLOW, ORANGE, RED
+
+
GRADIENT_HOT - Static variable in class de.linearbits.jhc.JHCGradient
+
+
TAN, YELLOW, RED, BLACK
+
+
GRADIENT_JET - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BLUE, LIGHT_BLUE, GREEN, YELLOW, ORANGE, RED
+
+
GRADIENT_PICNIC - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BLUE, LIGHT_BLUE, WHITE, PINK
+
+
GRADIENT_PORTLAND - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BLUE, GREEN, YELLOW, ORANGE, RED
+
+
GRADIENT_RDBU - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BLUE, RED
+
+
GRADIENT_YIGNBN - Static variable in class de.linearbits.jhc.JHCGradient
+
+
WHITE, GREEN
+
+
GRADIENT_YIORRD - Static variable in class de.linearbits.jhc.JHCGradient
+
+
RED, ORANGE, GOLD, TAN, WHITE
+
+
+C D G I J S V 
+ +
+ + + + + +
+ + + + diff --git a/doc/awt/index-files/index-4.html b/doc/awt/index-files/index-4.html new file mode 100644 index 0000000..208b490 --- /dev/null +++ b/doc/awt/index-files/index-4.html @@ -0,0 +1,120 @@ + + + + + +I-Index (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
C D G I J S V  + + +

I

+
+
iterator() - Method in class de.linearbits.jhc.JHCHeatmap
+
+
Iterator.
+
+
+C D G I J S V 
+ +
+ + + + + +
+ + + + diff --git a/doc/awt/index-files/index-5.html b/doc/awt/index-files/index-5.html new file mode 100644 index 0000000..19ff1e6 --- /dev/null +++ b/doc/awt/index-files/index-5.html @@ -0,0 +1,262 @@ + + + + + +J-Index (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
C D G I J S V  + + +

J

+
+
JHC - Class in de.linearbits.jhc
+
+
This class provides a heatmap control for AWT
+
+
JHC() - Constructor for class de.linearbits.jhc.JHC
+
+
Creates a new instance
+
+
JHCConfiguration - Class in de.linearbits.jhc
+
+
This class allows to configure how the heatmap is displayed.
+
+
JHCConfiguration(String, String, int, int, JHCGradient) - Constructor for class de.linearbits.jhc.JHCConfiguration
+
+
Instantiates a new configuration.
+
+
JHCConfiguration(String, String, int, int, JHCGradient, JHCLayout) - Constructor for class de.linearbits.jhc.JHCConfiguration
+
+
Instantiates a new configuration.
+
+
JHCConfiguration(String, String, JHCGradient) - Constructor for class de.linearbits.jhc.JHCConfiguration
+
+
Instantiates a new configuration.
+
+
JHCConfiguration(String, String, JHCGradient, JHCLayout) - Constructor for class de.linearbits.jhc.JHCConfiguration
+
+
Instantiates a new configuration.
+
+
JHCData - Class in de.linearbits.jhc
+
+
This class defines the abstract base type for data that can be handled by the widget/control.
+
+
JHCData() - Constructor for class de.linearbits.jhc.JHCData
+
 
+
JHCDataProvider - Interface in de.linearbits.jhc
+
+
This interface can be implemented to convert data into a representation suitable for the widget
+
+
JHCDataProvider.Orientation - Enum in de.linearbits.jhc
+
+
Data orientation
+
+
JHCGradient - Class in de.linearbits.jhc
+
+
The class implements gradients for the heatmap.
+
+
JHCGradient(Color[]) - Constructor for class de.linearbits.jhc.JHCGradient
+
+
Instantiates a new gradient.
+
+
JHCGradient(Color[], int) - Constructor for class de.linearbits.jhc.JHCGradient
+
+
Instantiates a new gradient.
+
+
JHCHeatmap - Class in de.linearbits.jhc
+
+
This abstract class represents a (potentially scaled) heatmap that has been retrieved from an instance of JHCData
+
+
JHCHeatmap() - Constructor for class de.linearbits.jhc.JHCHeatmap
+
 
+
JHCHeatmap.Point - Interface in de.linearbits.jhc
+
+
This interface represents a point in the heatmap.
+
+
JHCLayout - Class in de.linearbits.jhc
+
+
This class represents the layout that is to be used when displaying the heatmap
+
+
JHCLayout() - Constructor for class de.linearbits.jhc.JHCLayout
+
+
Instantiates a new layout.
+
+
JHCLayout(boolean, int, boolean, int) - Constructor for class de.linearbits.jhc.JHCLayout
+
+
Instantiates a new layout.
+
+
JHCLayout(int, int, int) - Constructor for class de.linearbits.jhc.JHCLayout
+
+
Instantiates a new layout.
+
+
JHCLayout(int, int, int, boolean, int, boolean, int) - Constructor for class de.linearbits.jhc.JHCLayout
+
+
Instantiates a new layout.
+
+
JHCLayout(int, int, int, int, int) - Constructor for class de.linearbits.jhc.JHCLayout
+
+
Instantiates a new layout.
+
+
JHCLayout(int, int, int, int, int, boolean, int, boolean, int) - Constructor for class de.linearbits.jhc.JHCLayout
+
+
Instantiates a new layout.
+
+
JHCLayout(int, int, int, int, int, int, int, int, int, int) - Constructor for class de.linearbits.jhc.JHCLayout
+
+
Instantiates a new layout.
+
+
JHCLayout(int, int, int, int, int, int, int, int, int, int, boolean, int, boolean, int) - Constructor for class de.linearbits.jhc.JHCLayout
+
+
Instantiates a new layout.
+
+
JHCScale<T> - Class in de.linearbits.jhc
+
+
This class provides an abstract type for scales
+
+
JHCScale() - Constructor for class de.linearbits.jhc.JHCScale
+
 
+
JHCScale.Date - Class in de.linearbits.jhc
+
+
This class implements a data/time scale
+
+
JHCScale.Date(Date, Date) - Constructor for class de.linearbits.jhc.JHCScale.Date
+
+
Instantiates a new scale date.
+
+
JHCScale.Date(Date, Date, DateFormat) - Constructor for class de.linearbits.jhc.JHCScale.Date
+
+
Instantiates a new scale date.
+
+
JHCScale.Decimal - Class in de.linearbits.jhc
+
+
This class implements a decimal scale
+
+
JHCScale.Decimal(double, double) - Constructor for class de.linearbits.jhc.JHCScale.Decimal
+
+
Instantiates a new scale decimal.
+
+
JHCScale.Decimal(double, double, DecimalFormat) - Constructor for class de.linearbits.jhc.JHCScale.Decimal
+
+
Instantiates a new scale decimal.
+
+
JHCScale.Integer - Class in de.linearbits.jhc
+
+
This class implements an integer scale
+
+
JHCScale.Integer(int, int) - Constructor for class de.linearbits.jhc.JHCScale.Integer
+
+
Instantiates a new scale integer.
+
+
JHCScale.String - Class in de.linearbits.jhc
+
+
This class implements a string scale
+
+
JHCScale.String(String[]) - Constructor for class de.linearbits.jhc.JHCScale.String
+
+
Instantiates a new scale string.
+
+
+C D G I J S V 
+ +
+ + + + + +
+ + + + diff --git a/doc/awt/index-files/index-6.html b/doc/awt/index-files/index-6.html new file mode 100644 index 0000000..e54304e --- /dev/null +++ b/doc/awt/index-files/index-6.html @@ -0,0 +1,128 @@ + + + + + +S-Index (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
C D G I J S V  + + +

S

+
+
setBackground(Color) - Method in class de.linearbits.jhc.JHC
+
+
Sets the background color
+
+
setData(JHCData, JHCConfiguration) - Method in class de.linearbits.jhc.JHC
+
+
Updates the data displayed by this control
+
+
setFont(Font) - Method in class de.linearbits.jhc.JHC
+
+
Sets the font
+
+
+C D G I J S V 
+ +
+ + + + + +
+ + + + diff --git a/doc/awt/index-files/index-7.html b/doc/awt/index-files/index-7.html new file mode 100644 index 0000000..95b66ea --- /dev/null +++ b/doc/awt/index-files/index-7.html @@ -0,0 +1,125 @@ + + + + + +V-Index (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
C D G I J S V  + + +

V

+
+
valueOf(String) - Static method in enum de.linearbits.jhc.JHCDataProvider.Orientation
+
+
Returns the enum constant of this type with the specified name.
+
+
values() - Static method in enum de.linearbits.jhc.JHCDataProvider.Orientation
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
+C D G I J S V 
+ +
+ + + + + +
+ + + + diff --git a/doc/awt/index.html b/doc/awt/index.html new file mode 100644 index 0000000..cab7758 --- /dev/null +++ b/doc/awt/index.html @@ -0,0 +1,30 @@ + + + + + +JHC API Documentation + + + + + + +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<h2>Frame Alert</h2> +<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="de/linearbits/jhc/package-summary.html">Non-frame version</a>.</p> + + + diff --git a/doc/awt/overview-tree.html b/doc/awt/overview-tree.html new file mode 100644 index 0000000..512ba97 --- /dev/null +++ b/doc/awt/overview-tree.html @@ -0,0 +1,168 @@ + + + + + +Class Hierarchy (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
+

Hierarchy For All Packages

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +

Interface Hierarchy

+ +

Enum Hierarchy

+
    +
  • java.lang.Object + +
  • +
+
+ +
+ + + + + +
+ + + + diff --git a/doc/awt/package-list b/doc/awt/package-list new file mode 100644 index 0000000..fa1bfd4 --- /dev/null +++ b/doc/awt/package-list @@ -0,0 +1 @@ +de.linearbits.jhc diff --git a/doc/awt/resources/background.gif b/doc/awt/resources/background.gif new file mode 100644 index 0000000..f471940 Binary files /dev/null and b/doc/awt/resources/background.gif differ diff --git a/doc/awt/resources/tab.gif b/doc/awt/resources/tab.gif new file mode 100644 index 0000000..1a73a83 Binary files /dev/null and b/doc/awt/resources/tab.gif differ diff --git a/doc/awt/resources/titlebar.gif b/doc/awt/resources/titlebar.gif new file mode 100644 index 0000000..17443b3 Binary files /dev/null and b/doc/awt/resources/titlebar.gif differ diff --git a/doc/awt/resources/titlebar_end.gif b/doc/awt/resources/titlebar_end.gif new file mode 100644 index 0000000..3ad78d4 Binary files /dev/null and b/doc/awt/resources/titlebar_end.gif differ diff --git a/doc/awt/serialized-form.html b/doc/awt/serialized-form.html new file mode 100644 index 0000000..812ac87 --- /dev/null +++ b/doc/awt/serialized-form.html @@ -0,0 +1,144 @@ + + + + + +Serialized Form (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
+

Serialized Form

+
+
+
    +
  • +

    Package de.linearbits.jhc

    +
      +
    • + + +

      Class de.linearbits.jhc.JHC extends javax.swing.JComponent implements Serializable

      +
      +
      serialVersionUID:
      +
      5159203595699492680L
      +
      +
        +
      • + + +

        Serialized Fields

        +
          +
        • +

          jhc

          +
          de.linearbits.jhc._JHC jhc
          +
          The real widget
          +
        • +
        +
      • +
      +
    • +
    +
  • +
+
+ +
+ + + + + +
+ + + + diff --git a/doc/awt/stylesheet.css b/doc/awt/stylesheet.css new file mode 100644 index 0000000..0aeaa97 --- /dev/null +++ b/doc/awt/stylesheet.css @@ -0,0 +1,474 @@ +/* Javadoc style sheet */ +/* +Overall document style +*/ +body { + background-color:#ffffff; + color:#353833; + font-family:Arial, Helvetica, sans-serif; + font-size:76%; + margin:0; +} +a:link, a:visited { + text-decoration:none; + color:#4c6b87; +} +a:hover, a:focus { + text-decoration:none; + color:#bb7a2a; +} +a:active { + text-decoration:none; + color:#4c6b87; +} +a[name] { + color:#353833; +} +a[name]:hover { + text-decoration:none; + color:#353833; +} +pre { + font-size:1.3em; +} +h1 { + font-size:1.8em; +} +h2 { + font-size:1.5em; +} +h3 { + font-size:1.4em; +} +h4 { + font-size:1.3em; +} +h5 { + font-size:1.2em; +} +h6 { + font-size:1.1em; +} +ul { + list-style-type:disc; +} +code, tt { + font-size:1.2em; +} +dt code { + font-size:1.2em; +} +table tr td dt code { + font-size:1.2em; + vertical-align:top; +} +sup { + font-size:.6em; +} +/* +Document title and Copyright styles +*/ +.clear { + clear:both; + height:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:.8em; + z-index:200; + margin-top:-7px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + background-image:url(resources/titlebar.gif); + background-position:left top; + background-repeat:no-repeat; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* +Navigation bar styles +*/ +.bar { + background-image:url(resources/background.gif); + background-repeat:repeat-x; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:1em; + margin:0; +} +.topNav { + background-image:url(resources/background.gif); + background-repeat:repeat-x; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; +} +.bottomNav { + margin-top:10px; + background-image:url(resources/background.gif); + background-repeat:repeat-x; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; +} +.subNav { + background-color:#dee3e9; + border-bottom:1px solid #9eadc0; + float:left; + width:100%; + overflow:hidden; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding:3px 6px; +} +ul.subNavList li{ + list-style:none; + float:left; + font-size:90%; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; +} +.navBarCell1Rev { + background-image:url(resources/tab.gif); + background-color:#a88834; + color:#FFFFFF; + margin: auto 5px; + border:1px solid #c9aa44; +} +/* +Page header and footer styles +*/ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexHeader { + margin:10px; + position:relative; +} +.indexHeader h1 { + font-size:1.3em; +} +.title { + color:#2c4557; + margin:10px 0; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 25px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:1.2em; +} +/* +Heading styles +*/ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border-top:1px solid #9eadc0; + border-bottom:1px solid #9eadc0; + margin:0 0 6px -8px; + padding:2px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border-top:1px solid #9eadc0; + border-bottom:1px solid #9eadc0; + margin:0 0 6px -8px; + padding:2px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* +Page layout container styles +*/ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:1.0em; +} +.indexContainer h2 { + font-size:1.1em; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:1.1em; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:10px 0 10px 20px; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* +List styles +*/ +ul.horizontal li { + display:inline; + font-size:0.9em; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:25px; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #9eadc0; + background-color:#f9f9f9; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:1px solid #9eadc0; + border-top:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; + border-bottom:1px solid #9eadc0; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* +Table styles +*/ +.contentContainer table, .classUseContainer table, .constantValuesContainer table { + border-bottom:1px solid #9eadc0; + width:100%; +} +.contentContainer ul li table, .classUseContainer ul li table, .constantValuesContainer ul li table { + width:100%; +} +.contentContainer .description table, .contentContainer .details table { + border-bottom:none; +} +.contentContainer ul li table th.colOne, .contentContainer ul li table th.colFirst, .contentContainer ul li table th.colLast, .classUseContainer ul li table th, .constantValuesContainer ul li table th, .contentContainer ul li table td.colOne, .contentContainer ul li table td.colFirst, .contentContainer ul li table td.colLast, .classUseContainer ul li table td, .constantValuesContainer ul li table td{ + vertical-align:top; + padding-right:20px; +} +.contentContainer ul li table th.colLast, .classUseContainer ul li table th.colLast,.constantValuesContainer ul li table th.colLast, +.contentContainer ul li table td.colLast, .classUseContainer ul li table td.colLast,.constantValuesContainer ul li table td.colLast, +.contentContainer ul li table th.colOne, .classUseContainer ul li table th.colOne, +.contentContainer ul li table td.colOne, .classUseContainer ul li table td.colOne { + padding-right:3px; +} +.overviewSummary caption, .packageSummary caption, .contentContainer ul.blockList li.blockList caption, .summary caption, .classUseContainer caption, .constantValuesContainer caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#FFFFFF; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + margin:0px; +} +caption a:link, caption a:hover, caption a:active, caption a:visited { + color:#FFFFFF; +} +.overviewSummary caption span, .packageSummary caption span, .contentContainer ul.blockList li.blockList caption span, .summary caption span, .classUseContainer caption span, .constantValuesContainer caption span { + white-space:nowrap; + padding-top:8px; + padding-left:8px; + display:block; + float:left; + background-image:url(resources/titlebar.gif); + height:18px; +} +.overviewSummary .tabEnd, .packageSummary .tabEnd, .contentContainer ul.blockList li.blockList .tabEnd, .summary .tabEnd, .classUseContainer .tabEnd, .constantValuesContainer .tabEnd { + width:10px; + background-image:url(resources/titlebar_end.gif); + background-repeat:no-repeat; + background-position:top right; + position:relative; + float:left; +} +ul.blockList ul.blockList li.blockList table { + margin:0 0 12px 0px; + width:100%; +} +.tableSubHeadingColor { + background-color: #EEEEFF; +} +.altColor { + background-color:#eeeeef; +} +.rowColor { + background-color:#ffffff; +} +.overviewSummary td, .packageSummary td, .contentContainer ul.blockList li.blockList td, .summary td, .classUseContainer td, .constantValuesContainer td { + text-align:left; + padding:3px 3px 3px 7px; +} +th.colFirst, th.colLast, th.colOne, .constantValuesContainer th { + background:#dee3e9; + border-top:1px solid #9eadc0; + border-bottom:1px solid #9eadc0; + text-align:left; + padding:3px 3px 3px 7px; +} +td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { + font-weight:bold; +} +td.colFirst, th.colFirst { + border-left:1px solid #9eadc0; + white-space:nowrap; +} +td.colLast, th.colLast { + border-right:1px solid #9eadc0; +} +td.colOne, th.colOne { + border-right:1px solid #9eadc0; + border-left:1px solid #9eadc0; +} +table.overviewSummary { + padding:0px; + margin-left:0px; +} +table.overviewSummary td.colFirst, table.overviewSummary th.colFirst, +table.overviewSummary td.colOne, table.overviewSummary th.colOne { + width:25%; + vertical-align:middle; +} +table.packageSummary td.colFirst, table.overviewSummary th.colFirst { + width:25%; + vertical-align:middle; +} +/* +Content styles +*/ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} +/* +Formatting effect styles +*/ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:.9em; +} +.block { + display:block; + margin:3px 0 0 0; +} +.strong { + font-weight:bold; +} diff --git a/doc/swing/allclasses-frame.html b/doc/swing/allclasses-frame.html new file mode 100644 index 0000000..4dfa8fc --- /dev/null +++ b/doc/swing/allclasses-frame.html @@ -0,0 +1,31 @@ + + + + + +All Classes (JHC API Documentation) + + + + +

All Classes

+ + + diff --git a/doc/swing/allclasses-noframe.html b/doc/swing/allclasses-noframe.html new file mode 100644 index 0000000..2ddbca4 --- /dev/null +++ b/doc/swing/allclasses-noframe.html @@ -0,0 +1,31 @@ + + + + + +All Classes (JHC API Documentation) + + + + +

All Classes

+ + + diff --git a/doc/swing/constant-values.html b/doc/swing/constant-values.html new file mode 100644 index 0000000..626dd62 --- /dev/null +++ b/doc/swing/constant-values.html @@ -0,0 +1,113 @@ + + + + + +Constant Field Values (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
+

Constant Field Values

+

Contents

+
+ +
+ + + + + +
+ + + + diff --git a/doc/swing/de/linearbits/jhc/JHC.html b/doc/swing/de/linearbits/jhc/JHC.html new file mode 100644 index 0000000..8979fd2 --- /dev/null +++ b/doc/swing/de/linearbits/jhc/JHC.html @@ -0,0 +1,396 @@ + + + + + +JHC (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHC

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.awt.Component
    • +
    • +
        +
      • java.awt.Container
      • +
      • +
          +
        • javax.swing.JComponent
        • +
        • +
            +
          • de.linearbits.jhc.JHC
          • +
          +
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
    +
    +
    +
    +
    public class JHC
    +extends javax.swing.JComponent
    +
    This class provides a heatmap control for Swing
    +
    See Also:
    Serialized Form
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      +
        +
      • + + +

        Nested classes/interfaces inherited from class javax.swing.JComponent

        +javax.swing.JComponent.AccessibleJComponent
      • +
      +
        +
      • + + +

        Nested classes/interfaces inherited from class java.awt.Component

        +java.awt.Component.BaselineResizeBehavior
      • +
      +
    • +
    + +
      +
    • + + +

      Field Summary

      +
        +
      • + + +

        Fields inherited from class javax.swing.JComponent

        +TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
      • +
      +
        +
      • + + +

        Fields inherited from class java.awt.Component

        +BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
      • +
      +
        +
      • + + +

        Fields inherited from interface java.awt.image.ImageObserver

        +ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      JHC() +
      Creates a new instance
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      voidsetBackground(java.awt.Color bg) +
      Sets the background color
      +
      voidsetData(JHCData data, + JHCConfiguration config) +
      Updates the data displayed by this control
      +
      voidsetFont(java.awt.Font font) +
      Sets the font
      +
      +
        +
      • + + +

        Methods inherited from class javax.swing.JComponent

        +addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
      • +
      +
        +
      • + + +

        Methods inherited from class java.awt.Container

        +add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate
      • +
      +
        +
      • + + +

        Methods inherited from class java.awt.Component

        +action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHC

        +
        public JHC()
        +
        Creates a new instance
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        setData

        +
        public void setData(JHCData data,
        +           JHCConfiguration config)
        +
        Updates the data displayed by this control
        +
        Parameters:
        data -
        config -
        +
      • +
      + + + +
        +
      • +

        setFont

        +
        public void setFont(java.awt.Font font)
        +
        Sets the font
        +
        +
        Overrides:
        +
        setFont in class javax.swing.JComponent
        +
        +
      • +
      + + + +
        +
      • +

        setBackground

        +
        public void setBackground(java.awt.Color bg)
        +
        Sets the background color
        +
        +
        Overrides:
        +
        setBackground in class javax.swing.JComponent
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/swing/de/linearbits/jhc/JHCConfiguration.html b/doc/swing/de/linearbits/jhc/JHCConfiguration.html new file mode 100644 index 0000000..b8bba06 --- /dev/null +++ b/doc/swing/de/linearbits/jhc/JHCConfiguration.html @@ -0,0 +1,307 @@ + + + + + +JHCConfiguration (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHCConfiguration

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • de.linearbits.jhc.JHCConfiguration
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class JHCConfiguration
    +extends java.lang.Object
    +
    This class allows to configure how the heatmap is displayed.
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      JHCConfiguration(java.lang.String xLabel, + java.lang.String yLabel, + int maximalWidth, + int maximalHeight, + JHCGradient gradient) +
      Instantiates a new configuration.
      +
      JHCConfiguration(java.lang.String xLabel, + java.lang.String yLabel, + int maximalWidth, + int maximalHeight, + JHCGradient gradient, + JHCLayout layout) +
      Instantiates a new configuration.
      +
      JHCConfiguration(java.lang.String xLabel, + java.lang.String yLabel, + JHCGradient gradient) +
      Instantiates a new configuration.
      +
      JHCConfiguration(java.lang.String xLabel, + java.lang.String yLabel, + JHCGradient gradient, + JHCLayout layout) +
      Instantiates a new configuration.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHCConfiguration

        +
        public JHCConfiguration(java.lang.String xLabel,
        +                java.lang.String yLabel,
        +                int maximalWidth,
        +                int maximalHeight,
        +                JHCGradient gradient)
        +
        Instantiates a new configuration.
        +
        Parameters:
        xLabel - the x label
        yLabel - the y label
        maximalWidth - the maximal width
        maximalHeight - the maximal height
        gradient - the gradient
        +
      • +
      + + + +
        +
      • +

        JHCConfiguration

        +
        public JHCConfiguration(java.lang.String xLabel,
        +                java.lang.String yLabel,
        +                int maximalWidth,
        +                int maximalHeight,
        +                JHCGradient gradient,
        +                JHCLayout layout)
        +
        Instantiates a new configuration.
        +
        Parameters:
        xLabel - the x label
        yLabel - the y label
        maximalSize - the maximal size
        gradient - the gradient
        layout - the layout
        +
      • +
      + + + +
        +
      • +

        JHCConfiguration

        +
        public JHCConfiguration(java.lang.String xLabel,
        +                java.lang.String yLabel,
        +                JHCGradient gradient)
        +
        Instantiates a new configuration.
        +
        Parameters:
        xLabel - the x label
        yLabel - the y label
        gradient - the gradient
        +
      • +
      + + + +
        +
      • +

        JHCConfiguration

        +
        public JHCConfiguration(java.lang.String xLabel,
        +                java.lang.String yLabel,
        +                JHCGradient gradient,
        +                JHCLayout layout)
        +
        Instantiates a new configuration.
        +
        Parameters:
        xLabel - the x label
        yLabel - the y label
        gradient - the gradient
        layout - the layout
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/swing/de/linearbits/jhc/JHCData.html b/doc/swing/de/linearbits/jhc/JHCData.html new file mode 100644 index 0000000..f993567 --- /dev/null +++ b/doc/swing/de/linearbits/jhc/JHCData.html @@ -0,0 +1,636 @@ + + + + + +JHCData (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHCData

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • de.linearbits.jhc.JHCData
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public abstract class JHCData
    +extends java.lang.Object
    +
    This class defines the abstract base type for data that can be handled by the widget/control. Moreover, it offers + static methods for deriving instances for typical data representations, e.g., arrays. Extend this class, if you want to + encapsule potentially long-running processes that compute the heatmap
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHCData

        +
        public JHCData()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        create

        +
        public static JHCData create(double[][] data)
        +
        Creates a data object. Assumes a row-oriented layout.
        +
        Parameters:
        data - the data
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(double[][] data,
        +             JHCScale<?> xScale,
        +             JHCScale<?> yScale)
        +
        Creates a data object. Assumes a row-oriented layout.
        +
        Parameters:
        data - the data
        xScale - the x scale
        yScale - the y scale
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(double[][] data,
        +             JHCDataProvider.Orientation orientation,
        +             JHCScale<?> xScale,
        +             JHCScale<?> yScale)
        +
        Creates a data object
        +
        Parameters:
        data - the data
        orientation - the orientation
        xScale - the x scale
        yScale - the y scale
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(char[][] data)
        +
        Creates a data object. Assumes a row-oriented layout.
        +
        Parameters:
        data - the data
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(char[][] data,
        +             JHCScale<?> xScale,
        +             JHCScale<?> yScale)
        +
        Creates a data object. Assumes a row-oriented layout.
        +
        Parameters:
        data - the data
        xScale - the x scale
        yScale - the y scale
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(char[][] data,
        +             JHCDataProvider.Orientation orientation,
        +             JHCScale<?> xScale,
        +             JHCScale<?> yScale)
        +
        Creates a data object
        +
        Parameters:
        data - the data
        orientation - the orientation
        xScale - the x scale
        yScale - the y scale
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(int[][] data)
        +
        Creates a data object. Assumes a row-oriented layout.
        +
        Parameters:
        data - the data
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(int[][] data,
        +             JHCScale<?> xScale,
        +             JHCScale<?> yScale)
        +
        Creates a data object. Assumes a row-oriented layout.
        +
        Parameters:
        data - the data
        xScale - the x scale
        yScale - the y scale
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(int[][] data,
        +             JHCDataProvider.Orientation orientation,
        +             JHCScale<?> xScale,
        +             JHCScale<?> yScale)
        +
        Creates a data object
        +
        Parameters:
        data - the data
        orientation - the orientation
        xScale - the x scale
        yScale - the y scale
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(long[][] data)
        +
        Creates a data object. Assumes a row-oriented layout.
        +
        Parameters:
        data - the data
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(long[][] data,
        +             JHCScale<?> xScale,
        +             JHCScale<?> yScale)
        +
        Creates a data object. Assumes a row-oriented layout.
        +
        Parameters:
        data - the data
        xScale - the x scale
        yScale - the y scale
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(long[][] data,
        +             JHCDataProvider.Orientation orientation,
        +             JHCScale<?> xScale,
        +             JHCScale<?> yScale)
        +
        Creates a data object
        +
        Parameters:
        data - the data
        orientation - the orientation
        xScale - the x scale
        yScale - the y scale
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(float[][] data)
        +
        Creates a data object. Assumes a row-oriented layout.
        +
        Parameters:
        data - the data
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(float[][] data,
        +             JHCScale<?> xScale,
        +             JHCScale<?> yScale)
        +
        Creates a data object. Assumes a row-oriented layout.
        +
        Parameters:
        data - the data
        xScale - the x scale
        yScale - the y scale
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(float[][] data,
        +             JHCDataProvider.Orientation orientation,
        +             JHCScale<?> xScale,
        +             JHCScale<?> yScale)
        +
        Creates a data object
        +
        Parameters:
        data - the data
        orientation - the orientation
        xScale - the x scale
        yScale - the y scale
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(JHCDataProvider provider)
        +
        Creates the.
        +
        Parameters:
        provider - the provider
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        getHeatmap

        +
        public abstract JHCHeatmap getHeatmap(int width,
        +                    int height)
        +
        Gets the heat.
        +
        Parameters:
        width - the width
        height - the height
        +
        Returns:
        the heat
        +
      • +
      + + + +
        +
      • +

        getWidth

        +
        public abstract int getWidth()
        +
        Gets the original width of the data
        +
        Returns:
        the width
        +
      • +
      + + + +
        +
      • +

        getHeight

        +
        public abstract int getHeight()
        +
        Gets the original height of the data
        +
        Returns:
        the height
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/swing/de/linearbits/jhc/JHCDataProvider.Orientation.html b/doc/swing/de/linearbits/jhc/JHCDataProvider.Orientation.html new file mode 100644 index 0000000..4653173 --- /dev/null +++ b/doc/swing/de/linearbits/jhc/JHCDataProvider.Orientation.html @@ -0,0 +1,324 @@ + + + + + +JHCDataProvider.Orientation (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Enum JHCDataProvider.Orientation

+
+
+ +
+ +
+
+
    +
  • + +
      +
    • + + +

      Enum Constant Summary

      + + + + + + + + + + + +
      Enum Constants 
      Enum Constant and Description
      COLUMN 
      ROW 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      static JHCDataProvider.OrientationvalueOf(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static JHCDataProvider.Orientation[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static JHCDataProvider.Orientation[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (JHCDataProvider.Orientation c : JHCDataProvider.Orientation.values())
        +    System.out.println(c);
        +
        +
        Returns:
        an array containing the constants of this enum type, in +the order they are declared
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static JHCDataProvider.Orientation valueOf(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
        +
        Parameters:
        name - the name of the enum constant to be returned.
        +
        Returns:
        the enum constant with the specified name
        +
        Throws:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant +with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/swing/de/linearbits/jhc/JHCDataProvider.html b/doc/swing/de/linearbits/jhc/JHCDataProvider.html new file mode 100644 index 0000000..96552c8 --- /dev/null +++ b/doc/swing/de/linearbits/jhc/JHCDataProvider.html @@ -0,0 +1,318 @@ + + + + + +JHCDataProvider (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Interface JHCDataProvider

+
+
+
+
    +
  • +
    +
    +
    public interface JHCDataProvider
    +
    This interface can be implemented to convert data into a representation suitable for the widget
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        get

        +
        double get(int x,
        +         int y)
        +
        Returns the.
        +
        Parameters:
        x - the x
        y - the y
        +
        Returns:
        the double
        +
      • +
      + + + +
        +
      • +

        getHeight

        +
        int getHeight()
        +
        Gets the height.
        +
        Returns:
        the height
        +
      • +
      + + + +
        +
      • +

        getWidth

        +
        int getWidth()
        +
        Gets the width.
        +
        Returns:
        the width
        +
      • +
      + + + + + + + +
        +
      • +

        getXScale

        +
        JHCScale<?> getXScale()
        +
        Gets the x labels.
        +
        Returns:
        the x scale
        +
      • +
      + + + +
        +
      • +

        getYScale

        +
        JHCScale<?> getYScale()
        +
        Gets the y labels.
        +
        Returns:
        the y scale
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/swing/de/linearbits/jhc/JHCGradient.html b/doc/swing/de/linearbits/jhc/JHCGradient.html new file mode 100644 index 0000000..5c420ba --- /dev/null +++ b/doc/swing/de/linearbits/jhc/JHCGradient.html @@ -0,0 +1,513 @@ + + + + + +JHCGradient (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHCGradient

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • de.linearbits.jhc.JHCGradient
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class JHCGradient
    +extends java.lang.Object
    +
    The class implements gradients for the heatmap. Some predefined gradients are + inspired by plotly (https://github.com/plotly).
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        GRADIENT_GRAYSCALE

        +
        public static final JHCGradient GRADIENT_GRAYSCALE
        +
        BLACK, GRAY, WHITE
        +
      • +
      + + + +
        +
      • +

        GRADIENT_HEAT

        +
        public static final JHCGradient GRADIENT_HEAT
        +
        BLUE, CYAN, GREEN, YELLOW, ORANGE, RED
        +
      • +
      + + + +
        +
      • +

        GRADIENT_GRAYS

        +
        public static final JHCGradient GRADIENT_GRAYS
        +
        BLACK, LIGHT_GRAY
        +
      • +
      + + + +
        +
      • +

        GRADIENT_YIGNBN

        +
        public static final JHCGradient GRADIENT_YIGNBN
        +
        WHITE, GREEN
        +
      • +
      + + + +
        +
      • +

        GRADIENT_GREENS

        +
        public static final JHCGradient GRADIENT_GREENS
        +
        DARK_GREEN, LIGHT_GREEN
        +
      • +
      + + + +
        +
      • +

        GRADIENT_YIORRD

        +
        public static final JHCGradient GRADIENT_YIORRD
        +
        RED, ORANGE, GOLD, TAN, WHITE
        +
      • +
      + + + +
        +
      • +

        GRADIENT_BLUERED

        +
        public static final JHCGradient GRADIENT_BLUERED
        +
        BRIGHT_BLUE, PURPLE, BRIGHT_RED
        +
      • +
      + + + +
        +
      • +

        GRADIENT_RDBU

        +
        public static final JHCGradient GRADIENT_RDBU
        +
        BLUE, RED
        +
      • +
      + + + +
        +
      • +

        GRADIENT_PICNIC

        +
        public static final JHCGradient GRADIENT_PICNIC
        +
        BLUE, LIGHT_BLUE, WHITE, PINK
        +
      • +
      + + + +
        +
      • +

        GRADIENT_PORTLAND

        +
        public static final JHCGradient GRADIENT_PORTLAND
        +
        BLUE, GREEN, YELLOW, ORANGE, RED
        +
      • +
      + + + +
        +
      • +

        GRADIENT_JET

        +
        public static final JHCGradient GRADIENT_JET
        +
        BLUE, LIGHT_BLUE, GREEN, YELLOW, ORANGE, RED
        +
      • +
      + + + +
        +
      • +

        GRADIENT_HOT

        +
        public static final JHCGradient GRADIENT_HOT
        +
        TAN, YELLOW, RED, BLACK
        +
      • +
      + + + +
        +
      • +

        GRADIENT_BLACKBODY

        +
        public static final JHCGradient GRADIENT_BLACKBODY
        +
        BLACK, RED, YELLOW, WHITE, LIGHT_BLUE
        +
      • +
      + + + +
        +
      • +

        GRADIENT_EARTH

        +
        public static final JHCGradient GRADIENT_EARTH
        +
        BLUE, GREEN, YELLOW, BROWN, TAN, WHITE
        +
      • +
      + + + +
        +
      • +

        GRADIENT_ELECTRIC

        +
        public static final JHCGradient GRADIENT_ELECTRIC
        +
        BLACK, PURPLE, ORANGE, YELLOW, TAN, WHITE
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHCGradient

        +
        public JHCGradient(java.awt.Color[] _colors)
        +
        Instantiates a new gradient.
        +
        Parameters:
        _colors - the _colors
        +
      • +
      + + + +
        +
      • +

        JHCGradient

        +
        public JHCGradient(java.awt.Color[] _colors,
        +           int steps)
        +
        Instantiates a new gradient.
        +
        Parameters:
        _colors - the _colors
        steps - the steps
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/swing/de/linearbits/jhc/JHCHeatmap.Point.html b/doc/swing/de/linearbits/jhc/JHCHeatmap.Point.html new file mode 100644 index 0000000..e4c78b9 --- /dev/null +++ b/doc/swing/de/linearbits/jhc/JHCHeatmap.Point.html @@ -0,0 +1,248 @@ + + + + + +JHCHeatmap.Point (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Interface JHCHeatmap.Point

+
+
+
+
    +
  • +
    +
    Enclosing class:
    +
    JHCHeatmap
    +
    +
    +
    +
    public static interface JHCHeatmap.Point
    +
    This interface represents a point in the heatmap. It is defined by indices on the x- and y-axis where each + index corresponds to the according entry in the current scale.
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      doublegetValue() +
      Gets the value.
      +
      intgetX() +
      Gets the x.
      +
      intgetY() +
      Gets the y.
      +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getValue

        +
        double getValue()
        +
        Gets the value.
        +
        Returns:
        the value
        +
      • +
      + + + +
        +
      • +

        getX

        +
        int getX()
        +
        Gets the x.
        +
        Returns:
        the x
        +
      • +
      + + + +
        +
      • +

        getY

        +
        int getY()
        +
        Gets the y.
        +
        Returns:
        the y
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/swing/de/linearbits/jhc/JHCHeatmap.html b/doc/swing/de/linearbits/jhc/JHCHeatmap.html new file mode 100644 index 0000000..5f94bb5 --- /dev/null +++ b/doc/swing/de/linearbits/jhc/JHCHeatmap.html @@ -0,0 +1,384 @@ + + + + + +JHCHeatmap (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHCHeatmap

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • de.linearbits.jhc.JHCHeatmap
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public abstract class JHCHeatmap
    +extends java.lang.Object
    +
    This abstract class represents a (potentially scaled) heatmap that has been retrieved from an instance of JHCData
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      + + + + + + + + + + +
      Nested Classes 
      Modifier and TypeClass and Description
      static interface JHCHeatmap.Point +
      This interface represents a point in the heatmap.
      +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      JHCHeatmap() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      abstract intgetHeight() +
      Gets the height.
      +
      abstract doublegetMax() +
      Gets the max.
      +
      abstract doublegetMin() +
      Gets the min.
      +
      abstract intgetWidth() +
      Gets the width.
      +
      abstract java.lang.StringgetXLabel(int index) +
      Gets the x label.
      +
      abstract java.lang.StringgetYLabel(int index) +
      Gets the y label.
      +
      abstract java.util.Iterator<JHCHeatmap.Point>iterator() +
      Iterator.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHCHeatmap

        +
        public JHCHeatmap()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getHeight

        +
        public abstract int getHeight()
        +
        Gets the height.
        +
        Returns:
        the height
        +
      • +
      + + + +
        +
      • +

        getMax

        +
        public abstract double getMax()
        +
        Gets the max.
        +
        Returns:
        the max
        +
      • +
      + + + +
        +
      • +

        getMin

        +
        public abstract double getMin()
        +
        Gets the min.
        +
        Returns:
        the min
        +
      • +
      + + + +
        +
      • +

        getWidth

        +
        public abstract int getWidth()
        +
        Gets the width.
        +
        Returns:
        the width
        +
      • +
      + + + +
        +
      • +

        getXLabel

        +
        public abstract java.lang.String getXLabel(int index)
        +
        Gets the x label.
        +
        Parameters:
        index - the index
        +
        Returns:
        the x label
        +
      • +
      + + + +
        +
      • +

        getYLabel

        +
        public abstract java.lang.String getYLabel(int index)
        +
        Gets the y label.
        +
        Parameters:
        index - the index
        +
        Returns:
        the y label
        +
      • +
      + + + +
        +
      • +

        iterator

        +
        public abstract java.util.Iterator<JHCHeatmap.Point> iterator()
        +
        Iterator.
        +
        Returns:
        the iterator
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/swing/de/linearbits/jhc/JHCLayout.html b/doc/swing/de/linearbits/jhc/JHCLayout.html new file mode 100644 index 0000000..9d65241 --- /dev/null +++ b/doc/swing/de/linearbits/jhc/JHCLayout.html @@ -0,0 +1,432 @@ + + + + + +JHCLayout (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHCLayout

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • de.linearbits.jhc.JHCLayout
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class JHCLayout
    +extends java.lang.Object
    +
    This class represents the layout that is to be used when displaying the heatmap
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      JHCLayout() +
      Instantiates a new layout.
      +
      JHCLayout(boolean xTickRotate, + int xTickSpace, + boolean yTickRotate, + int yTickSpace) +
      Instantiates a new layout.
      +
      JHCLayout(int legendWidth, + int largeTickLength, + int smallTickLength) +
      Instantiates a new layout.
      +
      JHCLayout(int legendWidth, + int largeTickLength, + int smallTickLength, + boolean xTickRotate, + int xTickSpace, + boolean yTickRotate, + int yTickSpace) +
      Instantiates a new layout.
      +
      JHCLayout(int offsetLeft, + int offsetRight, + int offsetTop, + int offsetBottom, + int offsetCenter) +
      Instantiates a new layout.
      +
      JHCLayout(int offsetLeft, + int offsetRight, + int offsetTop, + int offsetBottom, + int offsetCenter, + boolean xTickRotate, + int xTickSpace, + boolean yTickRotate, + int yTickSpace) +
      Instantiates a new layout.
      +
      JHCLayout(int offsetLeft, + int offsetRight, + int offsetTop, + int offsetBottom, + int offsetCenter, + int minimalTextWidth, + int legendWidth, + int largeTickLength, + int smallTickLength, + int textOffset) +
      Instantiates a new layout.
      +
      JHCLayout(int offsetLeft, + int offsetRight, + int offsetTop, + int offsetBottom, + int offsetCenter, + int minimalTextWidth, + int legendWidth, + int largeTickLength, + int smallTickLength, + int textOffset, + boolean xTickRotate, + int xTickSpace, + boolean yTickRotate, + int yTickSpace) +
      Instantiates a new layout.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHCLayout

        +
        public JHCLayout()
        +
        Instantiates a new layout.
        +
      • +
      + + + +
        +
      • +

        JHCLayout

        +
        public JHCLayout(boolean xTickRotate,
        +         int xTickSpace,
        +         boolean yTickRotate,
        +         int yTickSpace)
        +
        Instantiates a new layout.
        +
        Parameters:
        xTickRotate - the x tick rotate
        xTickSpace - the x tick space
        yTickRotate - the y tick rotate
        yTickSpace - the y tick space
        +
      • +
      + + + +
        +
      • +

        JHCLayout

        +
        public JHCLayout(int legendWidth,
        +         int largeTickLength,
        +         int smallTickLength)
        +
        Instantiates a new layout.
        +
        Parameters:
        legendWidth - the legend width
        largeTickLength - the large tick length
        smallTickLength - the small tick length
        +
      • +
      + + + +
        +
      • +

        JHCLayout

        +
        public JHCLayout(int legendWidth,
        +         int largeTickLength,
        +         int smallTickLength,
        +         boolean xTickRotate,
        +         int xTickSpace,
        +         boolean yTickRotate,
        +         int yTickSpace)
        +
        Instantiates a new layout.
        +
        Parameters:
        legendWidth - the legend width
        largeTickLength - the large tick length
        smallTickLength - the small tick length
        xTickRotate - the x tick rotate
        xTickSpace - the x tick space
        yTickRotate - the y tick rotate
        yTickSpace - the y tick space
        +
      • +
      + + + +
        +
      • +

        JHCLayout

        +
        public JHCLayout(int offsetLeft,
        +         int offsetRight,
        +         int offsetTop,
        +         int offsetBottom,
        +         int offsetCenter)
        +
        Instantiates a new layout.
        +
        Parameters:
        offsetLeft - the offset left
        offsetRight - the offset right
        offsetTop - the offset top
        offsetBottom - the offset bottom
        offsetCenter - the offset center
        +
      • +
      + + + +
        +
      • +

        JHCLayout

        +
        public JHCLayout(int offsetLeft,
        +         int offsetRight,
        +         int offsetTop,
        +         int offsetBottom,
        +         int offsetCenter,
        +         boolean xTickRotate,
        +         int xTickSpace,
        +         boolean yTickRotate,
        +         int yTickSpace)
        +
        Instantiates a new layout.
        +
        Parameters:
        offsetLeft - the offset left
        offsetRight - the offset right
        offsetTop - the offset top
        offsetBottom - the offset bottom
        offsetCenter - the offset center
        xTickRotate - the x tick rotate
        xTickSpace - the x tick space
        yTickRotate - the y tick rotate
        yTickSpace - the y tick space
        +
      • +
      + + + +
        +
      • +

        JHCLayout

        +
        public JHCLayout(int offsetLeft,
        +         int offsetRight,
        +         int offsetTop,
        +         int offsetBottom,
        +         int offsetCenter,
        +         int minimalTextWidth,
        +         int legendWidth,
        +         int largeTickLength,
        +         int smallTickLength,
        +         int textOffset)
        +
        Instantiates a new layout.
        +
        Parameters:
        offsetLeft - the offset left
        offsetRight - the offset right
        offsetTop - the offset top
        offsetBottom - the offset bottom
        offsetCenter - the offset center
        minimalTextWidth - the minimal text width
        legendWidth - the legend width
        largeTickLength - the large tick length
        smallTickLength - the small tick length
        textOffset - the text offset
        +
      • +
      + + + +
        +
      • +

        JHCLayout

        +
        public JHCLayout(int offsetLeft,
        +         int offsetRight,
        +         int offsetTop,
        +         int offsetBottom,
        +         int offsetCenter,
        +         int minimalTextWidth,
        +         int legendWidth,
        +         int largeTickLength,
        +         int smallTickLength,
        +         int textOffset,
        +         boolean xTickRotate,
        +         int xTickSpace,
        +         boolean yTickRotate,
        +         int yTickSpace)
        +
        Instantiates a new layout.
        +
        Parameters:
        offsetLeft - the offset left
        offsetRight - the offset right
        offsetTop - the offset top
        offsetBottom - the offset bottom
        offsetCenter - the offset center
        minimalTextWidth - the minimal text width
        legendWidth - the legend width
        largeTickLength - the large tick length
        smallTickLength - the small tick length
        textOffset - the text offset
        xTickRotate - the x tick rotate
        xTickSpace - the x tick space
        yTickRotate - the y tick rotate
        yTickSpace - the y tick space
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/swing/de/linearbits/jhc/JHCScale.Date.html b/doc/swing/de/linearbits/jhc/JHCScale.Date.html new file mode 100644 index 0000000..63cea3a --- /dev/null +++ b/doc/swing/de/linearbits/jhc/JHCScale.Date.html @@ -0,0 +1,277 @@ + + + + + +JHCScale.Date (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHCScale.Date

+
+
+ +
+
    +
  • +
    +
    Enclosing class:
    +
    JHCScale<T>
    +
    +
    +
    +
    public static class JHCScale.Date
    +extends JHCScale<java.util.Date>
    +
    This class implements a data/time scale
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      JHCScale.Date(java.util.Date from, + java.util.Date to) +
      Instantiates a new scale date.
      +
      JHCScale.Date(java.util.Date from, + java.util.Date to, + java.text.DateFormat format) +
      Instantiates a new scale date.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHCScale.Date

        +
        public JHCScale.Date(java.util.Date from,
        +             java.util.Date to)
        +
        Instantiates a new scale date.
        +
        Parameters:
        from - the from
        to - the to
        +
      • +
      + + + +
        +
      • +

        JHCScale.Date

        +
        public JHCScale.Date(java.util.Date from,
        +             java.util.Date to,
        +             java.text.DateFormat format)
        +
        Instantiates a new scale date.
        +
        Parameters:
        from - the from
        to - the to
        format - the format
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/swing/de/linearbits/jhc/JHCScale.Decimal.html b/doc/swing/de/linearbits/jhc/JHCScale.Decimal.html new file mode 100644 index 0000000..9a818cd --- /dev/null +++ b/doc/swing/de/linearbits/jhc/JHCScale.Decimal.html @@ -0,0 +1,277 @@ + + + + + +JHCScale.Decimal (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHCScale.Decimal

+
+
+ +
+
    +
  • +
    +
    Enclosing class:
    +
    JHCScale<T>
    +
    +
    +
    +
    public static class JHCScale.Decimal
    +extends JHCScale<java.lang.Double>
    +
    This class implements a decimal scale
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      JHCScale.Decimal(double from, + double to) +
      Instantiates a new scale decimal.
      +
      JHCScale.Decimal(double from, + double to, + java.text.DecimalFormat format) +
      Instantiates a new scale decimal.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHCScale.Decimal

        +
        public JHCScale.Decimal(double from,
        +                double to)
        +
        Instantiates a new scale decimal.
        +
        Parameters:
        from - the from
        to - the to
        +
      • +
      + + + +
        +
      • +

        JHCScale.Decimal

        +
        public JHCScale.Decimal(double from,
        +                double to,
        +                java.text.DecimalFormat format)
        +
        Instantiates a new scale decimal.
        +
        Parameters:
        from - the from
        to - the to
        format - the format
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/swing/de/linearbits/jhc/JHCScale.Integer.html b/doc/swing/de/linearbits/jhc/JHCScale.Integer.html new file mode 100644 index 0000000..e1a6b23 --- /dev/null +++ b/doc/swing/de/linearbits/jhc/JHCScale.Integer.html @@ -0,0 +1,257 @@ + + + + + +JHCScale.Integer (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHCScale.Integer

+
+
+ +
+
    +
  • +
    +
    Enclosing class:
    +
    JHCScale<T>
    +
    +
    +
    +
    public static class JHCScale.Integer
    +extends JHCScale<java.lang.Integer>
    +
    This class implements an integer scale
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      JHCScale.Integer(int from, + int to) +
      Instantiates a new scale integer.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHCScale.Integer

        +
        public JHCScale.Integer(int from,
        +                int to)
        +
        Instantiates a new scale integer.
        +
        Parameters:
        from - the from
        to - the to
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/swing/de/linearbits/jhc/JHCScale.String.html b/doc/swing/de/linearbits/jhc/JHCScale.String.html new file mode 100644 index 0000000..6764805 --- /dev/null +++ b/doc/swing/de/linearbits/jhc/JHCScale.String.html @@ -0,0 +1,255 @@ + + + + + +JHCScale.String (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHCScale.String

+
+
+ +
+
    +
  • +
    +
    Enclosing class:
    +
    JHCScale<T>
    +
    +
    +
    +
    public static class JHCScale.String
    +extends JHCScale<java.lang.String>
    +
    This class implements a string scale
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      JHCScale.String(java.lang.String[] values) +
      Instantiates a new scale string.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHCScale.String

        +
        public JHCScale.String(java.lang.String[] values)
        +
        Instantiates a new scale string.
        +
        Parameters:
        values - the values
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/swing/de/linearbits/jhc/JHCScale.html b/doc/swing/de/linearbits/jhc/JHCScale.html new file mode 100644 index 0000000..9c434d9 --- /dev/null +++ b/doc/swing/de/linearbits/jhc/JHCScale.html @@ -0,0 +1,271 @@ + + + + + +JHCScale (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHCScale<T>

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • de.linearbits.jhc.JHCScale<T>
    • +
    +
  • +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      Nested Classes 
      Modifier and TypeClass and Description
      static class JHCScale.Date +
      This class implements a data/time scale
      +
      static class JHCScale.Decimal +
      This class implements a decimal scale
      +
      static class JHCScale.Integer +
      This class implements an integer scale
      +
      static class JHCScale.String +
      This class implements a string scale
      +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      JHCScale() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHCScale

        +
        public JHCScale()
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/swing/de/linearbits/jhc/class-use/JHC.html b/doc/swing/de/linearbits/jhc/class-use/JHC.html new file mode 100644 index 0000000..8497f61 --- /dev/null +++ b/doc/swing/de/linearbits/jhc/class-use/JHC.html @@ -0,0 +1,113 @@ + + + + + +Uses of Class de.linearbits.jhc.JHC (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHC

+
+
No usage of de.linearbits.jhc.JHC
+ + + + + + diff --git a/doc/swing/de/linearbits/jhc/class-use/JHCConfiguration.html b/doc/swing/de/linearbits/jhc/class-use/JHCConfiguration.html new file mode 100644 index 0000000..a837bd5 --- /dev/null +++ b/doc/swing/de/linearbits/jhc/class-use/JHCConfiguration.html @@ -0,0 +1,141 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCConfiguration (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCConfiguration

+
+
+ +
+ + + + + + diff --git a/doc/swing/de/linearbits/jhc/class-use/JHCData.html b/doc/swing/de/linearbits/jhc/class-use/JHCData.html new file mode 100644 index 0000000..5bc5791 --- /dev/null +++ b/doc/swing/de/linearbits/jhc/class-use/JHCData.html @@ -0,0 +1,271 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCData (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCData

+
+
+ +
+ + + + + + diff --git a/doc/swing/de/linearbits/jhc/class-use/JHCDataProvider.Orientation.html b/doc/swing/de/linearbits/jhc/class-use/JHCDataProvider.Orientation.html new file mode 100644 index 0000000..03b0b34 --- /dev/null +++ b/doc/swing/de/linearbits/jhc/class-use/JHCDataProvider.Orientation.html @@ -0,0 +1,207 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCDataProvider.Orientation (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCDataProvider.Orientation

+
+
+ +
+ + + + + + diff --git a/doc/swing/de/linearbits/jhc/class-use/JHCDataProvider.html b/doc/swing/de/linearbits/jhc/class-use/JHCDataProvider.html new file mode 100644 index 0000000..611d5d5 --- /dev/null +++ b/doc/swing/de/linearbits/jhc/class-use/JHCDataProvider.html @@ -0,0 +1,140 @@ + + + + + +Uses of Interface de.linearbits.jhc.JHCDataProvider (JHC API Documentation) + + + + + + + + + + +
+

Uses of Interface
de.linearbits.jhc.JHCDataProvider

+
+
+ +
+ + + + + + diff --git a/doc/swing/de/linearbits/jhc/class-use/JHCGradient.html b/doc/swing/de/linearbits/jhc/class-use/JHCGradient.html new file mode 100644 index 0000000..af2ef92 --- /dev/null +++ b/doc/swing/de/linearbits/jhc/class-use/JHCGradient.html @@ -0,0 +1,266 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCGradient (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCGradient

+
+
+ +
+ + + + + + diff --git a/doc/swing/de/linearbits/jhc/class-use/JHCHeatmap.Point.html b/doc/swing/de/linearbits/jhc/class-use/JHCHeatmap.Point.html new file mode 100644 index 0000000..6448e17 --- /dev/null +++ b/doc/swing/de/linearbits/jhc/class-use/JHCHeatmap.Point.html @@ -0,0 +1,140 @@ + + + + + +Uses of Interface de.linearbits.jhc.JHCHeatmap.Point (JHC API Documentation) + + + + + + + + + + +
+

Uses of Interface
de.linearbits.jhc.JHCHeatmap.Point

+
+
+ +
+ + + + + + diff --git a/doc/swing/de/linearbits/jhc/class-use/JHCHeatmap.html b/doc/swing/de/linearbits/jhc/class-use/JHCHeatmap.html new file mode 100644 index 0000000..6f76002 --- /dev/null +++ b/doc/swing/de/linearbits/jhc/class-use/JHCHeatmap.html @@ -0,0 +1,141 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCHeatmap (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCHeatmap

+
+
+ +
+ + + + + + diff --git a/doc/swing/de/linearbits/jhc/class-use/JHCLayout.html b/doc/swing/de/linearbits/jhc/class-use/JHCLayout.html new file mode 100644 index 0000000..3807686 --- /dev/null +++ b/doc/swing/de/linearbits/jhc/class-use/JHCLayout.html @@ -0,0 +1,151 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCLayout (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCLayout

+
+
+ +
+ + + + + + diff --git a/doc/swing/de/linearbits/jhc/class-use/JHCScale.Date.html b/doc/swing/de/linearbits/jhc/class-use/JHCScale.Date.html new file mode 100644 index 0000000..2c674fe --- /dev/null +++ b/doc/swing/de/linearbits/jhc/class-use/JHCScale.Date.html @@ -0,0 +1,113 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCScale.Date (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCScale.Date

+
+
No usage of de.linearbits.jhc.JHCScale.Date
+ + + + + + diff --git a/doc/swing/de/linearbits/jhc/class-use/JHCScale.Decimal.html b/doc/swing/de/linearbits/jhc/class-use/JHCScale.Decimal.html new file mode 100644 index 0000000..d19185c --- /dev/null +++ b/doc/swing/de/linearbits/jhc/class-use/JHCScale.Decimal.html @@ -0,0 +1,113 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCScale.Decimal (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCScale.Decimal

+
+
No usage of de.linearbits.jhc.JHCScale.Decimal
+ + + + + + diff --git a/doc/swing/de/linearbits/jhc/class-use/JHCScale.Integer.html b/doc/swing/de/linearbits/jhc/class-use/JHCScale.Integer.html new file mode 100644 index 0000000..98fa250 --- /dev/null +++ b/doc/swing/de/linearbits/jhc/class-use/JHCScale.Integer.html @@ -0,0 +1,113 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCScale.Integer (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCScale.Integer

+
+
No usage of de.linearbits.jhc.JHCScale.Integer
+ + + + + + diff --git a/doc/swing/de/linearbits/jhc/class-use/JHCScale.String.html b/doc/swing/de/linearbits/jhc/class-use/JHCScale.String.html new file mode 100644 index 0000000..ed92253 --- /dev/null +++ b/doc/swing/de/linearbits/jhc/class-use/JHCScale.String.html @@ -0,0 +1,113 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCScale.String (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCScale.String

+
+
No usage of de.linearbits.jhc.JHCScale.String
+ + + + + + diff --git a/doc/swing/de/linearbits/jhc/class-use/JHCScale.html b/doc/swing/de/linearbits/jhc/class-use/JHCScale.html new file mode 100644 index 0000000..5c4052c --- /dev/null +++ b/doc/swing/de/linearbits/jhc/class-use/JHCScale.html @@ -0,0 +1,358 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCScale (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCScale

+
+
+ +
+ + + + + + diff --git a/doc/swing/de/linearbits/jhc/package-frame.html b/doc/swing/de/linearbits/jhc/package-frame.html new file mode 100644 index 0000000..3593a83 --- /dev/null +++ b/doc/swing/de/linearbits/jhc/package-frame.html @@ -0,0 +1,38 @@ + + + + + +de.linearbits.jhc (JHC API Documentation) + + + + +

de.linearbits.jhc

+ + + diff --git a/doc/swing/de/linearbits/jhc/package-summary.html b/doc/swing/de/linearbits/jhc/package-summary.html new file mode 100644 index 0000000..7096c65 --- /dev/null +++ b/doc/swing/de/linearbits/jhc/package-summary.html @@ -0,0 +1,242 @@ + + + + + +de.linearbits.jhc (JHC API Documentation) + + + + + + + + + + +
+

Package de.linearbits.jhc

+
+
This package provides a heatmap control for Swing
+
+

See: Description

+
+
+
    +
  • + + + + + + + + + + + + + + + + +
    Interface Summary 
    InterfaceDescription
    JHCDataProvider +
    This interface can be implemented to convert data into a representation suitable for the widget
    +
    JHCHeatmap.Point +
    This interface represents a point in the heatmap.
    +
    +
  • +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    JHC +
    This class provides a heatmap control for Swing
    +
    JHCConfiguration +
    This class allows to configure how the heatmap is displayed.
    +
    JHCData +
    This class defines the abstract base type for data that can be handled by the widget/control.
    +
    JHCGradient +
    The class implements gradients for the heatmap.
    +
    JHCHeatmap +
    This abstract class represents a (potentially scaled) heatmap that has been retrieved from an instance of JHCData
    +
    JHCLayout +
    This class represents the layout that is to be used when displaying the heatmap
    +
    JHCScale<T> +
    This class provides an abstract type for scales
    +
    JHCScale.Date +
    This class implements a data/time scale
    +
    JHCScale.Decimal +
    This class implements a decimal scale
    +
    JHCScale.Integer +
    This class implements an integer scale
    +
    JHCScale.String +
    This class implements a string scale
    +
    +
  • +
  • + + + + + + + + + + + + +
    Enum Summary 
    EnumDescription
    JHCDataProvider.Orientation +
    Data orientation
    +
    +
  • +
+ + + +

Package de.linearbits.jhc Description

+
This package provides a heatmap control for Swing
+
+ + + + + + diff --git a/doc/swing/de/linearbits/jhc/package-tree.html b/doc/swing/de/linearbits/jhc/package-tree.html new file mode 100644 index 0000000..9631787 --- /dev/null +++ b/doc/swing/de/linearbits/jhc/package-tree.html @@ -0,0 +1,164 @@ + + + + + +de.linearbits.jhc Class Hierarchy (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
+

Hierarchy For Package de.linearbits.jhc

+
+
+

Class Hierarchy

+ +

Interface Hierarchy

+ +

Enum Hierarchy

+
    +
  • java.lang.Object + +
  • +
+
+ +
+ + + + + +
+ + + + diff --git a/doc/swing/de/linearbits/jhc/package-use.html b/doc/swing/de/linearbits/jhc/package-use.html new file mode 100644 index 0000000..67e19e1 --- /dev/null +++ b/doc/swing/de/linearbits/jhc/package-use.html @@ -0,0 +1,173 @@ + + + + + +Uses of Package de.linearbits.jhc (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Package
de.linearbits.jhc

+
+
+
    +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Classes in de.linearbits.jhc used by de.linearbits.jhc 
    Class and Description
    JHCConfiguration +
    This class allows to configure how the heatmap is displayed.
    +
    JHCData +
    This class defines the abstract base type for data that can be handled by the widget/control.
    +
    JHCDataProvider +
    This interface can be implemented to convert data into a representation suitable for the widget
    +
    JHCDataProvider.Orientation +
    Data orientation
    +
    JHCGradient +
    The class implements gradients for the heatmap.
    +
    JHCHeatmap +
    This abstract class represents a (potentially scaled) heatmap that has been retrieved from an instance of JHCData
    +
    JHCHeatmap.Point +
    This interface represents a point in the heatmap.
    +
    JHCLayout +
    This class represents the layout that is to be used when displaying the heatmap
    +
    JHCScale +
    This class provides an abstract type for scales
    +
    +
  • +
+
+ +
+ + + + + +
+ + + + diff --git a/doc/swing/deprecated-list.html b/doc/swing/deprecated-list.html new file mode 100644 index 0000000..7d32e8b --- /dev/null +++ b/doc/swing/deprecated-list.html @@ -0,0 +1,113 @@ + + + + + +Deprecated List (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
+

Deprecated API

+

Contents

+
+ +
+ + + + + +
+ + + + diff --git a/doc/swing/help-doc.html b/doc/swing/help-doc.html new file mode 100644 index 0000000..0c178f0 --- /dev/null +++ b/doc/swing/help-doc.html @@ -0,0 +1,214 @@ + + + + + +API Help (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
+

How This API Document Is Organized

+
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+
    +
  • +

    Package

    +

    Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:

    +
      +
    • Interfaces (italic)
    • +
    • Classes
    • +
    • Enums
    • +
    • Exceptions
    • +
    • Errors
    • +
    • Annotation Types
    • +
    +
  • +
  • +

    Class/Interface

    +

    Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

    +
      +
    • Class inheritance diagram
    • +
    • Direct Subclasses
    • +
    • All Known Subinterfaces
    • +
    • All Known Implementing Classes
    • +
    • Class/interface declaration
    • +
    • Class/interface description
    • +
    +
      +
    • Nested Class Summary
    • +
    • Field Summary
    • +
    • Constructor Summary
    • +
    • Method Summary
    • +
    +
      +
    • Field Detail
    • +
    • Constructor Detail
    • +
    • Method Detail
    • +
    +

    Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

    +
  • +
  • +

    Annotation Type

    +

    Each annotation type has its own separate page with the following sections:

    +
      +
    • Annotation Type declaration
    • +
    • Annotation Type description
    • +
    • Required Element Summary
    • +
    • Optional Element Summary
    • +
    • Element Detail
    • +
    +
  • +
  • +

    Enum

    +

    Each enum has its own separate page with the following sections:

    +
      +
    • Enum declaration
    • +
    • Enum description
    • +
    • Enum Constant Summary
    • +
    • Enum Constant Detail
    • +
    +
  • +
  • +

    Use

    +

    Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.

    +
  • +
  • +

    Tree (Class Hierarchy)

    +

    There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.

    +
      +
    • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
    • +
    • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
    • +
    +
  • +
  • +

    Deprecated API

    +

    The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

    +
  • +
  • +

    Index

    +

    The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

    +
  • +
  • +

    Prev/Next

    +

    These links take you to the next or previous class, interface, package, or related page.

    +
  • +
  • +

    Frames/No Frames

    +

    These links show and hide the HTML frames. All pages are available with or without frames.

    +
  • +
  • +

    All Classes

    +

    The All Classes link shows all classes and interfaces except non-static nested types.

    +
  • +
  • +

    Serialized Form

    +

    Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

    +
  • +
  • +

    Constant Field Values

    +

    The Constant Field Values page lists the static final fields and their values.

    +
  • +
+This help file applies to API documentation generated using the standard doclet.
+ +
+ + + + + +
+ + + + diff --git a/doc/swing/index-files/index-1.html b/doc/swing/index-files/index-1.html new file mode 100644 index 0000000..ea5a1fe --- /dev/null +++ b/doc/swing/index-files/index-1.html @@ -0,0 +1,180 @@ + + + + + +C-Index (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
C D G I J S V  + + +

C

+
+
create(double[][]) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object.
+
+
create(double[][], JHCScale<?>, JHCScale<?>) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object.
+
+
create(double[][], JHCDataProvider.Orientation, JHCScale<?>, JHCScale<?>) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object
+
+
create(char[][]) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object.
+
+
create(char[][], JHCScale<?>, JHCScale<?>) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object.
+
+
create(char[][], JHCDataProvider.Orientation, JHCScale<?>, JHCScale<?>) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object
+
+
create(int[][]) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object.
+
+
create(int[][], JHCScale<?>, JHCScale<?>) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object.
+
+
create(int[][], JHCDataProvider.Orientation, JHCScale<?>, JHCScale<?>) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object
+
+
create(long[][]) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object.
+
+
create(long[][], JHCScale<?>, JHCScale<?>) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object.
+
+
create(long[][], JHCDataProvider.Orientation, JHCScale<?>, JHCScale<?>) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object
+
+
create(float[][]) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object.
+
+
create(float[][], JHCScale<?>, JHCScale<?>) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object.
+
+
create(float[][], JHCDataProvider.Orientation, JHCScale<?>, JHCScale<?>) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object
+
+
create(JHCDataProvider) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates the.
+
+
+C D G I J S V 
+ +
+ + + + + +
+ + + + diff --git a/doc/swing/index-files/index-2.html b/doc/swing/index-files/index-2.html new file mode 100644 index 0000000..8e200a2 --- /dev/null +++ b/doc/swing/index-files/index-2.html @@ -0,0 +1,120 @@ + + + + + +D-Index (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
C D G I J S V  + + +

D

+
+
de.linearbits.jhc - package de.linearbits.jhc
+
+
This package provides a heatmap control for Swing
+
+
+C D G I J S V 
+ +
+ + + + + +
+ + + + diff --git a/doc/swing/index-files/index-3.html b/doc/swing/index-files/index-3.html new file mode 100644 index 0000000..551c3f1 --- /dev/null +++ b/doc/swing/index-files/index-3.html @@ -0,0 +1,248 @@ + + + + + +G-Index (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
C D G I J S V  + + +

G

+
+
get(int, int) - Method in interface de.linearbits.jhc.JHCDataProvider
+
+
Returns the.
+
+
getHeatmap(int, int) - Method in class de.linearbits.jhc.JHCData
+
+
Gets the heat.
+
+
getHeight() - Method in class de.linearbits.jhc.JHCData
+
+
Gets the original height of the data
+
+
getHeight() - Method in interface de.linearbits.jhc.JHCDataProvider
+
+
Gets the height.
+
+
getHeight() - Method in class de.linearbits.jhc.JHCHeatmap
+
+
Gets the height.
+
+
getMax() - Method in class de.linearbits.jhc.JHCHeatmap
+
+
Gets the max.
+
+
getMin() - Method in class de.linearbits.jhc.JHCHeatmap
+
+
Gets the min.
+
+
getOrientation() - Method in interface de.linearbits.jhc.JHCDataProvider
+
+
Gets the orientation.
+
+
getValue() - Method in interface de.linearbits.jhc.JHCHeatmap.Point
+
+
Gets the value.
+
+
getWidth() - Method in class de.linearbits.jhc.JHCData
+
+
Gets the original width of the data
+
+
getWidth() - Method in interface de.linearbits.jhc.JHCDataProvider
+
+
Gets the width.
+
+
getWidth() - Method in class de.linearbits.jhc.JHCHeatmap
+
+
Gets the width.
+
+
getX() - Method in interface de.linearbits.jhc.JHCHeatmap.Point
+
+
Gets the x.
+
+
getXLabel(int) - Method in class de.linearbits.jhc.JHCHeatmap
+
+
Gets the x label.
+
+
getXScale() - Method in interface de.linearbits.jhc.JHCDataProvider
+
+
Gets the x labels.
+
+
getY() - Method in interface de.linearbits.jhc.JHCHeatmap.Point
+
+
Gets the y.
+
+
getYLabel(int) - Method in class de.linearbits.jhc.JHCHeatmap
+
+
Gets the y label.
+
+
getYScale() - Method in interface de.linearbits.jhc.JHCDataProvider
+
+
Gets the y labels.
+
+
GRADIENT_BLACKBODY - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BLACK, RED, YELLOW, WHITE, LIGHT_BLUE
+
+
GRADIENT_BLUERED - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BRIGHT_BLUE, PURPLE, BRIGHT_RED
+
+
GRADIENT_EARTH - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BLUE, GREEN, YELLOW, BROWN, TAN, WHITE
+
+
GRADIENT_ELECTRIC - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BLACK, PURPLE, ORANGE, YELLOW, TAN, WHITE
+
+
GRADIENT_GRAYS - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BLACK, LIGHT_GRAY
+
+
GRADIENT_GRAYSCALE - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BLACK, GRAY, WHITE
+
+
GRADIENT_GREENS - Static variable in class de.linearbits.jhc.JHCGradient
+
+
DARK_GREEN, LIGHT_GREEN
+
+
GRADIENT_HEAT - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BLUE, CYAN, GREEN, YELLOW, ORANGE, RED
+
+
GRADIENT_HOT - Static variable in class de.linearbits.jhc.JHCGradient
+
+
TAN, YELLOW, RED, BLACK
+
+
GRADIENT_JET - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BLUE, LIGHT_BLUE, GREEN, YELLOW, ORANGE, RED
+
+
GRADIENT_PICNIC - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BLUE, LIGHT_BLUE, WHITE, PINK
+
+
GRADIENT_PORTLAND - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BLUE, GREEN, YELLOW, ORANGE, RED
+
+
GRADIENT_RDBU - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BLUE, RED
+
+
GRADIENT_YIGNBN - Static variable in class de.linearbits.jhc.JHCGradient
+
+
WHITE, GREEN
+
+
GRADIENT_YIORRD - Static variable in class de.linearbits.jhc.JHCGradient
+
+
RED, ORANGE, GOLD, TAN, WHITE
+
+
+C D G I J S V 
+ +
+ + + + + +
+ + + + diff --git a/doc/swing/index-files/index-4.html b/doc/swing/index-files/index-4.html new file mode 100644 index 0000000..9324963 --- /dev/null +++ b/doc/swing/index-files/index-4.html @@ -0,0 +1,120 @@ + + + + + +I-Index (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
C D G I J S V  + + +

I

+
+
iterator() - Method in class de.linearbits.jhc.JHCHeatmap
+
+
Iterator.
+
+
+C D G I J S V 
+ +
+ + + + + +
+ + + + diff --git a/doc/swing/index-files/index-5.html b/doc/swing/index-files/index-5.html new file mode 100644 index 0000000..7e120c7 --- /dev/null +++ b/doc/swing/index-files/index-5.html @@ -0,0 +1,262 @@ + + + + + +J-Index (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
C D G I J S V  + + +

J

+
+
JHC - Class in de.linearbits.jhc
+
+
This class provides a heatmap control for Swing
+
+
JHC() - Constructor for class de.linearbits.jhc.JHC
+
+
Creates a new instance
+
+
JHCConfiguration - Class in de.linearbits.jhc
+
+
This class allows to configure how the heatmap is displayed.
+
+
JHCConfiguration(String, String, int, int, JHCGradient) - Constructor for class de.linearbits.jhc.JHCConfiguration
+
+
Instantiates a new configuration.
+
+
JHCConfiguration(String, String, int, int, JHCGradient, JHCLayout) - Constructor for class de.linearbits.jhc.JHCConfiguration
+
+
Instantiates a new configuration.
+
+
JHCConfiguration(String, String, JHCGradient) - Constructor for class de.linearbits.jhc.JHCConfiguration
+
+
Instantiates a new configuration.
+
+
JHCConfiguration(String, String, JHCGradient, JHCLayout) - Constructor for class de.linearbits.jhc.JHCConfiguration
+
+
Instantiates a new configuration.
+
+
JHCData - Class in de.linearbits.jhc
+
+
This class defines the abstract base type for data that can be handled by the widget/control.
+
+
JHCData() - Constructor for class de.linearbits.jhc.JHCData
+
 
+
JHCDataProvider - Interface in de.linearbits.jhc
+
+
This interface can be implemented to convert data into a representation suitable for the widget
+
+
JHCDataProvider.Orientation - Enum in de.linearbits.jhc
+
+
Data orientation
+
+
JHCGradient - Class in de.linearbits.jhc
+
+
The class implements gradients for the heatmap.
+
+
JHCGradient(Color[]) - Constructor for class de.linearbits.jhc.JHCGradient
+
+
Instantiates a new gradient.
+
+
JHCGradient(Color[], int) - Constructor for class de.linearbits.jhc.JHCGradient
+
+
Instantiates a new gradient.
+
+
JHCHeatmap - Class in de.linearbits.jhc
+
+
This abstract class represents a (potentially scaled) heatmap that has been retrieved from an instance of JHCData
+
+
JHCHeatmap() - Constructor for class de.linearbits.jhc.JHCHeatmap
+
 
+
JHCHeatmap.Point - Interface in de.linearbits.jhc
+
+
This interface represents a point in the heatmap.
+
+
JHCLayout - Class in de.linearbits.jhc
+
+
This class represents the layout that is to be used when displaying the heatmap
+
+
JHCLayout() - Constructor for class de.linearbits.jhc.JHCLayout
+
+
Instantiates a new layout.
+
+
JHCLayout(boolean, int, boolean, int) - Constructor for class de.linearbits.jhc.JHCLayout
+
+
Instantiates a new layout.
+
+
JHCLayout(int, int, int) - Constructor for class de.linearbits.jhc.JHCLayout
+
+
Instantiates a new layout.
+
+
JHCLayout(int, int, int, boolean, int, boolean, int) - Constructor for class de.linearbits.jhc.JHCLayout
+
+
Instantiates a new layout.
+
+
JHCLayout(int, int, int, int, int) - Constructor for class de.linearbits.jhc.JHCLayout
+
+
Instantiates a new layout.
+
+
JHCLayout(int, int, int, int, int, boolean, int, boolean, int) - Constructor for class de.linearbits.jhc.JHCLayout
+
+
Instantiates a new layout.
+
+
JHCLayout(int, int, int, int, int, int, int, int, int, int) - Constructor for class de.linearbits.jhc.JHCLayout
+
+
Instantiates a new layout.
+
+
JHCLayout(int, int, int, int, int, int, int, int, int, int, boolean, int, boolean, int) - Constructor for class de.linearbits.jhc.JHCLayout
+
+
Instantiates a new layout.
+
+
JHCScale<T> - Class in de.linearbits.jhc
+
+
This class provides an abstract type for scales
+
+
JHCScale() - Constructor for class de.linearbits.jhc.JHCScale
+
 
+
JHCScale.Date - Class in de.linearbits.jhc
+
+
This class implements a data/time scale
+
+
JHCScale.Date(Date, Date) - Constructor for class de.linearbits.jhc.JHCScale.Date
+
+
Instantiates a new scale date.
+
+
JHCScale.Date(Date, Date, DateFormat) - Constructor for class de.linearbits.jhc.JHCScale.Date
+
+
Instantiates a new scale date.
+
+
JHCScale.Decimal - Class in de.linearbits.jhc
+
+
This class implements a decimal scale
+
+
JHCScale.Decimal(double, double) - Constructor for class de.linearbits.jhc.JHCScale.Decimal
+
+
Instantiates a new scale decimal.
+
+
JHCScale.Decimal(double, double, DecimalFormat) - Constructor for class de.linearbits.jhc.JHCScale.Decimal
+
+
Instantiates a new scale decimal.
+
+
JHCScale.Integer - Class in de.linearbits.jhc
+
+
This class implements an integer scale
+
+
JHCScale.Integer(int, int) - Constructor for class de.linearbits.jhc.JHCScale.Integer
+
+
Instantiates a new scale integer.
+
+
JHCScale.String - Class in de.linearbits.jhc
+
+
This class implements a string scale
+
+
JHCScale.String(String[]) - Constructor for class de.linearbits.jhc.JHCScale.String
+
+
Instantiates a new scale string.
+
+
+C D G I J S V 
+ +
+ + + + + +
+ + + + diff --git a/doc/swing/index-files/index-6.html b/doc/swing/index-files/index-6.html new file mode 100644 index 0000000..b5f8aac --- /dev/null +++ b/doc/swing/index-files/index-6.html @@ -0,0 +1,128 @@ + + + + + +S-Index (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
C D G I J S V  + + +

S

+
+
setBackground(Color) - Method in class de.linearbits.jhc.JHC
+
+
Sets the background color
+
+
setData(JHCData, JHCConfiguration) - Method in class de.linearbits.jhc.JHC
+
+
Updates the data displayed by this control
+
+
setFont(Font) - Method in class de.linearbits.jhc.JHC
+
+
Sets the font
+
+
+C D G I J S V 
+ +
+ + + + + +
+ + + + diff --git a/doc/swing/index-files/index-7.html b/doc/swing/index-files/index-7.html new file mode 100644 index 0000000..bd323ae --- /dev/null +++ b/doc/swing/index-files/index-7.html @@ -0,0 +1,125 @@ + + + + + +V-Index (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
C D G I J S V  + + +

V

+
+
valueOf(String) - Static method in enum de.linearbits.jhc.JHCDataProvider.Orientation
+
+
Returns the enum constant of this type with the specified name.
+
+
values() - Static method in enum de.linearbits.jhc.JHCDataProvider.Orientation
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
+C D G I J S V 
+ +
+ + + + + +
+ + + + diff --git a/doc/swing/index.html b/doc/swing/index.html new file mode 100644 index 0000000..3b0450f --- /dev/null +++ b/doc/swing/index.html @@ -0,0 +1,30 @@ + + + + + +JHC API Documentation + + + + + + +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<h2>Frame Alert</h2> +<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="de/linearbits/jhc/package-summary.html">Non-frame version</a>.</p> + + + diff --git a/doc/swing/overview-tree.html b/doc/swing/overview-tree.html new file mode 100644 index 0000000..d6f3709 --- /dev/null +++ b/doc/swing/overview-tree.html @@ -0,0 +1,168 @@ + + + + + +Class Hierarchy (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
+

Hierarchy For All Packages

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +

Interface Hierarchy

+ +

Enum Hierarchy

+
    +
  • java.lang.Object + +
  • +
+
+ +
+ + + + + +
+ + + + diff --git a/doc/swing/package-list b/doc/swing/package-list new file mode 100644 index 0000000..fa1bfd4 --- /dev/null +++ b/doc/swing/package-list @@ -0,0 +1 @@ +de.linearbits.jhc diff --git a/doc/swing/resources/background.gif b/doc/swing/resources/background.gif new file mode 100644 index 0000000..f471940 Binary files /dev/null and b/doc/swing/resources/background.gif differ diff --git a/doc/swing/resources/tab.gif b/doc/swing/resources/tab.gif new file mode 100644 index 0000000..1a73a83 Binary files /dev/null and b/doc/swing/resources/tab.gif differ diff --git a/doc/swing/resources/titlebar.gif b/doc/swing/resources/titlebar.gif new file mode 100644 index 0000000..17443b3 Binary files /dev/null and b/doc/swing/resources/titlebar.gif differ diff --git a/doc/swing/resources/titlebar_end.gif b/doc/swing/resources/titlebar_end.gif new file mode 100644 index 0000000..3ad78d4 Binary files /dev/null and b/doc/swing/resources/titlebar_end.gif differ diff --git a/doc/swing/serialized-form.html b/doc/swing/serialized-form.html new file mode 100644 index 0000000..75610c7 --- /dev/null +++ b/doc/swing/serialized-form.html @@ -0,0 +1,144 @@ + + + + + +Serialized Form (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
+

Serialized Form

+
+
+
    +
  • +

    Package de.linearbits.jhc

    +
      +
    • + + +

      Class de.linearbits.jhc.JHC extends javax.swing.JComponent implements Serializable

      +
      +
      serialVersionUID:
      +
      -2953032744074537804L
      +
      +
        +
      • + + +

        Serialized Fields

        +
          +
        • +

          jhc

          +
          de.linearbits.jhc._JHC jhc
          +
          The real widget
          +
        • +
        +
      • +
      +
    • +
    +
  • +
+
+ +
+ + + + + +
+ + + + diff --git a/doc/swing/stylesheet.css b/doc/swing/stylesheet.css new file mode 100644 index 0000000..0aeaa97 --- /dev/null +++ b/doc/swing/stylesheet.css @@ -0,0 +1,474 @@ +/* Javadoc style sheet */ +/* +Overall document style +*/ +body { + background-color:#ffffff; + color:#353833; + font-family:Arial, Helvetica, sans-serif; + font-size:76%; + margin:0; +} +a:link, a:visited { + text-decoration:none; + color:#4c6b87; +} +a:hover, a:focus { + text-decoration:none; + color:#bb7a2a; +} +a:active { + text-decoration:none; + color:#4c6b87; +} +a[name] { + color:#353833; +} +a[name]:hover { + text-decoration:none; + color:#353833; +} +pre { + font-size:1.3em; +} +h1 { + font-size:1.8em; +} +h2 { + font-size:1.5em; +} +h3 { + font-size:1.4em; +} +h4 { + font-size:1.3em; +} +h5 { + font-size:1.2em; +} +h6 { + font-size:1.1em; +} +ul { + list-style-type:disc; +} +code, tt { + font-size:1.2em; +} +dt code { + font-size:1.2em; +} +table tr td dt code { + font-size:1.2em; + vertical-align:top; +} +sup { + font-size:.6em; +} +/* +Document title and Copyright styles +*/ +.clear { + clear:both; + height:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:.8em; + z-index:200; + margin-top:-7px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + background-image:url(resources/titlebar.gif); + background-position:left top; + background-repeat:no-repeat; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* +Navigation bar styles +*/ +.bar { + background-image:url(resources/background.gif); + background-repeat:repeat-x; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:1em; + margin:0; +} +.topNav { + background-image:url(resources/background.gif); + background-repeat:repeat-x; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; +} +.bottomNav { + margin-top:10px; + background-image:url(resources/background.gif); + background-repeat:repeat-x; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; +} +.subNav { + background-color:#dee3e9; + border-bottom:1px solid #9eadc0; + float:left; + width:100%; + overflow:hidden; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding:3px 6px; +} +ul.subNavList li{ + list-style:none; + float:left; + font-size:90%; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; +} +.navBarCell1Rev { + background-image:url(resources/tab.gif); + background-color:#a88834; + color:#FFFFFF; + margin: auto 5px; + border:1px solid #c9aa44; +} +/* +Page header and footer styles +*/ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexHeader { + margin:10px; + position:relative; +} +.indexHeader h1 { + font-size:1.3em; +} +.title { + color:#2c4557; + margin:10px 0; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 25px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:1.2em; +} +/* +Heading styles +*/ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border-top:1px solid #9eadc0; + border-bottom:1px solid #9eadc0; + margin:0 0 6px -8px; + padding:2px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border-top:1px solid #9eadc0; + border-bottom:1px solid #9eadc0; + margin:0 0 6px -8px; + padding:2px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* +Page layout container styles +*/ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:1.0em; +} +.indexContainer h2 { + font-size:1.1em; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:1.1em; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:10px 0 10px 20px; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* +List styles +*/ +ul.horizontal li { + display:inline; + font-size:0.9em; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:25px; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #9eadc0; + background-color:#f9f9f9; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:1px solid #9eadc0; + border-top:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; + border-bottom:1px solid #9eadc0; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* +Table styles +*/ +.contentContainer table, .classUseContainer table, .constantValuesContainer table { + border-bottom:1px solid #9eadc0; + width:100%; +} +.contentContainer ul li table, .classUseContainer ul li table, .constantValuesContainer ul li table { + width:100%; +} +.contentContainer .description table, .contentContainer .details table { + border-bottom:none; +} +.contentContainer ul li table th.colOne, .contentContainer ul li table th.colFirst, .contentContainer ul li table th.colLast, .classUseContainer ul li table th, .constantValuesContainer ul li table th, .contentContainer ul li table td.colOne, .contentContainer ul li table td.colFirst, .contentContainer ul li table td.colLast, .classUseContainer ul li table td, .constantValuesContainer ul li table td{ + vertical-align:top; + padding-right:20px; +} +.contentContainer ul li table th.colLast, .classUseContainer ul li table th.colLast,.constantValuesContainer ul li table th.colLast, +.contentContainer ul li table td.colLast, .classUseContainer ul li table td.colLast,.constantValuesContainer ul li table td.colLast, +.contentContainer ul li table th.colOne, .classUseContainer ul li table th.colOne, +.contentContainer ul li table td.colOne, .classUseContainer ul li table td.colOne { + padding-right:3px; +} +.overviewSummary caption, .packageSummary caption, .contentContainer ul.blockList li.blockList caption, .summary caption, .classUseContainer caption, .constantValuesContainer caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#FFFFFF; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + margin:0px; +} +caption a:link, caption a:hover, caption a:active, caption a:visited { + color:#FFFFFF; +} +.overviewSummary caption span, .packageSummary caption span, .contentContainer ul.blockList li.blockList caption span, .summary caption span, .classUseContainer caption span, .constantValuesContainer caption span { + white-space:nowrap; + padding-top:8px; + padding-left:8px; + display:block; + float:left; + background-image:url(resources/titlebar.gif); + height:18px; +} +.overviewSummary .tabEnd, .packageSummary .tabEnd, .contentContainer ul.blockList li.blockList .tabEnd, .summary .tabEnd, .classUseContainer .tabEnd, .constantValuesContainer .tabEnd { + width:10px; + background-image:url(resources/titlebar_end.gif); + background-repeat:no-repeat; + background-position:top right; + position:relative; + float:left; +} +ul.blockList ul.blockList li.blockList table { + margin:0 0 12px 0px; + width:100%; +} +.tableSubHeadingColor { + background-color: #EEEEFF; +} +.altColor { + background-color:#eeeeef; +} +.rowColor { + background-color:#ffffff; +} +.overviewSummary td, .packageSummary td, .contentContainer ul.blockList li.blockList td, .summary td, .classUseContainer td, .constantValuesContainer td { + text-align:left; + padding:3px 3px 3px 7px; +} +th.colFirst, th.colLast, th.colOne, .constantValuesContainer th { + background:#dee3e9; + border-top:1px solid #9eadc0; + border-bottom:1px solid #9eadc0; + text-align:left; + padding:3px 3px 3px 7px; +} +td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { + font-weight:bold; +} +td.colFirst, th.colFirst { + border-left:1px solid #9eadc0; + white-space:nowrap; +} +td.colLast, th.colLast { + border-right:1px solid #9eadc0; +} +td.colOne, th.colOne { + border-right:1px solid #9eadc0; + border-left:1px solid #9eadc0; +} +table.overviewSummary { + padding:0px; + margin-left:0px; +} +table.overviewSummary td.colFirst, table.overviewSummary th.colFirst, +table.overviewSummary td.colOne, table.overviewSummary th.colOne { + width:25%; + vertical-align:middle; +} +table.packageSummary td.colFirst, table.overviewSummary th.colFirst { + width:25%; + vertical-align:middle; +} +/* +Content styles +*/ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} +/* +Formatting effect styles +*/ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:.9em; +} +.block { + display:block; + margin:3px 0 0 0; +} +.strong { + font-weight:bold; +} diff --git a/doc/swt/allclasses-frame.html b/doc/swt/allclasses-frame.html new file mode 100644 index 0000000..4638696 --- /dev/null +++ b/doc/swt/allclasses-frame.html @@ -0,0 +1,31 @@ + + + + + +All Classes (JHC API Documentation) + + + + +

All Classes

+ + + diff --git a/doc/swt/allclasses-noframe.html b/doc/swt/allclasses-noframe.html new file mode 100644 index 0000000..9fd6ac8 --- /dev/null +++ b/doc/swt/allclasses-noframe.html @@ -0,0 +1,31 @@ + + + + + +All Classes (JHC API Documentation) + + + + +

All Classes

+ + + diff --git a/doc/swt/constant-values.html b/doc/swt/constant-values.html new file mode 100644 index 0000000..d7182c8 --- /dev/null +++ b/doc/swt/constant-values.html @@ -0,0 +1,113 @@ + + + + + +Constant Field Values (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
+

Constant Field Values

+

Contents

+
+ +
+ + + + + +
+ + + + diff --git a/doc/swt/de/linearbits/jhc/JHC.html b/doc/swt/de/linearbits/jhc/JHC.html new file mode 100644 index 0000000..134c4e9 --- /dev/null +++ b/doc/swt/de/linearbits/jhc/JHC.html @@ -0,0 +1,352 @@ + + + + + +JHC (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHC

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • de.linearbits.jhc.JHC
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class JHC
    +extends java.lang.Object
    +
    This class implements a heatmap widget for SWT
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      JHC(org.eclipse.swt.widgets.Composite parent, + int style) +
      Creates a new instance
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      org.eclipse.swt.graphics.ColorgetBackground() +
      Returns the background color
      +
      org.eclipse.swt.graphics.FontgetFont() +
      Returns the font
      +
      voidsetBackground(org.eclipse.swt.graphics.Color arg0) +
      Sets the background color
      +
      voidsetData(JHCData data, + JHCConfiguration config) +
      Sets the data to be displayed by this widget
      +
      voidsetFont(org.eclipse.swt.graphics.Font arg0) +
      Sets the font
      +
      voidsetLayoutData(java.lang.Object arg0) +
      Sets the layout data
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHC

        +
        public JHC(org.eclipse.swt.widgets.Composite parent,
        +   int style)
        +
        Creates a new instance
        +
        Parameters:
        parent - the parent
        style - the style
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getBackground

        +
        public org.eclipse.swt.graphics.Color getBackground()
        +
        Returns the background color
        +
        Returns:
        +
      • +
      + + + +
        +
      • +

        getFont

        +
        public org.eclipse.swt.graphics.Font getFont()
        +
        Returns the font
        +
        Returns:
        +
      • +
      + + + +
        +
      • +

        setBackground

        +
        public void setBackground(org.eclipse.swt.graphics.Color arg0)
        +
        Sets the background color
        +
        Parameters:
        arg0 -
        +
      • +
      + + + +
        +
      • +

        setData

        +
        public void setData(JHCData data,
        +           JHCConfiguration config)
        +
        Sets the data to be displayed by this widget
        +
        Parameters:
        data -
        config -
        +
      • +
      + + + +
        +
      • +

        setFont

        +
        public void setFont(org.eclipse.swt.graphics.Font arg0)
        +
        Sets the font
        +
        Parameters:
        arg0 -
        +
      • +
      + + + +
        +
      • +

        setLayoutData

        +
        public void setLayoutData(java.lang.Object arg0)
        +
        Sets the layout data
        +
        Parameters:
        arg0 -
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/swt/de/linearbits/jhc/JHCConfiguration.html b/doc/swt/de/linearbits/jhc/JHCConfiguration.html new file mode 100644 index 0000000..5b219fd --- /dev/null +++ b/doc/swt/de/linearbits/jhc/JHCConfiguration.html @@ -0,0 +1,307 @@ + + + + + +JHCConfiguration (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHCConfiguration

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • de.linearbits.jhc.JHCConfiguration
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class JHCConfiguration
    +extends java.lang.Object
    +
    This class allows to configure how the heatmap is displayed.
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      JHCConfiguration(java.lang.String xLabel, + java.lang.String yLabel, + int maximalWidth, + int maximalHeight, + JHCGradient gradient) +
      Instantiates a new configuration.
      +
      JHCConfiguration(java.lang.String xLabel, + java.lang.String yLabel, + int maximalWidth, + int maximalHeight, + JHCGradient gradient, + JHCLayout layout) +
      Instantiates a new configuration.
      +
      JHCConfiguration(java.lang.String xLabel, + java.lang.String yLabel, + JHCGradient gradient) +
      Instantiates a new configuration.
      +
      JHCConfiguration(java.lang.String xLabel, + java.lang.String yLabel, + JHCGradient gradient, + JHCLayout layout) +
      Instantiates a new configuration.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHCConfiguration

        +
        public JHCConfiguration(java.lang.String xLabel,
        +                java.lang.String yLabel,
        +                int maximalWidth,
        +                int maximalHeight,
        +                JHCGradient gradient)
        +
        Instantiates a new configuration.
        +
        Parameters:
        xLabel - the x label
        yLabel - the y label
        maximalWidth - the maximal width
        maximalHeight - the maximal height
        gradient - the gradient
        +
      • +
      + + + +
        +
      • +

        JHCConfiguration

        +
        public JHCConfiguration(java.lang.String xLabel,
        +                java.lang.String yLabel,
        +                int maximalWidth,
        +                int maximalHeight,
        +                JHCGradient gradient,
        +                JHCLayout layout)
        +
        Instantiates a new configuration.
        +
        Parameters:
        xLabel - the x label
        yLabel - the y label
        maximalSize - the maximal size
        gradient - the gradient
        layout - the layout
        +
      • +
      + + + +
        +
      • +

        JHCConfiguration

        +
        public JHCConfiguration(java.lang.String xLabel,
        +                java.lang.String yLabel,
        +                JHCGradient gradient)
        +
        Instantiates a new configuration.
        +
        Parameters:
        xLabel - the x label
        yLabel - the y label
        gradient - the gradient
        +
      • +
      + + + +
        +
      • +

        JHCConfiguration

        +
        public JHCConfiguration(java.lang.String xLabel,
        +                java.lang.String yLabel,
        +                JHCGradient gradient,
        +                JHCLayout layout)
        +
        Instantiates a new configuration.
        +
        Parameters:
        xLabel - the x label
        yLabel - the y label
        gradient - the gradient
        layout - the layout
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/swt/de/linearbits/jhc/JHCData.html b/doc/swt/de/linearbits/jhc/JHCData.html new file mode 100644 index 0000000..535396f --- /dev/null +++ b/doc/swt/de/linearbits/jhc/JHCData.html @@ -0,0 +1,636 @@ + + + + + +JHCData (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHCData

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • de.linearbits.jhc.JHCData
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public abstract class JHCData
    +extends java.lang.Object
    +
    This class defines the abstract base type for data that can be handled by the widget/control. Moreover, it offers + static methods for deriving instances for typical data representations, e.g., arrays. Extend this class, if you want to + encapsule potentially long-running processes that compute the heatmap
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHCData

        +
        public JHCData()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        create

        +
        public static JHCData create(double[][] data)
        +
        Creates a data object. Assumes a row-oriented layout.
        +
        Parameters:
        data - the data
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(double[][] data,
        +             JHCScale<?> xScale,
        +             JHCScale<?> yScale)
        +
        Creates a data object. Assumes a row-oriented layout.
        +
        Parameters:
        data - the data
        xScale - the x scale
        yScale - the y scale
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(double[][] data,
        +             JHCDataProvider.Orientation orientation,
        +             JHCScale<?> xScale,
        +             JHCScale<?> yScale)
        +
        Creates a data object
        +
        Parameters:
        data - the data
        orientation - the orientation
        xScale - the x scale
        yScale - the y scale
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(char[][] data)
        +
        Creates a data object. Assumes a row-oriented layout.
        +
        Parameters:
        data - the data
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(char[][] data,
        +             JHCScale<?> xScale,
        +             JHCScale<?> yScale)
        +
        Creates a data object. Assumes a row-oriented layout.
        +
        Parameters:
        data - the data
        xScale - the x scale
        yScale - the y scale
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(char[][] data,
        +             JHCDataProvider.Orientation orientation,
        +             JHCScale<?> xScale,
        +             JHCScale<?> yScale)
        +
        Creates a data object
        +
        Parameters:
        data - the data
        orientation - the orientation
        xScale - the x scale
        yScale - the y scale
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(int[][] data)
        +
        Creates a data object. Assumes a row-oriented layout.
        +
        Parameters:
        data - the data
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(int[][] data,
        +             JHCScale<?> xScale,
        +             JHCScale<?> yScale)
        +
        Creates a data object. Assumes a row-oriented layout.
        +
        Parameters:
        data - the data
        xScale - the x scale
        yScale - the y scale
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(int[][] data,
        +             JHCDataProvider.Orientation orientation,
        +             JHCScale<?> xScale,
        +             JHCScale<?> yScale)
        +
        Creates a data object
        +
        Parameters:
        data - the data
        orientation - the orientation
        xScale - the x scale
        yScale - the y scale
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(long[][] data)
        +
        Creates a data object. Assumes a row-oriented layout.
        +
        Parameters:
        data - the data
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(long[][] data,
        +             JHCScale<?> xScale,
        +             JHCScale<?> yScale)
        +
        Creates a data object. Assumes a row-oriented layout.
        +
        Parameters:
        data - the data
        xScale - the x scale
        yScale - the y scale
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(long[][] data,
        +             JHCDataProvider.Orientation orientation,
        +             JHCScale<?> xScale,
        +             JHCScale<?> yScale)
        +
        Creates a data object
        +
        Parameters:
        data - the data
        orientation - the orientation
        xScale - the x scale
        yScale - the y scale
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(float[][] data)
        +
        Creates a data object. Assumes a row-oriented layout.
        +
        Parameters:
        data - the data
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(float[][] data,
        +             JHCScale<?> xScale,
        +             JHCScale<?> yScale)
        +
        Creates a data object. Assumes a row-oriented layout.
        +
        Parameters:
        data - the data
        xScale - the x scale
        yScale - the y scale
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(float[][] data,
        +             JHCDataProvider.Orientation orientation,
        +             JHCScale<?> xScale,
        +             JHCScale<?> yScale)
        +
        Creates a data object
        +
        Parameters:
        data - the data
        orientation - the orientation
        xScale - the x scale
        yScale - the y scale
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static JHCData create(JHCDataProvider provider)
        +
        Creates the.
        +
        Parameters:
        provider - the provider
        +
        Returns:
        the data
        +
      • +
      + + + +
        +
      • +

        getHeatmap

        +
        public abstract JHCHeatmap getHeatmap(int width,
        +                    int height)
        +
        Gets the heat.
        +
        Parameters:
        width - the width
        height - the height
        +
        Returns:
        the heat
        +
      • +
      + + + +
        +
      • +

        getWidth

        +
        public abstract int getWidth()
        +
        Gets the original width of the data
        +
        Returns:
        the width
        +
      • +
      + + + +
        +
      • +

        getHeight

        +
        public abstract int getHeight()
        +
        Gets the original height of the data
        +
        Returns:
        the height
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/swt/de/linearbits/jhc/JHCDataProvider.Orientation.html b/doc/swt/de/linearbits/jhc/JHCDataProvider.Orientation.html new file mode 100644 index 0000000..f6dae41 --- /dev/null +++ b/doc/swt/de/linearbits/jhc/JHCDataProvider.Orientation.html @@ -0,0 +1,324 @@ + + + + + +JHCDataProvider.Orientation (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Enum JHCDataProvider.Orientation

+
+
+ +
+ +
+
+
    +
  • + +
      +
    • + + +

      Enum Constant Summary

      + + + + + + + + + + + +
      Enum Constants 
      Enum Constant and Description
      COLUMN 
      ROW 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      static JHCDataProvider.OrientationvalueOf(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static JHCDataProvider.Orientation[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static JHCDataProvider.Orientation[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (JHCDataProvider.Orientation c : JHCDataProvider.Orientation.values())
        +    System.out.println(c);
        +
        +
        Returns:
        an array containing the constants of this enum type, in +the order they are declared
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static JHCDataProvider.Orientation valueOf(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
        +
        Parameters:
        name - the name of the enum constant to be returned.
        +
        Returns:
        the enum constant with the specified name
        +
        Throws:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant +with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/swt/de/linearbits/jhc/JHCDataProvider.html b/doc/swt/de/linearbits/jhc/JHCDataProvider.html new file mode 100644 index 0000000..0d82e67 --- /dev/null +++ b/doc/swt/de/linearbits/jhc/JHCDataProvider.html @@ -0,0 +1,318 @@ + + + + + +JHCDataProvider (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Interface JHCDataProvider

+
+
+
+
    +
  • +
    +
    +
    public interface JHCDataProvider
    +
    This interface can be implemented to convert data into a representation suitable for the widget
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        get

        +
        double get(int x,
        +         int y)
        +
        Returns the.
        +
        Parameters:
        x - the x
        y - the y
        +
        Returns:
        the double
        +
      • +
      + + + +
        +
      • +

        getHeight

        +
        int getHeight()
        +
        Gets the height.
        +
        Returns:
        the height
        +
      • +
      + + + +
        +
      • +

        getWidth

        +
        int getWidth()
        +
        Gets the width.
        +
        Returns:
        the width
        +
      • +
      + + + + + + + +
        +
      • +

        getXScale

        +
        JHCScale<?> getXScale()
        +
        Gets the x labels.
        +
        Returns:
        the x scale
        +
      • +
      + + + +
        +
      • +

        getYScale

        +
        JHCScale<?> getYScale()
        +
        Gets the y labels.
        +
        Returns:
        the y scale
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/swt/de/linearbits/jhc/JHCGradient.html b/doc/swt/de/linearbits/jhc/JHCGradient.html new file mode 100644 index 0000000..c350455 --- /dev/null +++ b/doc/swt/de/linearbits/jhc/JHCGradient.html @@ -0,0 +1,513 @@ + + + + + +JHCGradient (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHCGradient

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • de.linearbits.jhc.JHCGradient
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class JHCGradient
    +extends java.lang.Object
    +
    The class implements gradients for the heatmap. Some predefined gradients are + inspired by plotly (https://github.com/plotly).
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        GRADIENT_GRAYSCALE

        +
        public static final JHCGradient GRADIENT_GRAYSCALE
        +
        BLACK, GRAY, WHITE
        +
      • +
      + + + +
        +
      • +

        GRADIENT_HEAT

        +
        public static final JHCGradient GRADIENT_HEAT
        +
        BLUE, CYAN, GREEN, YELLOW, ORANGE, RED
        +
      • +
      + + + +
        +
      • +

        GRADIENT_GRAYS

        +
        public static final JHCGradient GRADIENT_GRAYS
        +
        BLACK, LIGHT_GRAY
        +
      • +
      + + + +
        +
      • +

        GRADIENT_YIGNBN

        +
        public static final JHCGradient GRADIENT_YIGNBN
        +
        WHITE, GREEN
        +
      • +
      + + + +
        +
      • +

        GRADIENT_GREENS

        +
        public static final JHCGradient GRADIENT_GREENS
        +
        DARK_GREEN, LIGHT_GREEN
        +
      • +
      + + + +
        +
      • +

        GRADIENT_YIORRD

        +
        public static final JHCGradient GRADIENT_YIORRD
        +
        RED, ORANGE, GOLD, TAN, WHITE
        +
      • +
      + + + +
        +
      • +

        GRADIENT_BLUERED

        +
        public static final JHCGradient GRADIENT_BLUERED
        +
        BRIGHT_BLUE, PURPLE, BRIGHT_RED
        +
      • +
      + + + +
        +
      • +

        GRADIENT_RDBU

        +
        public static final JHCGradient GRADIENT_RDBU
        +
        BLUE, RED
        +
      • +
      + + + +
        +
      • +

        GRADIENT_PICNIC

        +
        public static final JHCGradient GRADIENT_PICNIC
        +
        BLUE, LIGHT_BLUE, WHITE, PINK
        +
      • +
      + + + +
        +
      • +

        GRADIENT_PORTLAND

        +
        public static final JHCGradient GRADIENT_PORTLAND
        +
        BLUE, GREEN, YELLOW, ORANGE, RED
        +
      • +
      + + + +
        +
      • +

        GRADIENT_JET

        +
        public static final JHCGradient GRADIENT_JET
        +
        BLUE, LIGHT_BLUE, GREEN, YELLOW, ORANGE, RED
        +
      • +
      + + + +
        +
      • +

        GRADIENT_HOT

        +
        public static final JHCGradient GRADIENT_HOT
        +
        TAN, YELLOW, RED, BLACK
        +
      • +
      + + + +
        +
      • +

        GRADIENT_BLACKBODY

        +
        public static final JHCGradient GRADIENT_BLACKBODY
        +
        BLACK, RED, YELLOW, WHITE, LIGHT_BLUE
        +
      • +
      + + + +
        +
      • +

        GRADIENT_EARTH

        +
        public static final JHCGradient GRADIENT_EARTH
        +
        BLUE, GREEN, YELLOW, BROWN, TAN, WHITE
        +
      • +
      + + + +
        +
      • +

        GRADIENT_ELECTRIC

        +
        public static final JHCGradient GRADIENT_ELECTRIC
        +
        BLACK, PURPLE, ORANGE, YELLOW, TAN, WHITE
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHCGradient

        +
        public JHCGradient(java.awt.Color[] _colors)
        +
        Instantiates a new gradient.
        +
        Parameters:
        _colors - the _colors
        +
      • +
      + + + +
        +
      • +

        JHCGradient

        +
        public JHCGradient(java.awt.Color[] _colors,
        +           int steps)
        +
        Instantiates a new gradient.
        +
        Parameters:
        _colors - the _colors
        steps - the steps
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/swt/de/linearbits/jhc/JHCHeatmap.Point.html b/doc/swt/de/linearbits/jhc/JHCHeatmap.Point.html new file mode 100644 index 0000000..12c270d --- /dev/null +++ b/doc/swt/de/linearbits/jhc/JHCHeatmap.Point.html @@ -0,0 +1,248 @@ + + + + + +JHCHeatmap.Point (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Interface JHCHeatmap.Point

+
+
+
+
    +
  • +
    +
    Enclosing class:
    +
    JHCHeatmap
    +
    +
    +
    +
    public static interface JHCHeatmap.Point
    +
    This interface represents a point in the heatmap. It is defined by indices on the x- and y-axis where each + index corresponds to the according entry in the current scale.
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      doublegetValue() +
      Gets the value.
      +
      intgetX() +
      Gets the x.
      +
      intgetY() +
      Gets the y.
      +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getValue

        +
        double getValue()
        +
        Gets the value.
        +
        Returns:
        the value
        +
      • +
      + + + +
        +
      • +

        getX

        +
        int getX()
        +
        Gets the x.
        +
        Returns:
        the x
        +
      • +
      + + + +
        +
      • +

        getY

        +
        int getY()
        +
        Gets the y.
        +
        Returns:
        the y
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/swt/de/linearbits/jhc/JHCHeatmap.html b/doc/swt/de/linearbits/jhc/JHCHeatmap.html new file mode 100644 index 0000000..36995a9 --- /dev/null +++ b/doc/swt/de/linearbits/jhc/JHCHeatmap.html @@ -0,0 +1,384 @@ + + + + + +JHCHeatmap (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHCHeatmap

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • de.linearbits.jhc.JHCHeatmap
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public abstract class JHCHeatmap
    +extends java.lang.Object
    +
    This abstract class represents a (potentially scaled) heatmap that has been retrieved from an instance of JHCData
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      + + + + + + + + + + +
      Nested Classes 
      Modifier and TypeClass and Description
      static interface JHCHeatmap.Point +
      This interface represents a point in the heatmap.
      +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      JHCHeatmap() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      abstract intgetHeight() +
      Gets the height.
      +
      abstract doublegetMax() +
      Gets the max.
      +
      abstract doublegetMin() +
      Gets the min.
      +
      abstract intgetWidth() +
      Gets the width.
      +
      abstract java.lang.StringgetXLabel(int index) +
      Gets the x label.
      +
      abstract java.lang.StringgetYLabel(int index) +
      Gets the y label.
      +
      abstract java.util.Iterator<JHCHeatmap.Point>iterator() +
      Iterator.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHCHeatmap

        +
        public JHCHeatmap()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getHeight

        +
        public abstract int getHeight()
        +
        Gets the height.
        +
        Returns:
        the height
        +
      • +
      + + + +
        +
      • +

        getMax

        +
        public abstract double getMax()
        +
        Gets the max.
        +
        Returns:
        the max
        +
      • +
      + + + +
        +
      • +

        getMin

        +
        public abstract double getMin()
        +
        Gets the min.
        +
        Returns:
        the min
        +
      • +
      + + + +
        +
      • +

        getWidth

        +
        public abstract int getWidth()
        +
        Gets the width.
        +
        Returns:
        the width
        +
      • +
      + + + +
        +
      • +

        getXLabel

        +
        public abstract java.lang.String getXLabel(int index)
        +
        Gets the x label.
        +
        Parameters:
        index - the index
        +
        Returns:
        the x label
        +
      • +
      + + + +
        +
      • +

        getYLabel

        +
        public abstract java.lang.String getYLabel(int index)
        +
        Gets the y label.
        +
        Parameters:
        index - the index
        +
        Returns:
        the y label
        +
      • +
      + + + +
        +
      • +

        iterator

        +
        public abstract java.util.Iterator<JHCHeatmap.Point> iterator()
        +
        Iterator.
        +
        Returns:
        the iterator
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/swt/de/linearbits/jhc/JHCLayout.html b/doc/swt/de/linearbits/jhc/JHCLayout.html new file mode 100644 index 0000000..c913790 --- /dev/null +++ b/doc/swt/de/linearbits/jhc/JHCLayout.html @@ -0,0 +1,432 @@ + + + + + +JHCLayout (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHCLayout

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • de.linearbits.jhc.JHCLayout
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class JHCLayout
    +extends java.lang.Object
    +
    This class represents the layout that is to be used when displaying the heatmap
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      JHCLayout() +
      Instantiates a new layout.
      +
      JHCLayout(boolean xTickRotate, + int xTickSpace, + boolean yTickRotate, + int yTickSpace) +
      Instantiates a new layout.
      +
      JHCLayout(int legendWidth, + int largeTickLength, + int smallTickLength) +
      Instantiates a new layout.
      +
      JHCLayout(int legendWidth, + int largeTickLength, + int smallTickLength, + boolean xTickRotate, + int xTickSpace, + boolean yTickRotate, + int yTickSpace) +
      Instantiates a new layout.
      +
      JHCLayout(int offsetLeft, + int offsetRight, + int offsetTop, + int offsetBottom, + int offsetCenter) +
      Instantiates a new layout.
      +
      JHCLayout(int offsetLeft, + int offsetRight, + int offsetTop, + int offsetBottom, + int offsetCenter, + boolean xTickRotate, + int xTickSpace, + boolean yTickRotate, + int yTickSpace) +
      Instantiates a new layout.
      +
      JHCLayout(int offsetLeft, + int offsetRight, + int offsetTop, + int offsetBottom, + int offsetCenter, + int minimalTextWidth, + int legendWidth, + int largeTickLength, + int smallTickLength, + int textOffset) +
      Instantiates a new layout.
      +
      JHCLayout(int offsetLeft, + int offsetRight, + int offsetTop, + int offsetBottom, + int offsetCenter, + int minimalTextWidth, + int legendWidth, + int largeTickLength, + int smallTickLength, + int textOffset, + boolean xTickRotate, + int xTickSpace, + boolean yTickRotate, + int yTickSpace) +
      Instantiates a new layout.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHCLayout

        +
        public JHCLayout()
        +
        Instantiates a new layout.
        +
      • +
      + + + +
        +
      • +

        JHCLayout

        +
        public JHCLayout(boolean xTickRotate,
        +         int xTickSpace,
        +         boolean yTickRotate,
        +         int yTickSpace)
        +
        Instantiates a new layout.
        +
        Parameters:
        xTickRotate - the x tick rotate
        xTickSpace - the x tick space
        yTickRotate - the y tick rotate
        yTickSpace - the y tick space
        +
      • +
      + + + +
        +
      • +

        JHCLayout

        +
        public JHCLayout(int legendWidth,
        +         int largeTickLength,
        +         int smallTickLength)
        +
        Instantiates a new layout.
        +
        Parameters:
        legendWidth - the legend width
        largeTickLength - the large tick length
        smallTickLength - the small tick length
        +
      • +
      + + + +
        +
      • +

        JHCLayout

        +
        public JHCLayout(int legendWidth,
        +         int largeTickLength,
        +         int smallTickLength,
        +         boolean xTickRotate,
        +         int xTickSpace,
        +         boolean yTickRotate,
        +         int yTickSpace)
        +
        Instantiates a new layout.
        +
        Parameters:
        legendWidth - the legend width
        largeTickLength - the large tick length
        smallTickLength - the small tick length
        xTickRotate - the x tick rotate
        xTickSpace - the x tick space
        yTickRotate - the y tick rotate
        yTickSpace - the y tick space
        +
      • +
      + + + +
        +
      • +

        JHCLayout

        +
        public JHCLayout(int offsetLeft,
        +         int offsetRight,
        +         int offsetTop,
        +         int offsetBottom,
        +         int offsetCenter)
        +
        Instantiates a new layout.
        +
        Parameters:
        offsetLeft - the offset left
        offsetRight - the offset right
        offsetTop - the offset top
        offsetBottom - the offset bottom
        offsetCenter - the offset center
        +
      • +
      + + + +
        +
      • +

        JHCLayout

        +
        public JHCLayout(int offsetLeft,
        +         int offsetRight,
        +         int offsetTop,
        +         int offsetBottom,
        +         int offsetCenter,
        +         boolean xTickRotate,
        +         int xTickSpace,
        +         boolean yTickRotate,
        +         int yTickSpace)
        +
        Instantiates a new layout.
        +
        Parameters:
        offsetLeft - the offset left
        offsetRight - the offset right
        offsetTop - the offset top
        offsetBottom - the offset bottom
        offsetCenter - the offset center
        xTickRotate - the x tick rotate
        xTickSpace - the x tick space
        yTickRotate - the y tick rotate
        yTickSpace - the y tick space
        +
      • +
      + + + +
        +
      • +

        JHCLayout

        +
        public JHCLayout(int offsetLeft,
        +         int offsetRight,
        +         int offsetTop,
        +         int offsetBottom,
        +         int offsetCenter,
        +         int minimalTextWidth,
        +         int legendWidth,
        +         int largeTickLength,
        +         int smallTickLength,
        +         int textOffset)
        +
        Instantiates a new layout.
        +
        Parameters:
        offsetLeft - the offset left
        offsetRight - the offset right
        offsetTop - the offset top
        offsetBottom - the offset bottom
        offsetCenter - the offset center
        minimalTextWidth - the minimal text width
        legendWidth - the legend width
        largeTickLength - the large tick length
        smallTickLength - the small tick length
        textOffset - the text offset
        +
      • +
      + + + +
        +
      • +

        JHCLayout

        +
        public JHCLayout(int offsetLeft,
        +         int offsetRight,
        +         int offsetTop,
        +         int offsetBottom,
        +         int offsetCenter,
        +         int minimalTextWidth,
        +         int legendWidth,
        +         int largeTickLength,
        +         int smallTickLength,
        +         int textOffset,
        +         boolean xTickRotate,
        +         int xTickSpace,
        +         boolean yTickRotate,
        +         int yTickSpace)
        +
        Instantiates a new layout.
        +
        Parameters:
        offsetLeft - the offset left
        offsetRight - the offset right
        offsetTop - the offset top
        offsetBottom - the offset bottom
        offsetCenter - the offset center
        minimalTextWidth - the minimal text width
        legendWidth - the legend width
        largeTickLength - the large tick length
        smallTickLength - the small tick length
        textOffset - the text offset
        xTickRotate - the x tick rotate
        xTickSpace - the x tick space
        yTickRotate - the y tick rotate
        yTickSpace - the y tick space
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/swt/de/linearbits/jhc/JHCScale.Date.html b/doc/swt/de/linearbits/jhc/JHCScale.Date.html new file mode 100644 index 0000000..953494d --- /dev/null +++ b/doc/swt/de/linearbits/jhc/JHCScale.Date.html @@ -0,0 +1,277 @@ + + + + + +JHCScale.Date (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHCScale.Date

+
+
+ +
+
    +
  • +
    +
    Enclosing class:
    +
    JHCScale<T>
    +
    +
    +
    +
    public static class JHCScale.Date
    +extends JHCScale<java.util.Date>
    +
    This class implements a data/time scale
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      JHCScale.Date(java.util.Date from, + java.util.Date to) +
      Instantiates a new scale date.
      +
      JHCScale.Date(java.util.Date from, + java.util.Date to, + java.text.DateFormat format) +
      Instantiates a new scale date.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHCScale.Date

        +
        public JHCScale.Date(java.util.Date from,
        +             java.util.Date to)
        +
        Instantiates a new scale date.
        +
        Parameters:
        from - the from
        to - the to
        +
      • +
      + + + +
        +
      • +

        JHCScale.Date

        +
        public JHCScale.Date(java.util.Date from,
        +             java.util.Date to,
        +             java.text.DateFormat format)
        +
        Instantiates a new scale date.
        +
        Parameters:
        from - the from
        to - the to
        format - the format
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/swt/de/linearbits/jhc/JHCScale.Decimal.html b/doc/swt/de/linearbits/jhc/JHCScale.Decimal.html new file mode 100644 index 0000000..cb25223 --- /dev/null +++ b/doc/swt/de/linearbits/jhc/JHCScale.Decimal.html @@ -0,0 +1,277 @@ + + + + + +JHCScale.Decimal (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHCScale.Decimal

+
+
+ +
+
    +
  • +
    +
    Enclosing class:
    +
    JHCScale<T>
    +
    +
    +
    +
    public static class JHCScale.Decimal
    +extends JHCScale<java.lang.Double>
    +
    This class implements a decimal scale
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      JHCScale.Decimal(double from, + double to) +
      Instantiates a new scale decimal.
      +
      JHCScale.Decimal(double from, + double to, + java.text.DecimalFormat format) +
      Instantiates a new scale decimal.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHCScale.Decimal

        +
        public JHCScale.Decimal(double from,
        +                double to)
        +
        Instantiates a new scale decimal.
        +
        Parameters:
        from - the from
        to - the to
        +
      • +
      + + + +
        +
      • +

        JHCScale.Decimal

        +
        public JHCScale.Decimal(double from,
        +                double to,
        +                java.text.DecimalFormat format)
        +
        Instantiates a new scale decimal.
        +
        Parameters:
        from - the from
        to - the to
        format - the format
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/swt/de/linearbits/jhc/JHCScale.Integer.html b/doc/swt/de/linearbits/jhc/JHCScale.Integer.html new file mode 100644 index 0000000..7c4b622 --- /dev/null +++ b/doc/swt/de/linearbits/jhc/JHCScale.Integer.html @@ -0,0 +1,257 @@ + + + + + +JHCScale.Integer (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHCScale.Integer

+
+
+ +
+
    +
  • +
    +
    Enclosing class:
    +
    JHCScale<T>
    +
    +
    +
    +
    public static class JHCScale.Integer
    +extends JHCScale<java.lang.Integer>
    +
    This class implements an integer scale
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      JHCScale.Integer(int from, + int to) +
      Instantiates a new scale integer.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHCScale.Integer

        +
        public JHCScale.Integer(int from,
        +                int to)
        +
        Instantiates a new scale integer.
        +
        Parameters:
        from - the from
        to - the to
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/swt/de/linearbits/jhc/JHCScale.String.html b/doc/swt/de/linearbits/jhc/JHCScale.String.html new file mode 100644 index 0000000..94e903d --- /dev/null +++ b/doc/swt/de/linearbits/jhc/JHCScale.String.html @@ -0,0 +1,255 @@ + + + + + +JHCScale.String (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHCScale.String

+
+
+ +
+
    +
  • +
    +
    Enclosing class:
    +
    JHCScale<T>
    +
    +
    +
    +
    public static class JHCScale.String
    +extends JHCScale<java.lang.String>
    +
    This class implements a string scale
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      JHCScale.String(java.lang.String[] values) +
      Instantiates a new scale string.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHCScale.String

        +
        public JHCScale.String(java.lang.String[] values)
        +
        Instantiates a new scale string.
        +
        Parameters:
        values - the values
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/swt/de/linearbits/jhc/JHCScale.html b/doc/swt/de/linearbits/jhc/JHCScale.html new file mode 100644 index 0000000..9859fcc --- /dev/null +++ b/doc/swt/de/linearbits/jhc/JHCScale.html @@ -0,0 +1,271 @@ + + + + + +JHCScale (JHC API Documentation) + + + + + + + + + + + +
+
de.linearbits.jhc
+

Class JHCScale<T>

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • de.linearbits.jhc.JHCScale<T>
    • +
    +
  • +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      Nested Classes 
      Modifier and TypeClass and Description
      static class JHCScale.Date +
      This class implements a data/time scale
      +
      static class JHCScale.Decimal +
      This class implements a decimal scale
      +
      static class JHCScale.Integer +
      This class implements an integer scale
      +
      static class JHCScale.String +
      This class implements a string scale
      +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      JHCScale() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JHCScale

        +
        public JHCScale()
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/swt/de/linearbits/jhc/class-use/JHC.html b/doc/swt/de/linearbits/jhc/class-use/JHC.html new file mode 100644 index 0000000..a7dbaec --- /dev/null +++ b/doc/swt/de/linearbits/jhc/class-use/JHC.html @@ -0,0 +1,113 @@ + + + + + +Uses of Class de.linearbits.jhc.JHC (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHC

+
+
No usage of de.linearbits.jhc.JHC
+ + + + + + diff --git a/doc/swt/de/linearbits/jhc/class-use/JHCConfiguration.html b/doc/swt/de/linearbits/jhc/class-use/JHCConfiguration.html new file mode 100644 index 0000000..1fc61d1 --- /dev/null +++ b/doc/swt/de/linearbits/jhc/class-use/JHCConfiguration.html @@ -0,0 +1,141 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCConfiguration (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCConfiguration

+
+
+ +
+ + + + + + diff --git a/doc/swt/de/linearbits/jhc/class-use/JHCData.html b/doc/swt/de/linearbits/jhc/class-use/JHCData.html new file mode 100644 index 0000000..0c6de7c --- /dev/null +++ b/doc/swt/de/linearbits/jhc/class-use/JHCData.html @@ -0,0 +1,271 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCData (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCData

+
+
+ +
+ + + + + + diff --git a/doc/swt/de/linearbits/jhc/class-use/JHCDataProvider.Orientation.html b/doc/swt/de/linearbits/jhc/class-use/JHCDataProvider.Orientation.html new file mode 100644 index 0000000..f6de1cf --- /dev/null +++ b/doc/swt/de/linearbits/jhc/class-use/JHCDataProvider.Orientation.html @@ -0,0 +1,207 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCDataProvider.Orientation (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCDataProvider.Orientation

+
+
+ +
+ + + + + + diff --git a/doc/swt/de/linearbits/jhc/class-use/JHCDataProvider.html b/doc/swt/de/linearbits/jhc/class-use/JHCDataProvider.html new file mode 100644 index 0000000..beb7435 --- /dev/null +++ b/doc/swt/de/linearbits/jhc/class-use/JHCDataProvider.html @@ -0,0 +1,140 @@ + + + + + +Uses of Interface de.linearbits.jhc.JHCDataProvider (JHC API Documentation) + + + + + + + + + + +
+

Uses of Interface
de.linearbits.jhc.JHCDataProvider

+
+
+ +
+ + + + + + diff --git a/doc/swt/de/linearbits/jhc/class-use/JHCGradient.html b/doc/swt/de/linearbits/jhc/class-use/JHCGradient.html new file mode 100644 index 0000000..01a84f0 --- /dev/null +++ b/doc/swt/de/linearbits/jhc/class-use/JHCGradient.html @@ -0,0 +1,266 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCGradient (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCGradient

+
+
+ +
+ + + + + + diff --git a/doc/swt/de/linearbits/jhc/class-use/JHCHeatmap.Point.html b/doc/swt/de/linearbits/jhc/class-use/JHCHeatmap.Point.html new file mode 100644 index 0000000..13ec189 --- /dev/null +++ b/doc/swt/de/linearbits/jhc/class-use/JHCHeatmap.Point.html @@ -0,0 +1,140 @@ + + + + + +Uses of Interface de.linearbits.jhc.JHCHeatmap.Point (JHC API Documentation) + + + + + + + + + + +
+

Uses of Interface
de.linearbits.jhc.JHCHeatmap.Point

+
+
+ +
+ + + + + + diff --git a/doc/swt/de/linearbits/jhc/class-use/JHCHeatmap.html b/doc/swt/de/linearbits/jhc/class-use/JHCHeatmap.html new file mode 100644 index 0000000..694fd5e --- /dev/null +++ b/doc/swt/de/linearbits/jhc/class-use/JHCHeatmap.html @@ -0,0 +1,141 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCHeatmap (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCHeatmap

+
+
+ +
+ + + + + + diff --git a/doc/swt/de/linearbits/jhc/class-use/JHCLayout.html b/doc/swt/de/linearbits/jhc/class-use/JHCLayout.html new file mode 100644 index 0000000..34feee7 --- /dev/null +++ b/doc/swt/de/linearbits/jhc/class-use/JHCLayout.html @@ -0,0 +1,151 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCLayout (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCLayout

+
+
+ +
+ + + + + + diff --git a/doc/swt/de/linearbits/jhc/class-use/JHCScale.Date.html b/doc/swt/de/linearbits/jhc/class-use/JHCScale.Date.html new file mode 100644 index 0000000..caedf93 --- /dev/null +++ b/doc/swt/de/linearbits/jhc/class-use/JHCScale.Date.html @@ -0,0 +1,113 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCScale.Date (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCScale.Date

+
+
No usage of de.linearbits.jhc.JHCScale.Date
+ + + + + + diff --git a/doc/swt/de/linearbits/jhc/class-use/JHCScale.Decimal.html b/doc/swt/de/linearbits/jhc/class-use/JHCScale.Decimal.html new file mode 100644 index 0000000..09af9e4 --- /dev/null +++ b/doc/swt/de/linearbits/jhc/class-use/JHCScale.Decimal.html @@ -0,0 +1,113 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCScale.Decimal (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCScale.Decimal

+
+
No usage of de.linearbits.jhc.JHCScale.Decimal
+ + + + + + diff --git a/doc/swt/de/linearbits/jhc/class-use/JHCScale.Integer.html b/doc/swt/de/linearbits/jhc/class-use/JHCScale.Integer.html new file mode 100644 index 0000000..1cd4302 --- /dev/null +++ b/doc/swt/de/linearbits/jhc/class-use/JHCScale.Integer.html @@ -0,0 +1,113 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCScale.Integer (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCScale.Integer

+
+
No usage of de.linearbits.jhc.JHCScale.Integer
+ + + + + + diff --git a/doc/swt/de/linearbits/jhc/class-use/JHCScale.String.html b/doc/swt/de/linearbits/jhc/class-use/JHCScale.String.html new file mode 100644 index 0000000..9a47dec --- /dev/null +++ b/doc/swt/de/linearbits/jhc/class-use/JHCScale.String.html @@ -0,0 +1,113 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCScale.String (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCScale.String

+
+
No usage of de.linearbits.jhc.JHCScale.String
+ + + + + + diff --git a/doc/swt/de/linearbits/jhc/class-use/JHCScale.html b/doc/swt/de/linearbits/jhc/class-use/JHCScale.html new file mode 100644 index 0000000..77eefcc --- /dev/null +++ b/doc/swt/de/linearbits/jhc/class-use/JHCScale.html @@ -0,0 +1,358 @@ + + + + + +Uses of Class de.linearbits.jhc.JHCScale (JHC API Documentation) + + + + + + + + + + +
+

Uses of Class
de.linearbits.jhc.JHCScale

+
+
+ +
+ + + + + + diff --git a/doc/swt/de/linearbits/jhc/package-frame.html b/doc/swt/de/linearbits/jhc/package-frame.html new file mode 100644 index 0000000..7efed52 --- /dev/null +++ b/doc/swt/de/linearbits/jhc/package-frame.html @@ -0,0 +1,38 @@ + + + + + +de.linearbits.jhc (JHC API Documentation) + + + + +

de.linearbits.jhc

+ + + diff --git a/doc/swt/de/linearbits/jhc/package-summary.html b/doc/swt/de/linearbits/jhc/package-summary.html new file mode 100644 index 0000000..402b5ae --- /dev/null +++ b/doc/swt/de/linearbits/jhc/package-summary.html @@ -0,0 +1,242 @@ + + + + + +de.linearbits.jhc (JHC API Documentation) + + + + + + + + + + +
+

Package de.linearbits.jhc

+
+
This package provides a heatmap widget for SWT
+
+

See: Description

+
+
+
    +
  • + + + + + + + + + + + + + + + + +
    Interface Summary 
    InterfaceDescription
    JHCDataProvider +
    This interface can be implemented to convert data into a representation suitable for the widget
    +
    JHCHeatmap.Point +
    This interface represents a point in the heatmap.
    +
    +
  • +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    JHC +
    This class implements a heatmap widget for SWT
    +
    JHCConfiguration +
    This class allows to configure how the heatmap is displayed.
    +
    JHCData +
    This class defines the abstract base type for data that can be handled by the widget/control.
    +
    JHCGradient +
    The class implements gradients for the heatmap.
    +
    JHCHeatmap +
    This abstract class represents a (potentially scaled) heatmap that has been retrieved from an instance of JHCData
    +
    JHCLayout +
    This class represents the layout that is to be used when displaying the heatmap
    +
    JHCScale<T> +
    This class provides an abstract type for scales
    +
    JHCScale.Date +
    This class implements a data/time scale
    +
    JHCScale.Decimal +
    This class implements a decimal scale
    +
    JHCScale.Integer +
    This class implements an integer scale
    +
    JHCScale.String +
    This class implements a string scale
    +
    +
  • +
  • + + + + + + + + + + + + +
    Enum Summary 
    EnumDescription
    JHCDataProvider.Orientation +
    Data orientation
    +
    +
  • +
+ + + +

Package de.linearbits.jhc Description

+
This package provides a heatmap widget for SWT
+
+ + + + + + diff --git a/doc/swt/de/linearbits/jhc/package-tree.html b/doc/swt/de/linearbits/jhc/package-tree.html new file mode 100644 index 0000000..2fed67c --- /dev/null +++ b/doc/swt/de/linearbits/jhc/package-tree.html @@ -0,0 +1,152 @@ + + + + + +de.linearbits.jhc Class Hierarchy (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
+

Hierarchy For Package de.linearbits.jhc

+
+
+

Class Hierarchy

+ +

Interface Hierarchy

+ +

Enum Hierarchy

+
    +
  • java.lang.Object + +
  • +
+
+ +
+ + + + + +
+ + + + diff --git a/doc/swt/de/linearbits/jhc/package-use.html b/doc/swt/de/linearbits/jhc/package-use.html new file mode 100644 index 0000000..3b9771a --- /dev/null +++ b/doc/swt/de/linearbits/jhc/package-use.html @@ -0,0 +1,173 @@ + + + + + +Uses of Package de.linearbits.jhc (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Package
de.linearbits.jhc

+
+
+
    +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Classes in de.linearbits.jhc used by de.linearbits.jhc 
    Class and Description
    JHCConfiguration +
    This class allows to configure how the heatmap is displayed.
    +
    JHCData +
    This class defines the abstract base type for data that can be handled by the widget/control.
    +
    JHCDataProvider +
    This interface can be implemented to convert data into a representation suitable for the widget
    +
    JHCDataProvider.Orientation +
    Data orientation
    +
    JHCGradient +
    The class implements gradients for the heatmap.
    +
    JHCHeatmap +
    This abstract class represents a (potentially scaled) heatmap that has been retrieved from an instance of JHCData
    +
    JHCHeatmap.Point +
    This interface represents a point in the heatmap.
    +
    JHCLayout +
    This class represents the layout that is to be used when displaying the heatmap
    +
    JHCScale +
    This class provides an abstract type for scales
    +
    +
  • +
+
+ +
+ + + + + +
+ + + + diff --git a/doc/swt/deprecated-list.html b/doc/swt/deprecated-list.html new file mode 100644 index 0000000..f2e0a7a --- /dev/null +++ b/doc/swt/deprecated-list.html @@ -0,0 +1,113 @@ + + + + + +Deprecated List (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
+

Deprecated API

+

Contents

+
+ +
+ + + + + +
+ + + + diff --git a/doc/swt/help-doc.html b/doc/swt/help-doc.html new file mode 100644 index 0000000..75dbba7 --- /dev/null +++ b/doc/swt/help-doc.html @@ -0,0 +1,214 @@ + + + + + +API Help (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
+

How This API Document Is Organized

+
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+
    +
  • +

    Package

    +

    Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:

    +
      +
    • Interfaces (italic)
    • +
    • Classes
    • +
    • Enums
    • +
    • Exceptions
    • +
    • Errors
    • +
    • Annotation Types
    • +
    +
  • +
  • +

    Class/Interface

    +

    Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

    +
      +
    • Class inheritance diagram
    • +
    • Direct Subclasses
    • +
    • All Known Subinterfaces
    • +
    • All Known Implementing Classes
    • +
    • Class/interface declaration
    • +
    • Class/interface description
    • +
    +
      +
    • Nested Class Summary
    • +
    • Field Summary
    • +
    • Constructor Summary
    • +
    • Method Summary
    • +
    +
      +
    • Field Detail
    • +
    • Constructor Detail
    • +
    • Method Detail
    • +
    +

    Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

    +
  • +
  • +

    Annotation Type

    +

    Each annotation type has its own separate page with the following sections:

    +
      +
    • Annotation Type declaration
    • +
    • Annotation Type description
    • +
    • Required Element Summary
    • +
    • Optional Element Summary
    • +
    • Element Detail
    • +
    +
  • +
  • +

    Enum

    +

    Each enum has its own separate page with the following sections:

    +
      +
    • Enum declaration
    • +
    • Enum description
    • +
    • Enum Constant Summary
    • +
    • Enum Constant Detail
    • +
    +
  • +
  • +

    Use

    +

    Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.

    +
  • +
  • +

    Tree (Class Hierarchy)

    +

    There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.

    +
      +
    • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
    • +
    • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
    • +
    +
  • +
  • +

    Deprecated API

    +

    The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

    +
  • +
  • +

    Index

    +

    The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

    +
  • +
  • +

    Prev/Next

    +

    These links take you to the next or previous class, interface, package, or related page.

    +
  • +
  • +

    Frames/No Frames

    +

    These links show and hide the HTML frames. All pages are available with or without frames.

    +
  • +
  • +

    All Classes

    +

    The All Classes link shows all classes and interfaces except non-static nested types.

    +
  • +
  • +

    Serialized Form

    +

    Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

    +
  • +
  • +

    Constant Field Values

    +

    The Constant Field Values page lists the static final fields and their values.

    +
  • +
+This help file applies to API documentation generated using the standard doclet.
+ +
+ + + + + +
+ + + + diff --git a/doc/swt/index-files/index-1.html b/doc/swt/index-files/index-1.html new file mode 100644 index 0000000..c7a88bb --- /dev/null +++ b/doc/swt/index-files/index-1.html @@ -0,0 +1,180 @@ + + + + + +C-Index (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
C D G I J S V  + + +

C

+
+
create(double[][]) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object.
+
+
create(double[][], JHCScale<?>, JHCScale<?>) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object.
+
+
create(double[][], JHCDataProvider.Orientation, JHCScale<?>, JHCScale<?>) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object
+
+
create(char[][]) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object.
+
+
create(char[][], JHCScale<?>, JHCScale<?>) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object.
+
+
create(char[][], JHCDataProvider.Orientation, JHCScale<?>, JHCScale<?>) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object
+
+
create(int[][]) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object.
+
+
create(int[][], JHCScale<?>, JHCScale<?>) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object.
+
+
create(int[][], JHCDataProvider.Orientation, JHCScale<?>, JHCScale<?>) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object
+
+
create(long[][]) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object.
+
+
create(long[][], JHCScale<?>, JHCScale<?>) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object.
+
+
create(long[][], JHCDataProvider.Orientation, JHCScale<?>, JHCScale<?>) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object
+
+
create(float[][]) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object.
+
+
create(float[][], JHCScale<?>, JHCScale<?>) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object.
+
+
create(float[][], JHCDataProvider.Orientation, JHCScale<?>, JHCScale<?>) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates a data object
+
+
create(JHCDataProvider) - Static method in class de.linearbits.jhc.JHCData
+
+
Creates the.
+
+
+C D G I J S V 
+ +
+ + + + + +
+ + + + diff --git a/doc/swt/index-files/index-2.html b/doc/swt/index-files/index-2.html new file mode 100644 index 0000000..f8b1c7b --- /dev/null +++ b/doc/swt/index-files/index-2.html @@ -0,0 +1,120 @@ + + + + + +D-Index (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
C D G I J S V  + + +

D

+
+
de.linearbits.jhc - package de.linearbits.jhc
+
+
This package provides a heatmap widget for SWT
+
+
+C D G I J S V 
+ +
+ + + + + +
+ + + + diff --git a/doc/swt/index-files/index-3.html b/doc/swt/index-files/index-3.html new file mode 100644 index 0000000..710f6c8 --- /dev/null +++ b/doc/swt/index-files/index-3.html @@ -0,0 +1,256 @@ + + + + + +G-Index (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
C D G I J S V  + + +

G

+
+
get(int, int) - Method in interface de.linearbits.jhc.JHCDataProvider
+
+
Returns the.
+
+
getBackground() - Method in class de.linearbits.jhc.JHC
+
+
Returns the background color
+
+
getFont() - Method in class de.linearbits.jhc.JHC
+
+
Returns the font
+
+
getHeatmap(int, int) - Method in class de.linearbits.jhc.JHCData
+
+
Gets the heat.
+
+
getHeight() - Method in class de.linearbits.jhc.JHCData
+
+
Gets the original height of the data
+
+
getHeight() - Method in interface de.linearbits.jhc.JHCDataProvider
+
+
Gets the height.
+
+
getHeight() - Method in class de.linearbits.jhc.JHCHeatmap
+
+
Gets the height.
+
+
getMax() - Method in class de.linearbits.jhc.JHCHeatmap
+
+
Gets the max.
+
+
getMin() - Method in class de.linearbits.jhc.JHCHeatmap
+
+
Gets the min.
+
+
getOrientation() - Method in interface de.linearbits.jhc.JHCDataProvider
+
+
Gets the orientation.
+
+
getValue() - Method in interface de.linearbits.jhc.JHCHeatmap.Point
+
+
Gets the value.
+
+
getWidth() - Method in class de.linearbits.jhc.JHCData
+
+
Gets the original width of the data
+
+
getWidth() - Method in interface de.linearbits.jhc.JHCDataProvider
+
+
Gets the width.
+
+
getWidth() - Method in class de.linearbits.jhc.JHCHeatmap
+
+
Gets the width.
+
+
getX() - Method in interface de.linearbits.jhc.JHCHeatmap.Point
+
+
Gets the x.
+
+
getXLabel(int) - Method in class de.linearbits.jhc.JHCHeatmap
+
+
Gets the x label.
+
+
getXScale() - Method in interface de.linearbits.jhc.JHCDataProvider
+
+
Gets the x labels.
+
+
getY() - Method in interface de.linearbits.jhc.JHCHeatmap.Point
+
+
Gets the y.
+
+
getYLabel(int) - Method in class de.linearbits.jhc.JHCHeatmap
+
+
Gets the y label.
+
+
getYScale() - Method in interface de.linearbits.jhc.JHCDataProvider
+
+
Gets the y labels.
+
+
GRADIENT_BLACKBODY - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BLACK, RED, YELLOW, WHITE, LIGHT_BLUE
+
+
GRADIENT_BLUERED - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BRIGHT_BLUE, PURPLE, BRIGHT_RED
+
+
GRADIENT_EARTH - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BLUE, GREEN, YELLOW, BROWN, TAN, WHITE
+
+
GRADIENT_ELECTRIC - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BLACK, PURPLE, ORANGE, YELLOW, TAN, WHITE
+
+
GRADIENT_GRAYS - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BLACK, LIGHT_GRAY
+
+
GRADIENT_GRAYSCALE - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BLACK, GRAY, WHITE
+
+
GRADIENT_GREENS - Static variable in class de.linearbits.jhc.JHCGradient
+
+
DARK_GREEN, LIGHT_GREEN
+
+
GRADIENT_HEAT - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BLUE, CYAN, GREEN, YELLOW, ORANGE, RED
+
+
GRADIENT_HOT - Static variable in class de.linearbits.jhc.JHCGradient
+
+
TAN, YELLOW, RED, BLACK
+
+
GRADIENT_JET - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BLUE, LIGHT_BLUE, GREEN, YELLOW, ORANGE, RED
+
+
GRADIENT_PICNIC - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BLUE, LIGHT_BLUE, WHITE, PINK
+
+
GRADIENT_PORTLAND - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BLUE, GREEN, YELLOW, ORANGE, RED
+
+
GRADIENT_RDBU - Static variable in class de.linearbits.jhc.JHCGradient
+
+
BLUE, RED
+
+
GRADIENT_YIGNBN - Static variable in class de.linearbits.jhc.JHCGradient
+
+
WHITE, GREEN
+
+
GRADIENT_YIORRD - Static variable in class de.linearbits.jhc.JHCGradient
+
+
RED, ORANGE, GOLD, TAN, WHITE
+
+
+C D G I J S V 
+ +
+ + + + + +
+ + + + diff --git a/doc/swt/index-files/index-4.html b/doc/swt/index-files/index-4.html new file mode 100644 index 0000000..a77cd87 --- /dev/null +++ b/doc/swt/index-files/index-4.html @@ -0,0 +1,120 @@ + + + + + +I-Index (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
C D G I J S V  + + +

I

+
+
iterator() - Method in class de.linearbits.jhc.JHCHeatmap
+
+
Iterator.
+
+
+C D G I J S V 
+ +
+ + + + + +
+ + + + diff --git a/doc/swt/index-files/index-5.html b/doc/swt/index-files/index-5.html new file mode 100644 index 0000000..39faed5 --- /dev/null +++ b/doc/swt/index-files/index-5.html @@ -0,0 +1,262 @@ + + + + + +J-Index (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
C D G I J S V  + + +

J

+
+
JHC - Class in de.linearbits.jhc
+
+
This class implements a heatmap widget for SWT
+
+
JHC(Composite, int) - Constructor for class de.linearbits.jhc.JHC
+
+
Creates a new instance
+
+
JHCConfiguration - Class in de.linearbits.jhc
+
+
This class allows to configure how the heatmap is displayed.
+
+
JHCConfiguration(String, String, int, int, JHCGradient) - Constructor for class de.linearbits.jhc.JHCConfiguration
+
+
Instantiates a new configuration.
+
+
JHCConfiguration(String, String, int, int, JHCGradient, JHCLayout) - Constructor for class de.linearbits.jhc.JHCConfiguration
+
+
Instantiates a new configuration.
+
+
JHCConfiguration(String, String, JHCGradient) - Constructor for class de.linearbits.jhc.JHCConfiguration
+
+
Instantiates a new configuration.
+
+
JHCConfiguration(String, String, JHCGradient, JHCLayout) - Constructor for class de.linearbits.jhc.JHCConfiguration
+
+
Instantiates a new configuration.
+
+
JHCData - Class in de.linearbits.jhc
+
+
This class defines the abstract base type for data that can be handled by the widget/control.
+
+
JHCData() - Constructor for class de.linearbits.jhc.JHCData
+
 
+
JHCDataProvider - Interface in de.linearbits.jhc
+
+
This interface can be implemented to convert data into a representation suitable for the widget
+
+
JHCDataProvider.Orientation - Enum in de.linearbits.jhc
+
+
Data orientation
+
+
JHCGradient - Class in de.linearbits.jhc
+
+
The class implements gradients for the heatmap.
+
+
JHCGradient(Color[]) - Constructor for class de.linearbits.jhc.JHCGradient
+
+
Instantiates a new gradient.
+
+
JHCGradient(Color[], int) - Constructor for class de.linearbits.jhc.JHCGradient
+
+
Instantiates a new gradient.
+
+
JHCHeatmap - Class in de.linearbits.jhc
+
+
This abstract class represents a (potentially scaled) heatmap that has been retrieved from an instance of JHCData
+
+
JHCHeatmap() - Constructor for class de.linearbits.jhc.JHCHeatmap
+
 
+
JHCHeatmap.Point - Interface in de.linearbits.jhc
+
+
This interface represents a point in the heatmap.
+
+
JHCLayout - Class in de.linearbits.jhc
+
+
This class represents the layout that is to be used when displaying the heatmap
+
+
JHCLayout() - Constructor for class de.linearbits.jhc.JHCLayout
+
+
Instantiates a new layout.
+
+
JHCLayout(boolean, int, boolean, int) - Constructor for class de.linearbits.jhc.JHCLayout
+
+
Instantiates a new layout.
+
+
JHCLayout(int, int, int) - Constructor for class de.linearbits.jhc.JHCLayout
+
+
Instantiates a new layout.
+
+
JHCLayout(int, int, int, boolean, int, boolean, int) - Constructor for class de.linearbits.jhc.JHCLayout
+
+
Instantiates a new layout.
+
+
JHCLayout(int, int, int, int, int) - Constructor for class de.linearbits.jhc.JHCLayout
+
+
Instantiates a new layout.
+
+
JHCLayout(int, int, int, int, int, boolean, int, boolean, int) - Constructor for class de.linearbits.jhc.JHCLayout
+
+
Instantiates a new layout.
+
+
JHCLayout(int, int, int, int, int, int, int, int, int, int) - Constructor for class de.linearbits.jhc.JHCLayout
+
+
Instantiates a new layout.
+
+
JHCLayout(int, int, int, int, int, int, int, int, int, int, boolean, int, boolean, int) - Constructor for class de.linearbits.jhc.JHCLayout
+
+
Instantiates a new layout.
+
+
JHCScale<T> - Class in de.linearbits.jhc
+
+
This class provides an abstract type for scales
+
+
JHCScale() - Constructor for class de.linearbits.jhc.JHCScale
+
 
+
JHCScale.Date - Class in de.linearbits.jhc
+
+
This class implements a data/time scale
+
+
JHCScale.Date(Date, Date) - Constructor for class de.linearbits.jhc.JHCScale.Date
+
+
Instantiates a new scale date.
+
+
JHCScale.Date(Date, Date, DateFormat) - Constructor for class de.linearbits.jhc.JHCScale.Date
+
+
Instantiates a new scale date.
+
+
JHCScale.Decimal - Class in de.linearbits.jhc
+
+
This class implements a decimal scale
+
+
JHCScale.Decimal(double, double) - Constructor for class de.linearbits.jhc.JHCScale.Decimal
+
+
Instantiates a new scale decimal.
+
+
JHCScale.Decimal(double, double, DecimalFormat) - Constructor for class de.linearbits.jhc.JHCScale.Decimal
+
+
Instantiates a new scale decimal.
+
+
JHCScale.Integer - Class in de.linearbits.jhc
+
+
This class implements an integer scale
+
+
JHCScale.Integer(int, int) - Constructor for class de.linearbits.jhc.JHCScale.Integer
+
+
Instantiates a new scale integer.
+
+
JHCScale.String - Class in de.linearbits.jhc
+
+
This class implements a string scale
+
+
JHCScale.String(String[]) - Constructor for class de.linearbits.jhc.JHCScale.String
+
+
Instantiates a new scale string.
+
+
+C D G I J S V 
+ +
+ + + + + +
+ + + + diff --git a/doc/swt/index-files/index-6.html b/doc/swt/index-files/index-6.html new file mode 100644 index 0000000..fc4e17a --- /dev/null +++ b/doc/swt/index-files/index-6.html @@ -0,0 +1,132 @@ + + + + + +S-Index (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
C D G I J S V  + + +

S

+
+
setBackground(Color) - Method in class de.linearbits.jhc.JHC
+
+
Sets the background color
+
+
setData(JHCData, JHCConfiguration) - Method in class de.linearbits.jhc.JHC
+
+
Sets the data to be displayed by this widget
+
+
setFont(Font) - Method in class de.linearbits.jhc.JHC
+
+
Sets the font
+
+
setLayoutData(Object) - Method in class de.linearbits.jhc.JHC
+
+
Sets the layout data
+
+
+C D G I J S V 
+ +
+ + + + + +
+ + + + diff --git a/doc/swt/index-files/index-7.html b/doc/swt/index-files/index-7.html new file mode 100644 index 0000000..4b692d0 --- /dev/null +++ b/doc/swt/index-files/index-7.html @@ -0,0 +1,125 @@ + + + + + +V-Index (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
C D G I J S V  + + +

V

+
+
valueOf(String) - Static method in enum de.linearbits.jhc.JHCDataProvider.Orientation
+
+
Returns the enum constant of this type with the specified name.
+
+
values() - Static method in enum de.linearbits.jhc.JHCDataProvider.Orientation
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
+C D G I J S V 
+ +
+ + + + + +
+ + + + diff --git a/doc/swt/index.html b/doc/swt/index.html new file mode 100644 index 0000000..cedb4cc --- /dev/null +++ b/doc/swt/index.html @@ -0,0 +1,30 @@ + + + + + +JHC API Documentation + + + + + + +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<h2>Frame Alert</h2> +<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="de/linearbits/jhc/package-summary.html">Non-frame version</a>.</p> + + + diff --git a/doc/swt/overview-tree.html b/doc/swt/overview-tree.html new file mode 100644 index 0000000..df1bd52 --- /dev/null +++ b/doc/swt/overview-tree.html @@ -0,0 +1,156 @@ + + + + + +Class Hierarchy (JHC API Documentation) + + + + + + + +
+ + + + + +
+ + +
+

Hierarchy For All Packages

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +

Interface Hierarchy

+ +

Enum Hierarchy

+
    +
  • java.lang.Object + +
  • +
+
+ +
+ + + + + +
+ + + + diff --git a/doc/swt/package-list b/doc/swt/package-list new file mode 100644 index 0000000..fa1bfd4 --- /dev/null +++ b/doc/swt/package-list @@ -0,0 +1 @@ +de.linearbits.jhc diff --git a/doc/swt/resources/background.gif b/doc/swt/resources/background.gif new file mode 100644 index 0000000..f471940 Binary files /dev/null and b/doc/swt/resources/background.gif differ diff --git a/doc/swt/resources/tab.gif b/doc/swt/resources/tab.gif new file mode 100644 index 0000000..1a73a83 Binary files /dev/null and b/doc/swt/resources/tab.gif differ diff --git a/doc/swt/resources/titlebar.gif b/doc/swt/resources/titlebar.gif new file mode 100644 index 0000000..17443b3 Binary files /dev/null and b/doc/swt/resources/titlebar.gif differ diff --git a/doc/swt/resources/titlebar_end.gif b/doc/swt/resources/titlebar_end.gif new file mode 100644 index 0000000..3ad78d4 Binary files /dev/null and b/doc/swt/resources/titlebar_end.gif differ diff --git a/doc/swt/stylesheet.css b/doc/swt/stylesheet.css new file mode 100644 index 0000000..0aeaa97 --- /dev/null +++ b/doc/swt/stylesheet.css @@ -0,0 +1,474 @@ +/* Javadoc style sheet */ +/* +Overall document style +*/ +body { + background-color:#ffffff; + color:#353833; + font-family:Arial, Helvetica, sans-serif; + font-size:76%; + margin:0; +} +a:link, a:visited { + text-decoration:none; + color:#4c6b87; +} +a:hover, a:focus { + text-decoration:none; + color:#bb7a2a; +} +a:active { + text-decoration:none; + color:#4c6b87; +} +a[name] { + color:#353833; +} +a[name]:hover { + text-decoration:none; + color:#353833; +} +pre { + font-size:1.3em; +} +h1 { + font-size:1.8em; +} +h2 { + font-size:1.5em; +} +h3 { + font-size:1.4em; +} +h4 { + font-size:1.3em; +} +h5 { + font-size:1.2em; +} +h6 { + font-size:1.1em; +} +ul { + list-style-type:disc; +} +code, tt { + font-size:1.2em; +} +dt code { + font-size:1.2em; +} +table tr td dt code { + font-size:1.2em; + vertical-align:top; +} +sup { + font-size:.6em; +} +/* +Document title and Copyright styles +*/ +.clear { + clear:both; + height:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:.8em; + z-index:200; + margin-top:-7px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + background-image:url(resources/titlebar.gif); + background-position:left top; + background-repeat:no-repeat; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* +Navigation bar styles +*/ +.bar { + background-image:url(resources/background.gif); + background-repeat:repeat-x; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:1em; + margin:0; +} +.topNav { + background-image:url(resources/background.gif); + background-repeat:repeat-x; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; +} +.bottomNav { + margin-top:10px; + background-image:url(resources/background.gif); + background-repeat:repeat-x; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; +} +.subNav { + background-color:#dee3e9; + border-bottom:1px solid #9eadc0; + float:left; + width:100%; + overflow:hidden; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding:3px 6px; +} +ul.subNavList li{ + list-style:none; + float:left; + font-size:90%; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; +} +.navBarCell1Rev { + background-image:url(resources/tab.gif); + background-color:#a88834; + color:#FFFFFF; + margin: auto 5px; + border:1px solid #c9aa44; +} +/* +Page header and footer styles +*/ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexHeader { + margin:10px; + position:relative; +} +.indexHeader h1 { + font-size:1.3em; +} +.title { + color:#2c4557; + margin:10px 0; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 25px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:1.2em; +} +/* +Heading styles +*/ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border-top:1px solid #9eadc0; + border-bottom:1px solid #9eadc0; + margin:0 0 6px -8px; + padding:2px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border-top:1px solid #9eadc0; + border-bottom:1px solid #9eadc0; + margin:0 0 6px -8px; + padding:2px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* +Page layout container styles +*/ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:1.0em; +} +.indexContainer h2 { + font-size:1.1em; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:1.1em; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:10px 0 10px 20px; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* +List styles +*/ +ul.horizontal li { + display:inline; + font-size:0.9em; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:25px; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #9eadc0; + background-color:#f9f9f9; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:1px solid #9eadc0; + border-top:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; + border-bottom:1px solid #9eadc0; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* +Table styles +*/ +.contentContainer table, .classUseContainer table, .constantValuesContainer table { + border-bottom:1px solid #9eadc0; + width:100%; +} +.contentContainer ul li table, .classUseContainer ul li table, .constantValuesContainer ul li table { + width:100%; +} +.contentContainer .description table, .contentContainer .details table { + border-bottom:none; +} +.contentContainer ul li table th.colOne, .contentContainer ul li table th.colFirst, .contentContainer ul li table th.colLast, .classUseContainer ul li table th, .constantValuesContainer ul li table th, .contentContainer ul li table td.colOne, .contentContainer ul li table td.colFirst, .contentContainer ul li table td.colLast, .classUseContainer ul li table td, .constantValuesContainer ul li table td{ + vertical-align:top; + padding-right:20px; +} +.contentContainer ul li table th.colLast, .classUseContainer ul li table th.colLast,.constantValuesContainer ul li table th.colLast, +.contentContainer ul li table td.colLast, .classUseContainer ul li table td.colLast,.constantValuesContainer ul li table td.colLast, +.contentContainer ul li table th.colOne, .classUseContainer ul li table th.colOne, +.contentContainer ul li table td.colOne, .classUseContainer ul li table td.colOne { + padding-right:3px; +} +.overviewSummary caption, .packageSummary caption, .contentContainer ul.blockList li.blockList caption, .summary caption, .classUseContainer caption, .constantValuesContainer caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#FFFFFF; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + margin:0px; +} +caption a:link, caption a:hover, caption a:active, caption a:visited { + color:#FFFFFF; +} +.overviewSummary caption span, .packageSummary caption span, .contentContainer ul.blockList li.blockList caption span, .summary caption span, .classUseContainer caption span, .constantValuesContainer caption span { + white-space:nowrap; + padding-top:8px; + padding-left:8px; + display:block; + float:left; + background-image:url(resources/titlebar.gif); + height:18px; +} +.overviewSummary .tabEnd, .packageSummary .tabEnd, .contentContainer ul.blockList li.blockList .tabEnd, .summary .tabEnd, .classUseContainer .tabEnd, .constantValuesContainer .tabEnd { + width:10px; + background-image:url(resources/titlebar_end.gif); + background-repeat:no-repeat; + background-position:top right; + position:relative; + float:left; +} +ul.blockList ul.blockList li.blockList table { + margin:0 0 12px 0px; + width:100%; +} +.tableSubHeadingColor { + background-color: #EEEEFF; +} +.altColor { + background-color:#eeeeef; +} +.rowColor { + background-color:#ffffff; +} +.overviewSummary td, .packageSummary td, .contentContainer ul.blockList li.blockList td, .summary td, .classUseContainer td, .constantValuesContainer td { + text-align:left; + padding:3px 3px 3px 7px; +} +th.colFirst, th.colLast, th.colOne, .constantValuesContainer th { + background:#dee3e9; + border-top:1px solid #9eadc0; + border-bottom:1px solid #9eadc0; + text-align:left; + padding:3px 3px 3px 7px; +} +td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { + font-weight:bold; +} +td.colFirst, th.colFirst { + border-left:1px solid #9eadc0; + white-space:nowrap; +} +td.colLast, th.colLast { + border-right:1px solid #9eadc0; +} +td.colOne, th.colOne { + border-right:1px solid #9eadc0; + border-left:1px solid #9eadc0; +} +table.overviewSummary { + padding:0px; + margin-left:0px; +} +table.overviewSummary td.colFirst, table.overviewSummary th.colFirst, +table.overviewSummary td.colOne, table.overviewSummary th.colOne { + width:25%; + vertical-align:middle; +} +table.packageSummary td.colFirst, table.overviewSummary th.colFirst { + width:25%; + vertical-align:middle; +} +/* +Content styles +*/ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} +/* +Formatting effect styles +*/ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:.9em; +} +.block { + display:block; + margin:3px 0 0 0; +} +.strong { + font-weight:bold; +} diff --git a/img/classes.png b/img/classes.png new file mode 100644 index 0000000..72385ae Binary files /dev/null and b/img/classes.png differ diff --git a/img/screenshot1.png b/img/screenshot1.png new file mode 100644 index 0000000..8663b45 Binary files /dev/null and b/img/screenshot1.png differ diff --git a/jars/libjhc-1.0.0-awt-doc.jar b/jars/libjhc-1.0.0-awt-doc.jar new file mode 100644 index 0000000..e4a2de8 Binary files /dev/null and b/jars/libjhc-1.0.0-awt-doc.jar differ diff --git a/jars/libjhc-1.0.0-awt.jar b/jars/libjhc-1.0.0-awt.jar new file mode 100644 index 0000000..559e9e8 Binary files /dev/null and b/jars/libjhc-1.0.0-awt.jar differ diff --git a/jars/libjhc-1.0.0-src.jar b/jars/libjhc-1.0.0-src.jar new file mode 100644 index 0000000..fc244af Binary files /dev/null and b/jars/libjhc-1.0.0-src.jar differ diff --git a/jars/libjhc-1.0.0-swing-doc.jar b/jars/libjhc-1.0.0-swing-doc.jar new file mode 100644 index 0000000..f88c286 Binary files /dev/null and b/jars/libjhc-1.0.0-swing-doc.jar differ diff --git a/jars/libjhc-1.0.0-swing.jar b/jars/libjhc-1.0.0-swing.jar new file mode 100644 index 0000000..41047f2 Binary files /dev/null and b/jars/libjhc-1.0.0-swing.jar differ diff --git a/jars/libjhc-1.0.0-swt-doc.jar b/jars/libjhc-1.0.0-swt-doc.jar new file mode 100644 index 0000000..b06dad9 Binary files /dev/null and b/jars/libjhc-1.0.0-swt-doc.jar differ diff --git a/jars/libjhc-1.0.0-swt.jar b/jars/libjhc-1.0.0-swt.jar new file mode 100644 index 0000000..feb319a Binary files /dev/null and b/jars/libjhc-1.0.0-swt.jar differ diff --git a/lib/swt-4.2.1-cocoa-macosx-x86_64.jar b/lib/swt-4.2.1-cocoa-macosx-x86_64.jar new file mode 100644 index 0000000..4bebdb7 Binary files /dev/null and b/lib/swt-4.2.1-cocoa-macosx-x86_64.jar differ diff --git a/lib/swt-4.2.1-cocoa-macosx.jar b/lib/swt-4.2.1-cocoa-macosx.jar new file mode 100644 index 0000000..cc8bfa8 Binary files /dev/null and b/lib/swt-4.2.1-cocoa-macosx.jar differ diff --git a/lib/swt-4.2.1-gtk-linux-x86.jar b/lib/swt-4.2.1-gtk-linux-x86.jar new file mode 100644 index 0000000..d27b0b7 Binary files /dev/null and b/lib/swt-4.2.1-gtk-linux-x86.jar differ diff --git a/lib/swt-4.2.1-gtk-linux-x86_64.jar b/lib/swt-4.2.1-gtk-linux-x86_64.jar new file mode 100644 index 0000000..a7deaa8 Binary files /dev/null and b/lib/swt-4.2.1-gtk-linux-x86_64.jar differ diff --git a/lib/swt-4.2.1-win32-win32-x86.jar b/lib/swt-4.2.1-win32-win32-x86.jar new file mode 100644 index 0000000..d492795 Binary files /dev/null and b/lib/swt-4.2.1-win32-win32-x86.jar differ diff --git a/lib/swt-4.2.1-win32-win32-x86_64.jar b/lib/swt-4.2.1-win32-win32-x86_64.jar new file mode 100644 index 0000000..2770e3f Binary files /dev/null and b/lib/swt-4.2.1-win32-win32-x86_64.jar differ diff --git a/src/awt/de/linearbits/examples/ExamplesAWT.java b/src/awt/de/linearbits/examples/ExamplesAWT.java new file mode 100644 index 0000000..46be299 --- /dev/null +++ b/src/awt/de/linearbits/examples/ExamplesAWT.java @@ -0,0 +1,48 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.examples; + +import java.awt.Toolkit; + +/** + * This class implements examples for AWT + * + * @author Fabian Prasser + */ +class ExamplesAWT extends ExampleData { + + /** + * The main method. + * + * @param args the arguments + */ + public static void main(String[] args) { + + Toolkit.getDefaultToolkit().setDynamicLayout(true); + System.setProperty("sun.awt.noerasebackground", "true"); + System.setProperty("sun.awt.erasebackgroundonresize", "false"); + + Examples.example1(new WindowAWT()); + Examples.example2(new WindowAWT()); + Examples.example3(new WindowAWT()); + Examples.example4(new WindowAWT()); + Examples.example5(new WindowAWT()); + Examples.example6(new WindowAWT()); + Examples.example7(new WindowAWT()); + } +} diff --git a/src/awt/de/linearbits/examples/WindowAWT.java b/src/awt/de/linearbits/examples/WindowAWT.java new file mode 100644 index 0000000..4b56901 --- /dev/null +++ b/src/awt/de/linearbits/examples/WindowAWT.java @@ -0,0 +1,75 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.examples; + +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Font; +import java.awt.Frame; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; + +import de.linearbits.examples.Window; +import de.linearbits.jhc.JHC; +import de.linearbits.jhc.JHCConfiguration; +import de.linearbits.jhc.JHCData; + +/** + * This class implements a window for AWT + * + * @author Fabian Prasser + */ +class WindowAWT extends Frame implements Window { + + /** The Constant serialVersionUID. */ + private static final long serialVersionUID = -24480552155549293L; + + /** The panel. */ + private JHC panel; + + /** + * Instantiates a new window awt. + */ + protected WindowAWT() { + + this.setTitle("AWT"); + this.setSize(200, 200); + this.setLayout(new BorderLayout()); + this.panel = new JHC(); + this.add(panel, BorderLayout.CENTER); + + this.addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent we) { + WindowAWT.this.dispose(); + } + }); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.examples.Window#open(de.linearbits.jhc.Data, de.linearbits.jhc.Configuration) + */ + @Override + public void open(JHCData data, JHCConfiguration config) { + panel.setData(data, config); + this.setVisible(true); + this.panel.setFont(this.panel.getFont().deriveFont(12f)); + } +} diff --git a/src/awt/de/linearbits/jhc/CanvasAWT.java b/src/awt/de/linearbits/jhc/CanvasAWT.java new file mode 100644 index 0000000..217b375 --- /dev/null +++ b/src/awt/de/linearbits/jhc/CanvasAWT.java @@ -0,0 +1,217 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +import java.awt.Color; +import java.awt.Component; +import java.awt.Font; +import java.awt.FontMetrics; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Image; +import java.awt.Point; +import java.awt.event.ComponentAdapter; +import java.awt.event.ComponentEvent; +import java.awt.event.MouseMotionAdapter; +import java.awt.image.BufferedImage; + +import javax.swing.SwingUtilities; + +/** + * This class implements a canvas for AWT + * + * @author Fabian Prasser + */ +class CanvasAWT extends Component implements Canvas { + + /** The Constant serialVersionUID. */ + private static final long serialVersionUID = 6100042540949178860L; + + /** The black. */ + private Color black; + + /** The buffer image. */ + private BufferedImage buffer = null; + + /** The gray. */ + private Color gray; + + /** The heatmap. */ + private RenderedHeatmap heatmap = null; + + /** The listener. */ + private CanvasListener listener = null; + + /** The painter. */ + private final Painter painter = new Painter(this); + + /** The text extents. */ + private Dimension textExtents = null; + + /** The tooltip */ + private TooltipAWT tooltip = new TooltipAWT(); + + /** + * Creates a new instance + */ + protected CanvasAWT() { + + this.black = new Color(0, 0, 0); + this.gray = new Color(128, 128, 128); + + this.addComponentListener(new ComponentAdapter() { + + @Override + public void componentResized(ComponentEvent e) { + if (listener != null) listener.resized(); + } + + @Override + public void componentShown(ComponentEvent e) { + if (listener != null) listener.shown(); + } + }); + + this.addMouseMotionListener(new MouseMotionAdapter() { + + @Override + public void mouseMoved(java.awt.event.MouseEvent e) { + if (heatmap != null && painter != null) { + String text = ToolTip.getToolTip(heatmap, painter, e.getX(), e.getY(), false); + Point location = e.getPoint(); + SwingUtilities.convertPointToScreen(location, CanvasAWT.this); + tooltip.showTooltip(location.x + 1, location.y + 1, text); + } else { + tooltip.hideTooltip(); + } + } + }); + + } + + @Override + public Color getBlack() { + return black; + } + + @Override + public Dimension getCanvasSize() { + return new Dimension(getWidth(), getHeight()); + } + + @Override + public Dimension getExtents() { + if (this.textExtents == null) { + this.textExtents = getTextExtents(); + } + return this.textExtents; + } + + @Override + public Color getGray() { + return gray; + } + + @Override + public void paint(Graphics g) { + + if (buffer == null || buffer.getWidth() != getWidth() || buffer.getHeight() != getHeight()) { + resetBuffer(); + } + + Graphics g2 = buffer.getGraphics(); + paintBuffer(g2); + g2.dispose(); + g.drawImage(buffer, 0, 0, this); + } + + @Override + public void setFont(Font font) { + super.setFont(font); + textExtents = getTextExtents(); + if (listener != null) listener.resized(); + } + + @Override + public void setForeground(Color fg) { + super.setForeground(fg); + if (listener != null) listener.resized(); + } + + @Override + public void setBackground(Color bg) { + super.setBackground(bg); + if (listener != null) listener.resized(); + } + + @SuppressWarnings("unchecked") + @Override + public void setHeatmap(RenderedHeatmap heatmap) { + this.heatmap = (RenderedHeatmap)heatmap; + this.repaint(); + } + + @Override + public void setListener(CanvasListener listener) { + this.listener = listener; + } + + @Override + public void update(Graphics g) { + paint(g); + } + + /** + * Gets the text extents. + * + * @return the text extents + */ + private Dimension getTextExtents() { + FontMetrics metrics = this.getFontMetrics(this.getFont()); + int height = metrics.getHeight(); + int width = 2 * metrics.stringWidth(de.linearbits.jhc.Graphics.POSTFIX); + return new Dimension(width, height); + } + + /** + * Paint buffer. + * + * @param g the g + */ + private void paintBuffer(Graphics g) { + if (painter != null) { + GraphicsJava2D graphics = new GraphicsJava2D(this, (Graphics2D) g); + painter.paint(graphics, heatmap, this.getCanvasSize()); + } else { + g.setColor(this.getBackground()); + g.fillRect(0, 0, getWidth(), getHeight()); + } + } + + /** + * Reset buffer. + */ + private void resetBuffer() { + + if (buffer != null) { + buffer.flush(); + } + + buffer = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_RGB); + } +} diff --git a/src/awt/de/linearbits/jhc/JHC.java b/src/awt/de/linearbits/jhc/JHC.java new file mode 100644 index 0000000..e6cac86 --- /dev/null +++ b/src/awt/de/linearbits/jhc/JHC.java @@ -0,0 +1,66 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Font; + +import javax.swing.JComponent; + +/** + * This class provides a heatmap control for AWT + * @author Fabian Prasser + */ +public class JHC extends JComponent { + + /** SUID */ + private static final long serialVersionUID = 5159203595699492680L; + + /** The real widget*/ + private _JHC jhc = new _JHC(); + + /** Creates a new instance*/ + public JHC(){ + this.setLayout(new BorderLayout()); + this.add(jhc, BorderLayout.CENTER); + } + + /** + * Updates the data displayed by this control + * @param data + * @param config + */ + public void setData(JHCData data, JHCConfiguration config) { + jhc.setData(data, config); + } + + /** + * Sets the font + */ + public void setFont(Font font) { + jhc.setFont(font); + } + + /** + * Sets the background color + */ + public void setBackground(Color bg) { + jhc.setBackground(bg); + } +} diff --git a/src/awt/de/linearbits/jhc/TooltipAWT.java b/src/awt/de/linearbits/jhc/TooltipAWT.java new file mode 100644 index 0000000..3c03f65 --- /dev/null +++ b/src/awt/de/linearbits/jhc/TooltipAWT.java @@ -0,0 +1,265 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +import java.awt.Color; +import java.awt.FlowLayout; +import java.awt.Frame; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.GraphicsEnvironment; +import java.awt.Insets; +import java.awt.RenderingHints; +import java.awt.Toolkit; +import java.awt.Window; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.event.MouseMotionAdapter; +import java.awt.font.FontRenderContext; +import java.awt.font.LineMetrics; +import java.awt.image.BufferedImage; + +/** + * This class implements a tooltip for AWT + * @author Fabian Prasser + */ +class TooltipAWT extends Window { + + /** SUID*/ + private static final long serialVersionUID = 7979764400739243305L; + /** Text to display*/ + private String text = null; + /** Image to render into*/ + private BufferedImage image = new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB); + /** Screen size*/ + private java.awt.Rectangle screenSize; + + /** + * Creates a new instance + */ + protected TooltipAWT() { + super(new Frame()); + this.setLayout(new FlowLayout()); + this.setAlwaysOnTop(true); + this.setSize(0, 0); + this.setLocation(-10, -10); + this.screenSize = getScreenBounds(this); + + this.addMouseListener(new MouseAdapter() { + @Override + public void mouseExited(MouseEvent e) { + hideTooltip(); + } + + @Override + public void mousePressed(MouseEvent arg0) { + hideTooltip(); + } + }); + + this.addMouseMotionListener(new MouseMotionAdapter() { + @Override + public void mouseMoved(MouseEvent e) { + hideTooltip(); + } + }); + } + + /** + * Hides the tooltip + */ + protected void hideTooltip() { + this.text = null; + this.setSize(0, 0); + this.setLocation(-10, -10); + } + + @Override + public void paint(Graphics g) { + if (text != null && image.getWidth() > 1 && image.getHeight() > 1) { + g.drawImage(image, 0, 0, getWidth(), getHeight(), this); + } else { + g.setColor(Color.white); + g.fillRect(0, 0, getWidth(), getHeight()); + } + } + + /** + * Shows the tooltip + * @param x + * @param y + * @param text + */ + protected void showTooltip(int x, int y, String text) { + + if (text == null) { + hideTooltip(); + } else { + if (!this.isVisible()) this.setVisible(true); + boolean repaint = false; + if (!text.equals(this.text)) { + this.text = text; + this.paintBuffer(); + repaint = true; + } + this.setLocation(x, y); + if (this.getWidth() != image.getWidth() || this.getHeight() != image.getHeight()) { + this.setSize(image.getWidth(), image.getHeight()); + repaint(); + } else if (repaint) { + repaint(); + } + } + } + + /** + * Helper + * @param gc + * @param string + * @return + */ + private int getTextHeight(Graphics2D gc, String string) { + + FontRenderContext frc = gc.getFontRenderContext(); + LineMetrics lm = gc.getFont().getLineMetrics(string, frc); + return Math.round(lm.getDescent() + lm.getAscent()); + } + + /** + * Gets the text offset. + * + * @param string the string + * @return the text offset + */ + private int getTextOffset(Graphics2D gc, String string) { + + FontRenderContext frc = gc.getFontRenderContext(); + LineMetrics lm = gc.getFont().getLineMetrics(string, frc); + return Math.round(lm.getAscent()); + } + + /** + * Helper + * @param gc + * @param string + * @return + */ + private int getTextWidth(Graphics2D gc, String string) { + + FontRenderContext frc = gc.getFontRenderContext(); + return (int) Math.round(gc.getFont().getStringBounds(string, frc).getWidth()); + } + + /** + * Paints the tooltip + */ + private void paintBuffer() { + + Graphics2D g = (Graphics2D) image.getGraphics(); + String lines[] = text.split("\\r?\\n"); + + int height = 0; + int width = 0; + int offset = getTextOffset(g, text); + for (String line : lines) { + height += getTextHeight(g, line); + width = Math.max(width, getTextWidth(g, line)); + } + + height += 4; + width += 4; + + height = Math.min(screenSize.height, height); + width = Math.min(screenSize.width, width); + + if (image.getWidth() != width || image.getHeight() != height) { + g.dispose(); + image.flush(); + image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); + g = (Graphics2D) image.getGraphics(); + } + + g.setColor(Color.white); + g.fillRect(0, 0, width - 1, height - 1); + + g.setColor(Color.black); + g.drawRect(0, 0, width - 1, height - 1); + + g.setRenderingHint( + RenderingHints.KEY_TEXT_ANTIALIASING, + RenderingHints.VALUE_TEXT_ANTIALIAS_GASP); + + int y = 2; + for (int i = 0; i < lines.length; i++) { + + g.drawString(lines[i], 2, y + offset); + y += (height - 4) / lines.length; + } + + g.dispose(); + } + + /** + * See http://stackoverflow.com/questions/1936566/how-do-you-get-the-screen-width-in-java + * @param wnd + * @return + */ + private static java.awt.Rectangle getScreenBounds(Window wnd) { + java.awt.Rectangle sb; + Insets si=getScreenInsets(wnd); + + if(wnd==null) { + sb=GraphicsEnvironment + .getLocalGraphicsEnvironment() + .getDefaultScreenDevice() + .getDefaultConfiguration() + .getBounds(); + } + else { + sb=wnd + .getGraphicsConfiguration() + .getBounds(); + } + + sb.x +=si.left; + sb.y +=si.top; + sb.width -=si.left+si.right; + sb.height-=si.top+si.bottom; + return sb; + } + + /** + * See http://stackoverflow.com/questions/1936566/how-do-you-get-the-screen-width-in-java + * @param wnd + * @return + */ + private static Insets getScreenInsets(Window wnd) { + Insets si; + + if(wnd==null) { + si=Toolkit.getDefaultToolkit().getScreenInsets(GraphicsEnvironment + .getLocalGraphicsEnvironment() + .getDefaultScreenDevice() + .getDefaultConfiguration()); + } + else { + si=wnd.getToolkit().getScreenInsets(wnd.getGraphicsConfiguration()); + } + return si; + } +} diff --git a/src/awt/de/linearbits/jhc/_JHC.java b/src/awt/de/linearbits/jhc/_JHC.java new file mode 100644 index 0000000..09d820c --- /dev/null +++ b/src/awt/de/linearbits/jhc/_JHC.java @@ -0,0 +1,81 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +import java.awt.Image; + +/** + * This class implements JHC for AWT + * + * @author Fabian Prasser + * + */ +class _JHC extends CanvasAWT { + + /** The Constant serialVersionUID. */ + private static final long serialVersionUID = 6100042540949178860L; + + /** The config. */ + private volatile JHCConfiguration config = null; + + /** The data. */ + private volatile JHCData data = null; + + /** The renderer. */ + private volatile Renderer renderer = new RendererJava2D(this, this); + + /** + * Creates a new instance + */ + _JHC() { + super.setListener(new CanvasListener(){ + @Override + public void resized() { + _JHC.this.resized(); + } + + @Override + public void shown() { + _JHC.this.shown(); + } + }); + } + + /* + * @see de.linearbits.jhc.CanvasListener#resized() + */ + private void resized() { + this.renderer.render(data, config); + } + + /* + * @see de.linearbits.jhc.CanvasListener#shown() + */ + private void shown() { + this.renderer.render(data, config); + } + + /* + * Updates the data to be rendered + **/ + protected void setData(JHCData data, JHCConfiguration config) { + this.data = data; + this.config = config; + this.renderer.render(data, config); + } +} diff --git a/src/awt/de/linearbits/jhc/package-info.java b/src/awt/de/linearbits/jhc/package-info.java new file mode 100644 index 0000000..7367f4c --- /dev/null +++ b/src/awt/de/linearbits/jhc/package-info.java @@ -0,0 +1,24 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * This package provides a heatmap control for AWT + * + * @author Fabian Prasser + */ +package de.linearbits.jhc; \ No newline at end of file diff --git a/src/java2d/de/linearbits/jhc/GraphicsJava2D.java b/src/java2d/de/linearbits/jhc/GraphicsJava2D.java new file mode 100644 index 0000000..d0810aa --- /dev/null +++ b/src/java2d/de/linearbits/jhc/GraphicsJava2D.java @@ -0,0 +1,365 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +import java.awt.Color; +import java.awt.Component; +import java.awt.Graphics2D; +import java.awt.Image; +import java.awt.RenderingHints; +import java.awt.font.FontRenderContext; +import java.awt.font.LineMetrics; +import java.awt.geom.AffineTransform; + +/** + * This class implements a graphics object for Java2D + * + * @author Fabian Prasser + */ +class GraphicsJava2D implements Graphics { + + /** The antialias. */ + private Object antialias; + + /** The component. */ + private Component component; + + /** The gc. */ + private Graphics2D gc; + + /** The interpolation. */ + private Object interpolation; + + /** The transformation. */ + private AffineTransform transformation; + + /** + * Instantiates a new graphics java2 d. + * + * @param component the component + * @param g the g + */ + protected GraphicsJava2D(Component component, Graphics2D g) { + this.component = component; + this.gc = g; + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#disableAntialiasing() + */ + @Override + public void disableAntialiasing() { + gc.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#disableInterpolation() + */ + @Override + public void disableInterpolation() { + gc.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#drawImage(java.lang.Object, int, int, int, int) + */ + @Override + public void drawImage(Image image, int x, int y, int width, int height) { + gc.drawImage(image, x, y, width, height, component); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#drawLegend(de.linearbits.jhc.Gradient) + */ + @Override + public Image drawLegend(JHCGradient gradient) { + PixelsJava2D pixels = new PixelsJava2D(new Dimension(1, gradient.getSteps()), gradient.getColor(0)); + for (int i = 0; i < gradient.getSteps(); i++) { + pixels.set(0, i, gradient.getColor(i)); + } + pixels.update(); + return pixels.getImage(); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#drawLine(int, int, int, int) + */ + @Override + public void drawLine(int x1, int y1, int x2, int y2) { + gc.drawLine(x1, y1, x2, y2); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#drawRectangle(int, int, int, int) + */ + @Override + public void drawRectangle(int x, int y, int width, int height) { + gc.drawRect(x, y, width, height); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#drawRectangleFilled(int, int, int, int) + */ + @Override + public void drawRectangleFilled(int x, int y, int width, int height) { + Color temp = gc.getColor(); + gc.setColor(gc.getBackground()); + gc.fillRect(x, y, width, height); + gc.setColor(temp); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#drawStringAboveHorizontallyCentered(java.lang.String, int, int, int) + */ + @Override + public void drawStringAboveHorizontallyCentered(String string, int x, int y, int width) { + + int extentY = getTextHeight(string); + drawStringBelowHorizontallyCentered(string, x, y - extentY, width); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#drawStringBelowHorizontallyCentered(java.lang.String, int, int, int) + */ + @Override + public void drawStringBelowHorizontallyCentered(String string, int x, int y, int width) { + + int extentX = getTextWidth(string); + int extentY = getTextHeight(string); + int offsetY = getTextOffset(string); + + gc.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_GASP); + + if (width >= extentX) { + + gc.setClip(x, y, width, extentY); + int xx = x + (width - extentX) / 2; + gc.drawString(string, xx, y + offsetY); + } else { + int postfixWidth = getTextWidth(POSTFIX); + gc.setClip(x, y, width - postfixWidth, extentY); + gc.drawString(string, x, y + offsetY); + gc.setClip(x + width - postfixWidth, y, postfixWidth, extentY); + gc.drawString(POSTFIX, x + width - postfixWidth, y + offsetY); + } + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#drawStringVerticallyCenteredLeftAligned(java.lang.String, int, int, int, int) + */ + @Override + public void drawStringVerticallyCenteredLeftAligned(String string, int x, int y, int width, int height) { + + int extentY = getTextHeight(string); + int extentX = getTextWidth(string); + int offsetY = getTextOffset(string); + + int yy = y + (height - extentY) / 2; + + gc.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_GASP); + + if (width >= extentX) { + gc.setClip(x, yy, extentX, extentY); + gc.drawString(string, x, yy + offsetY); + } else { + int postfixWidth = getTextWidth(POSTFIX); + gc.setClip(x, yy, width - postfixWidth, extentY); + gc.drawString(string, x, yy + offsetY); + gc.setClip(x + width - postfixWidth, yy, postfixWidth, extentY); + gc.drawString(POSTFIX, x + width - postfixWidth, yy + offsetY); + } + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#enableAntialiasing() + */ + @Override + public void enableAntialiasing() { + gc.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#enableInterpolation() + */ + @Override + public void enableInterpolation() { + gc.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#getTextHeight(java.lang.String) + */ + @Override + public int getTextHeight(String string) { + + FontRenderContext frc = gc.getFontRenderContext(); + LineMetrics lm = gc.getFont().getLineMetrics(string, frc); + return Math.round(lm.getDescent() + lm.getAscent()); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#getTextWidth(java.lang.String) + */ + @Override + public int getTextWidth(String string) { + + FontRenderContext frc = gc.getFontRenderContext(); + return (int) Math.round(gc.getFont().getStringBounds(string, frc).getWidth()); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#init() + */ + @Override + public void init() { + gc.setFont(component.getFont()); + antialias = gc.getRenderingHint(RenderingHints.KEY_ANTIALIASING); + interpolation = gc.getRenderingHint(RenderingHints.KEY_INTERPOLATION); + if (interpolation == null) { + interpolation = RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR; + } + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#resetAntialiasing() + */ + @Override + public void resetAntialiasing() { + gc.setRenderingHint(RenderingHints.KEY_ANTIALIASING, antialias); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#resetClipping() + */ + @Override + public void resetClipping() { + gc.setClip(0, 0, component.getWidth(), component.getHeight()); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#resetInterpolation() + */ + @Override + public void resetInterpolation() { + gc.setRenderingHint(RenderingHints.KEY_INTERPOLATION, interpolation); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#resetRotation() + */ + @Override + public void resetRotation() { + gc.setTransform(transformation); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#setBackground(java.lang.Object) + */ + @Override + public void setBackground(Color color) { + gc.setBackground(color); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#setForeground(java.lang.Object) + */ + @Override + public void setForeground(Color color) { + gc.setColor(color); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#setRotation(int) + */ + @Override + public void setRotation(int degrees) { + + transformation = gc.getTransform(); + gc.rotate(Math.toRadians(degrees)); + } + + /** + * Gets the text offset. + * + * @param string the string + * @return the text offset + */ + private int getTextOffset(String string) { + + FontRenderContext frc = gc.getFontRenderContext(); + LineMetrics lm = gc.getFont().getLineMetrics(string, frc); + return Math.round(lm.getAscent()); + } + + @Override + public void drawStringCentered(String string, int x, int y, int width, int height) { + + int extentX = getTextWidth(string); + int extentY = getTextHeight(string); + int offsetY = getTextOffset(string); + gc.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_GASP); + int xx = x + (width - extentX) / 2; + int yy = y + (height - extentY) / 2; + gc.setClip(xx, yy, extentX, extentY); + gc.drawString(string, xx, yy + offsetY); + } +} diff --git a/src/java2d/de/linearbits/jhc/PixelsJava2D.java b/src/java2d/de/linearbits/jhc/PixelsJava2D.java new file mode 100644 index 0000000..615d68b --- /dev/null +++ b/src/java2d/de/linearbits/jhc/PixelsJava2D.java @@ -0,0 +1,107 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +import java.awt.Image; +import java.awt.Toolkit; +import java.awt.image.DirectColorModel; +import java.awt.image.MemoryImageSource; +import java.util.Arrays; + +/** + * This class implements the pixels interface for Java2D + * + * @author Fabian Prasser + */ +class PixelsJava2D implements Pixels { + + /** The buffer. */ + private int[] buffer; + + /** The image. */ + private Image image; + + /** The size. */ + private final Dimension size; + + /** The source. */ + private MemoryImageSource source; + + /** + * Instantiates a new pixels java2 d. + * + * @param size the size + * @param initialColor the initial color + */ + protected PixelsJava2D(Dimension size, int initialColor) { + + // Init + this.size = size; + + // Create buffer + this.buffer = new int[size.height * size.width]; + this.source = new MemoryImageSource(size.width, size.height, new DirectColorModel(24, 0xff0000, 0xff00, 0xff), this.buffer, 0, size.width); + this.source.setAnimated(true); + this.image = Toolkit.getDefaultToolkit().createImage(source); + + // TODO: Potentially inefficient + if (initialColor != 0) { + Arrays.fill(this.buffer, initialColor); + } + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Pixels#getImage() + */ + @Override + public Image getImage() { + return image; + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Pixels#getSize() + */ + @Override + public Dimension getSize() { + return size; + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Pixels#set(int, int, int) + */ + @Override + public void set(int x, int y, int val) { + this.buffer[(size.height - 1 - y) * size.width + x] = val; + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Pixels#update() + */ + @Override + public void update() { + this.source.newPixels(); + } +} diff --git a/src/java2d/de/linearbits/jhc/RendererJava2D.java b/src/java2d/de/linearbits/jhc/RendererJava2D.java new file mode 100644 index 0000000..228c5cc --- /dev/null +++ b/src/java2d/de/linearbits/jhc/RendererJava2D.java @@ -0,0 +1,51 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +import java.awt.Color; +import java.awt.Font; +import java.awt.Image; + +/** + * This class implements a renderer for Java2D + * + * @author Fabian Prasser + */ +class RendererJava2D extends Renderer { + + /** + * Instantiates a new renderer java2 d. + * + * @param jhc the jhc + * @param canvas the canvas + */ + protected RendererJava2D(_JHC jhc, Canvas canvas) { + super(jhc, canvas); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Renderer#getPixels(de.linearbits.jhc.Heat, de.linearbits.jhc.Configuration) + */ + @Override + public Pixels getPixels(JHCHeatmap heat, JHCConfiguration config) { + int initialColor = config.getGradient().getColor(0); + return new PixelsJava2D(new Dimension(heat.getWidth(), heat.getHeight()), initialColor); + } +} diff --git a/src/main/de/linearbits/examples/ExampleData.java b/src/main/de/linearbits/examples/ExampleData.java new file mode 100644 index 0000000..571f543 --- /dev/null +++ b/src/main/de/linearbits/examples/ExampleData.java @@ -0,0 +1,223 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.examples; + +import java.util.Random; + +/** + * This class provides random example data + * + * @author Fabian Prasser + */ +class ExampleData { + + /** + * Gets the array1. + * + * @return the array1 + */ + protected static int[][] getArray1() { + int WIDTH = 200; + int HEIGHT = 200; + int[][] result = new int[HEIGHT][WIDTH]; + Random random = new Random(); + for (int y = 0; y < result.length; y++) { + result[y] = new int[WIDTH]; + for (int x = 0; x < WIDTH; x++) { + result[y][x] = random.nextInt(200); + } + } + for (int y = 0; y < 20; y++) { + for (int x = 0; x < 20; x++) { + result[y][x] = 1000; + } + } + return result; + } + + /** + * Gets the array2. + * + * @return the array2 + */ + protected static int[][] getArray2() { + int WIDTH = 1000; + int HEIGHT = 1000; + int[][] result = new int[HEIGHT][WIDTH]; + for (int y = 0; y < result.length; y++) { + result[y] = new int[WIDTH]; + for (int x = 0; x < WIDTH; x++) { + double distance = Math.sqrt(Math.pow(WIDTH / 2 - x, 2) + Math.pow(HEIGHT / 2 - y, 2)); + result[y][x] = (int) distance; + } + } + return result; + } + + /** + * Gets the array3. + * + * @return the array3 + */ + protected static int[][] getArray3() { + int WIDTH = 20; + int HEIGHT = 20; + Random random = new Random(); + int[][] result = new int[HEIGHT][WIDTH]; + for (int y = 0; y < result.length; y++) { + result[y] = new int[WIDTH]; + for (int x = 0; x < WIDTH; x++) { + result[y][x] = random.nextInt(10000); + } + } + return result; + } + + /** + * Gets the array4. + * + * @return the array4 + */ + protected static int[][] getArray4() { + int WIDTH = 20000; + int HEIGHT = 20000; + Random random = new Random(); + int[][] result = new int[HEIGHT][WIDTH]; + for (int y = 0; y < result.length; y++) { + result[y] = new int[WIDTH]; + for (int x = 0; x < WIDTH; x++) { + result[y][x] = random.nextInt(10000); + } + } + return result; + } + + /** + * Gets the array5. + * + * @return the array5 + */ + protected static int[][] getArray5() { + int WIDTH = 200; + int HEIGHT = 20; + Random random = new Random(); + int[][] result = new int[HEIGHT][WIDTH]; + for (int y = 0; y < result.length; y++) { + result[y] = new int[WIDTH]; + for (int x = 0; x < WIDTH; x++) { + result[y][x] = random.nextInt(10000); + } + } + return result; + } + + /** + * Gets the array6. + * + * @return the array6 + */ + protected static int[][] getArray6() { + int WIDTH = 20; + int HEIGHT = 200; + Random random = new Random(); + int[][] result = new int[HEIGHT][WIDTH]; + for (int y = 0; y < result.length; y++) { + result[y] = new int[WIDTH]; + for (int x = 0; x < WIDTH; x++) { + result[y][x] = random.nextInt(10000); + } + } + return result; + } + + /** + * Gets the array7. + * + * @return the array7 + */ + protected static int[][] getArray7() { + int WIDTH = 4000; + int HEIGHT = 4000; + Random random = new Random(); + int[][] result = new int[HEIGHT][WIDTH]; + for (int y = 0; y < result.length; y++) { + result[y] = new int[WIDTH]; + for (int x = 0; x < WIDTH; x++) { + result[y][x] = random.nextInt(10000); + } + } + return result; + } + + /** + * Gets the array8. + * + * @return the array8 + */ + protected static int[][] getArray8() { + int WIDTH = 20; + int HEIGHT = 5; + Random random = new Random(); + int[][] result = new int[HEIGHT][WIDTH]; + for (int y = 0; y < result.length; y++) { + result[y] = new int[WIDTH]; + for (int x = 0; x < WIDTH; x++) { + result[y][x] = random.nextInt(10000); + } + } + return result; + } + + /** + * Gets the array9. + * + * @return the array9 + */ + protected static int[][] getArray9() { + int WIDTH = 5; + int HEIGHT = 5; + Random random = new Random(); + int[][] result = new int[HEIGHT][WIDTH]; + for (int y = 0; y < result.length; y++) { + result[y] = new int[WIDTH]; + for (int x = 0; x < WIDTH; x++) { + result[y][x] = random.nextInt(10000); + } + } + return result; + } + + /** + * Gets the array10. + * + * @return the array10 + */ + protected static int[][] getArray10() { + int WIDTH = 100; + int HEIGHT = 100; + Random random = new Random(); + int[][] result = new int[HEIGHT][WIDTH]; + for (int y = 0; y < result.length; y++) { + result[y] = new int[WIDTH]; + for (int x = 0; x < WIDTH; x++) { + result[y][x] = random.nextInt(10000); + } + } + return result; + } +} diff --git a/src/main/de/linearbits/examples/Examples.java b/src/main/de/linearbits/examples/Examples.java new file mode 100644 index 0000000..f4e20e0 --- /dev/null +++ b/src/main/de/linearbits/examples/Examples.java @@ -0,0 +1,141 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.examples; + +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; + +import de.linearbits.jhc.JHCConfiguration; +import de.linearbits.jhc.JHCData; +import de.linearbits.jhc.JHCGradient; +import de.linearbits.jhc.JHCLayout; +import de.linearbits.jhc.JHCScale; + +/** + * This class implements basic examples + * + * @author Fabian Prasser + */ +class Examples extends ExampleData { + + /** + * Example1. + * + * @param window the window + */ + protected static void example1(Window window) { + + JHCData data = JHCData.create(getArray3()); + JHCConfiguration config = new JHCConfiguration("x-label", "y-label", JHCGradient.GRADIENT_HEAT); + window.open(data, config); + } + + /** + * Example2. + * + * @param window the window + */ + protected static void example2(Window window) { + + JHCData data = JHCData.create(getArray2()); + JHCConfiguration config = new JHCConfiguration("x-label", "y-label", JHCGradient.GRADIENT_BLACKBODY); + window.open(data, config); + } + + /** + * Example3. + * + * @param window the window + */ + protected static void example3(Window window) { + + JHCData data = JHCData.create(getArray2()); + JHCConfiguration config = new JHCConfiguration("x-label", "y-label", 30, 30, JHCGradient.GRADIENT_BLUERED); + window.open(data, config); + } + + /** + * Example4. + * + * @param window the window + */ + protected static void example4(Window window) { + JHCData data = JHCData.create(getArray3(), new JHCScale.Decimal(10, 30), null); + JHCConfiguration config = new JHCConfiguration("x-label", "y-label", JHCGradient.GRADIENT_ELECTRIC); + window.open(data, config); + } + + /** + * Example5. + * + * @param window the window + */ + protected static void example5(Window window) { + + Calendar cal = Calendar.getInstance(); + cal.setTimeInMillis(0); + cal.set(2010, 5, 1); + Date from = cal.getTime(); + cal.set(2015, 5, 1); + Date to = cal.getTime(); + JHCScale dateScale = new JHCScale.Date(from, to, new SimpleDateFormat("dd.MM.yyy")); + + JHCData data = JHCData.create(getArray8(), new JHCScale.Decimal(10, 30), dateScale); + JHCConfiguration config = new JHCConfiguration("x-label", "y-label", JHCGradient.GRADIENT_GREENS); + window.open(data, config); + } + + /** + * Example6. + * + * @param window the window + */ + protected static void example6(Window window) { + + JHCScale xScale = new JHCScale.String(new String[] { "A", "AB", "C", "ABCDE", "ZZZZZZZZZZZZZZZZZZZZZZZZZ" }); + JHCScale yScale = new JHCScale.String(new String[] { "A", "AB", "C", "ABCDE", "ZZZZZZZZZZZZZZZZZZZZZZZZZ" }); + + JHCLayout layout = new JHCLayout(true, 100, true, 100); + JHCConfiguration config = new JHCConfiguration("x-label", "y-label", JHCGradient.GRADIENT_HEAT, layout); + + JHCData data = JHCData.create(getArray9(), xScale, yScale); + window.open(data, config); + } + + /** + * Example7. + * + * @param window the window + */ + protected static void example7(Window window) { + + String[] ticks = new String[100]; + for (int i = 0; i < 100; i++) + ticks[i] = "Tick-" + i; + + JHCScale xScale = new JHCScale.String(ticks); + JHCScale yScale = new JHCScale.String(ticks); + + JHCLayout layout = new JHCLayout(true, 100, true, 100); + JHCConfiguration config = new JHCConfiguration("x-label", "y-label", JHCGradient.GRADIENT_YIGNBN, layout); + + JHCData data = JHCData.create(getArray10(), xScale, yScale); + window.open(data, config); + } +} diff --git a/src/main/de/linearbits/examples/Window.java b/src/main/de/linearbits/examples/Window.java new file mode 100644 index 0000000..d4d2678 --- /dev/null +++ b/src/main/de/linearbits/examples/Window.java @@ -0,0 +1,40 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.examples; + +import de.linearbits.jhc.JHCConfiguration; +import de.linearbits.jhc.JHCData; + +/** + * This interface describes a basic window used for displaying examples + * + * @author Fabian Prasser + * + * @param the generic type + * @param the generic type + */ +interface Window { + + /** + * Open. + * + * @param data the data + * @param config the config + */ + public void open(JHCData data, JHCConfiguration config); +} diff --git a/src/main/de/linearbits/jhc/Canvas.java b/src/main/de/linearbits/jhc/Canvas.java new file mode 100644 index 0000000..bb4c64e --- /dev/null +++ b/src/main/de/linearbits/jhc/Canvas.java @@ -0,0 +1,118 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +/** + * This interface describes a generic canvas for JHC + * + * @author Fabian Prasser + * + * @param the generic type + * @param the generic type + * @param the value type + */ +interface Canvas { + + /** + * The listener interface for receiving canvas events. + * The class that is interested in processing a canvas + * event implements this interface, and the object created + * with that class is registered with a component using the + * component's addCanvasListener method. When + * the canvas event occurs, that object's appropriate + * method is invoked. + * + * @author Fabian Prasser + */ + interface CanvasListener { + + /** + * Resized. + */ + public void resized(); + + /** + * Shown. + */ + public void shown(); + } + + + /** + * Gets the background. + * + * @return the background + */ + public V getBackground(); + + /** + * Gets the foreground. + * + * @return the foreground + */ + public V getForeground(); + + /** + * Gets the black. + * + * @return the black + */ + public V getBlack(); + + /** + * Gets the canvas size. + * + * @return the canvas size + */ + public abstract Dimension getCanvasSize(); + + /** + * Gets the extents. + * + * @return the extents + */ + public abstract Dimension getExtents(); + + /** + * Gets the font. + * + * @return the font + */ + public U getFont(); + + /** + * Gets the gray. + * + * @return the gray + */ + public V getGray(); + + /** + * Sets the heatmap. + * + * @param heatmap the new heatmap + */ + public abstract void setHeatmap(RenderedHeatmap heatmap); + + /** + * Sets the listener. + * + * @param listener the new listener + */ + public void setListener(CanvasListener listener); +} diff --git a/src/main/de/linearbits/jhc/Dimension.java b/src/main/de/linearbits/jhc/Dimension.java new file mode 100644 index 0000000..bdd33b4 --- /dev/null +++ b/src/main/de/linearbits/jhc/Dimension.java @@ -0,0 +1,83 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +/** + * This class implements a dimension [width, height] + * + * @author Fabian Prasser + */ +class Dimension { + + /** The height. */ + public final int height; + + /** The width. */ + public final int width; + + /** + * Instantiates a new dimension. + * + * @param width the width + * @param height the height + */ + public Dimension(int width, int height) { + this.width = width; + this.height = height; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(Object obj) { + if (this == obj) return true; + if (obj == null) return false; + if (getClass() != obj.getClass()) return false; + Dimension other = (Dimension) obj; + if (height != other.height) return false; + if (width != other.width) return false; + return true; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#hashCode() + */ + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + height; + result = prime * result + width; + return result; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Dimension [" + width + ", " + height + "]"; + } +} diff --git a/src/main/de/linearbits/jhc/Graphics.java b/src/main/de/linearbits/jhc/Graphics.java new file mode 100644 index 0000000..93d393e --- /dev/null +++ b/src/main/de/linearbits/jhc/Graphics.java @@ -0,0 +1,204 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +/** + * This interface describes a generic graphics objects + * + * @author Fabian Prasser + * + * @param the generic type of Image + * @param the generic type of Color + */ +interface Graphics { + + /** The Constant POSTFIX. */ + public static final String POSTFIX = "..."; + + /** + * Disable antialiasing. + */ + public void disableAntialiasing(); + + /** + * Disable interpolation. + */ + public void disableInterpolation(); + + /** + * Draw image. + * + * @param image the image + * @param x the x + * @param y the y + * @param width the width + * @param height the height + */ + public void drawImage(T image, int x, int y, int width, int height); + + /** + * Draw legend. + * + * @param gradient the gradient + * @return the t + */ + public T drawLegend(JHCGradient gradient); + + /** + * Draw line. + * + * @param x1 the x1 + * @param y1 the y1 + * @param x2 the x2 + * @param y2 the y2 + */ + public void drawLine(int x1, int y1, int x2, int y2); + + /** + * Draw rectangle. + * + * @param x the x + * @param y the y + * @param width the width + * @param height the height + */ + public void drawRectangle(int x, int y, int width, int height); + + /** + * Draw rectangle filled. + * + * @param x the x + * @param y the y + * @param width the width + * @param height the height + */ + public void drawRectangleFilled(int x, int y, int width, int height); + + /** + * Draw string above horizontally centered. + * + * @param string the string + * @param x the x + * @param y the y + * @param width the width + */ + public void drawStringAboveHorizontallyCentered(String string, int x, int y, int width); + + /** + * Draw string below horizontally centered. + * + * @param string the string + * @param x the x + * @param y the y + * @param width the width + */ + public void drawStringBelowHorizontallyCentered(String string, int x, int y, int width); + + /** + * Draw string vertically centered left aligned. + * + * @param string the string + * @param x the x + * @param y the y + * @param width the width + * @param height the height + */ + public void drawStringVerticallyCenteredLeftAligned(String string, int x, int y, int width, int height); + + /** + * Enable antialiasing. + */ + public void enableAntialiasing(); + + /** + * Enable interpolation. + */ + public void enableInterpolation(); + + /** + * Gets the text height. + * + * @param string the string + * @return the text height + */ + public int getTextHeight(String string); + + /** + * Gets the text width. + * + * @param string the string + * @return the text width + */ + public int getTextWidth(String string); + + /** + * Inits the. + */ + public void init(); + + /** + * Reset antialiasing. + */ + public void resetAntialiasing(); + + /** + * Reset clipping. + */ + public void resetClipping(); + + /** + * Reset interpolation. + */ + public void resetInterpolation(); + + /** + * Reset rotation. + */ + public void resetRotation(); + + /** + * Sets the background. + * + * @param color the new background + */ + public void setBackground(U color); + + /** + * Sets the foreground. + * + * @param color the new foreground + */ + public void setForeground(U color); + + /** + * Sets the rotation. + * + * @param degrees the new rotation + */ + public void setRotation(int degrees); + + /** + * Draws the given string centered in the given rectangle + * @param string + * @param i + * @param j + * @param width + * @param height + */ + public void drawStringCentered(String string, int i, int j, int width, int height); +} diff --git a/src/main/de/linearbits/jhc/JHCConfiguration.java b/src/main/de/linearbits/jhc/JHCConfiguration.java new file mode 100644 index 0000000..e0c27d2 --- /dev/null +++ b/src/main/de/linearbits/jhc/JHCConfiguration.java @@ -0,0 +1,143 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +/** + * This class allows to configure how the heatmap is displayed. + * + * @author Fabian Prasser + */ +public class JHCConfiguration { + + /** The gradient. */ + private final JHCGradient gradient; + + /** The layout. */ + private final JHCLayout layout; + + /** The maximal size. */ + private final Dimension maximalSize; + + /** The x label. */ + private final String xLabel; + + /** The y label. */ + private final String yLabel; + + /** + * Instantiates a new configuration. + * + * @param xLabel the x label + * @param yLabel the y label + * @param maximalWidth the maximal width + * @param maximalHeight the maximal height + * @param gradient the gradient + */ + public JHCConfiguration(String xLabel, String yLabel, int maximalWidth, int maximalHeight, JHCGradient gradient) { + this(xLabel, yLabel, maximalWidth, maximalHeight, gradient, null); + } + + /** + * Instantiates a new configuration. + * + * @param xLabel the x label + * @param yLabel the y label + * @param maximalSize the maximal size + * @param gradient the gradient + * @param layout the layout + */ + public JHCConfiguration(String xLabel, String yLabel, int maximalWidth, int maximalHeight, JHCGradient gradient, JHCLayout layout) { + this.maximalSize = new Dimension(maximalWidth, maximalHeight); + this.gradient = gradient; + this.xLabel = xLabel; + this.yLabel = yLabel; + if (layout == null) { + this.layout = new JHCLayout(); + } else { + this.layout = layout; + } + } + + /** + * Instantiates a new configuration. + * + * @param xLabel the x label + * @param yLabel the y label + * @param gradient the gradient + */ + public JHCConfiguration(String xLabel, String yLabel, JHCGradient gradient) { + this(xLabel, yLabel, Integer.MAX_VALUE, Integer.MAX_VALUE, gradient, null); + } + + /** + * Instantiates a new configuration. + * + * @param xLabel the x label + * @param yLabel the y label + * @param gradient the gradient + * @param layout the layout + */ + public JHCConfiguration(String xLabel, String yLabel, JHCGradient gradient, JHCLayout layout) { + this(xLabel, yLabel, Integer.MAX_VALUE, Integer.MAX_VALUE, gradient, layout); + } + + /** + * Gets the gradient. + * + * @return the gradient + */ + protected JHCGradient getGradient() { + return gradient; + } + + /** + * Gets the layout. + * + * @return the layout + */ + protected JHCLayout getLayout() { + return layout; + } + + /** + * Gets the maximal size. + * + * @return the maximal size + */ + protected Dimension getMaximalSize() { + return maximalSize; + } + + /** + * Gets the x label. + * + * @return the x label + */ + protected String getXLabel() { + return xLabel; + } + + /** + * Gets the y label. + * + * @return the y label + */ + protected String getYLabel() { + return yLabel; + } +} diff --git a/src/main/de/linearbits/jhc/JHCData.java b/src/main/de/linearbits/jhc/JHCData.java new file mode 100644 index 0000000..c92690b --- /dev/null +++ b/src/main/de/linearbits/jhc/JHCData.java @@ -0,0 +1,237 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +import de.linearbits.jhc.JHCDataProvider.Orientation; + +/** + * This class defines the abstract base type for data that can be handled by the widget/control. Moreover, it offers + * static methods for deriving instances for typical data representations, e.g., arrays. Extend this class, if you want to + * encapsule potentially long-running processes that compute the heatmap + * + * @author Fabian Prasser + */ +public abstract class JHCData { + + /** + * Creates a data object. Assumes a row-oriented layout. + * + * @param data the data + * @return the data + */ + public static JHCData create(double[][] data) { + return new ProviderData(new ProviderDoubleArray(data, Orientation.ROW, null, null)); + } + + /** + * Creates a data object. Assumes a row-oriented layout. + * + * @param data the data + * @param xScale the x scale + * @param yScale the y scale + * @return the data + */ + public static JHCData create(double[][] data, JHCScale xScale, JHCScale yScale) { + return new ProviderData(new ProviderDoubleArray(data, Orientation.ROW, xScale, yScale)); + } + + /** + * Creates a data object + * + * @param data the data + * @param orientation the orientation + * @param xScale the x scale + * @param yScale the y scale + * @return the data + */ + public static JHCData create(double[][] data, Orientation orientation, JHCScale xScale, JHCScale yScale) { + return new ProviderData(new ProviderDoubleArray(data, orientation, xScale, yScale)); + } + + /** + * Creates a data object. Assumes a row-oriented layout. + * + * @param data the data + * @return the data + */ + public static JHCData create(char[][] data) { + return new ProviderData(new ProviderCharArray(data, Orientation.ROW, null, null)); + } + + /** + * Creates a data object. Assumes a row-oriented layout. + * + * @param data the data + * @param xScale the x scale + * @param yScale the y scale + * @return the data + */ + public static JHCData create(char[][] data, JHCScale xScale, JHCScale yScale) { + return new ProviderData(new ProviderCharArray(data, Orientation.ROW, xScale, yScale)); + } + + /** + * Creates a data object + * + * @param data the data + * @param orientation the orientation + * @param xScale the x scale + * @param yScale the y scale + * @return the data + */ + public static JHCData create(char[][] data, Orientation orientation, JHCScale xScale, JHCScale yScale) { + return new ProviderData(new ProviderCharArray(data, orientation, xScale, yScale)); + } + + /** + * Creates a data object. Assumes a row-oriented layout. + * + * @param data the data + * @return the data + */ + public static JHCData create(int[][] data) { + return new ProviderData(new ProviderIntegerArray(data, Orientation.ROW, null, null)); + } + + /** + * Creates a data object. Assumes a row-oriented layout. + * + * @param data the data + * @param xScale the x scale + * @param yScale the y scale + * @return the data + */ + public static JHCData create(int[][] data, JHCScale xScale, JHCScale yScale) { + return new ProviderData(new ProviderIntegerArray(data, Orientation.ROW, xScale, yScale)); + } + + /** + * Creates a data object + * + * @param data the data + * @param orientation the orientation + * @param xScale the x scale + * @param yScale the y scale + * @return the data + */ + public static JHCData create(int[][] data, Orientation orientation, JHCScale xScale, JHCScale yScale) { + return new ProviderData(new ProviderIntegerArray(data, orientation, xScale, yScale)); + } + + /** + * Creates a data object. Assumes a row-oriented layout. + * + * @param data the data + * @return the data + */ + public static JHCData create(long[][] data) { + return new ProviderData(new ProviderLongArray(data, Orientation.ROW, null, null)); + } + + /** + * Creates a data object. Assumes a row-oriented layout. + * + * @param data the data + * @param xScale the x scale + * @param yScale the y scale + * @return the data + */ + public static JHCData create(long[][] data, JHCScale xScale, JHCScale yScale) { + return new ProviderData(new ProviderLongArray(data, Orientation.ROW, xScale, yScale)); + } + + /** + * Creates a data object + * + * @param data the data + * @param orientation the orientation + * @param xScale the x scale + * @param yScale the y scale + * @return the data + */ + public static JHCData create(long[][] data, Orientation orientation, JHCScale xScale, JHCScale yScale) { + return new ProviderData(new ProviderLongArray(data, orientation, xScale, yScale)); + } + + /** + * Creates a data object. Assumes a row-oriented layout. + * + * @param data the data + * @return the data + */ + public static JHCData create(float[][] data) { + return new ProviderData(new ProviderFloatArray(data, Orientation.ROW, null, null)); + } + + /** + * Creates a data object. Assumes a row-oriented layout. + * + * @param data the data + * @param xScale the x scale + * @param yScale the y scale + * @return the data + */ + public static JHCData create(float[][] data, JHCScale xScale, JHCScale yScale) { + return new ProviderData(new ProviderFloatArray(data, Orientation.ROW, xScale, yScale)); + } + + /** + * Creates a data object + * + * @param data the data + * @param orientation the orientation + * @param xScale the x scale + * @param yScale the y scale + * @return the data + */ + public static JHCData create(float[][] data, Orientation orientation, JHCScale xScale, JHCScale yScale) { + return new ProviderData(new ProviderFloatArray(data, orientation, xScale, yScale)); + } + /** + * Creates the. + * + * @param provider the provider + * @return the data + */ + public static JHCData create(JHCDataProvider provider) { + return new ProviderData(provider); + } + + /** + * Gets the heat. + * + * @param width the width + * @param height the height + * @return the heat + */ + public abstract JHCHeatmap getHeatmap(int width, int height); + + /** + * Gets the original width of the data + * + * @return the width + */ + public abstract int getWidth(); + + /** + * Gets the original height of the data + * + * @return the height + */ + public abstract int getHeight(); +} diff --git a/src/main/de/linearbits/jhc/JHCDataProvider.java b/src/main/de/linearbits/jhc/JHCDataProvider.java new file mode 100644 index 0000000..8723295 --- /dev/null +++ b/src/main/de/linearbits/jhc/JHCDataProvider.java @@ -0,0 +1,82 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + + +/** + * This interface can be implemented to convert data into a representation suitable for the widget + * + * @author Fabian Prasser + */ +public interface JHCDataProvider { + + /** + * Data orientation + * + * @author Fabian Prasser + */ + public static enum Orientation { + ROW, + COLUMN + } + + /** + * Returns the. + * + * @param x the x + * @param y the y + * @return the double + */ + public abstract double get(int x, int y); + + /** + * Gets the height. + * + * @return the height + */ + public abstract int getHeight(); + + /** + * Gets the width. + * + * @return the width + */ + public abstract int getWidth(); + + /** + * Gets the orientation. + * + * @return the orientation + */ + public abstract Orientation getOrientation(); + + + /** + * Gets the x labels. + * + * @return the x scale + */ + public abstract JHCScale getXScale(); + + /** + * Gets the y labels. + * + * @return the y scale + */ + public abstract JHCScale getYScale(); +} diff --git a/src/main/de/linearbits/jhc/JHCGradient.java b/src/main/de/linearbits/jhc/JHCGradient.java new file mode 100644 index 0000000..f8cffd4 --- /dev/null +++ b/src/main/de/linearbits/jhc/JHCGradient.java @@ -0,0 +1,167 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +import java.awt.Color; +import java.awt.Graphics2D; +import java.awt.LinearGradientPaint; +import java.awt.geom.Point2D; +import java.awt.image.BufferedImage; + +/** + * The class implements gradients for the heatmap. Some predefined gradients are + * inspired by plotly (https://github.com/plotly). + * + * @author Fabian Prasser + */ +public class JHCGradient { + + /** BLACK, GRAY, WHITE */ + public static final JHCGradient GRADIENT_GRAYSCALE = new JHCGradient(new Color[] + { Color.BLACK, Color.GRAY, Color.WHITE }); + + /** BLUE, CYAN, GREEN, YELLOW, ORANGE, RED */ + public static final JHCGradient GRADIENT_HEAT = new JHCGradient(new Color[] + { Color.BLUE, Color.CYAN, Color.GREEN, Color.YELLOW, Color.ORANGE, Color.RED }); + + /** BLACK, LIGHT_GRAY*/ + public static final JHCGradient GRADIENT_GRAYS = new JHCGradient(new Color[] + {Color.BLACK, Color.LIGHT_GRAY}); + + /** WHITE, GREEN */ + public static final JHCGradient GRADIENT_YIGNBN = new JHCGradient(new Color[] + {Color.WHITE, Color.GREEN}); + + /** DARK_GREEN, LIGHT_GREEN */ + public static final JHCGradient GRADIENT_GREENS = new JHCGradient(new Color[] + {Color.decode("#013220"), Color.decode("#90ee90")}); + + /** RED, ORANGE, GOLD, TAN, WHITE*/ + public static final JHCGradient GRADIENT_YIORRD = new JHCGradient(new Color[] + {Color.RED, Color.ORANGE, Color.decode("#ffd700"), Color.decode("#d2b48c"), Color.WHITE}); + + /** BRIGHT_BLUE, PURPLE, BRIGHT_RED*/ + public static final JHCGradient GRADIENT_BLUERED = new JHCGradient(new Color[] + {Color.decode("#00a1c2"), Color.decode("#800080"), Color.decode("#be0032")}); + + /** BLUE, RED*/ + public static final JHCGradient GRADIENT_RDBU = new JHCGradient(new Color[] + {Color.BLUE, Color.RED}); + + /** BLUE, LIGHT_BLUE, WHITE, PINK*/ + public static final JHCGradient GRADIENT_PICNIC = new JHCGradient(new Color[] + {Color.BLUE, Color.decode("#add8e6"), Color.WHITE, Color.PINK}); + + /** BLUE, GREEN, YELLOW, ORANGE, RED*/ + public static final JHCGradient GRADIENT_PORTLAND = new JHCGradient(new Color[] + {Color.BLUE, Color.GREEN, Color.YELLOW, Color.ORANGE, Color.RED}); + + /** BLUE, LIGHT_BLUE, GREEN, YELLOW, ORANGE, RED*/ + public static final JHCGradient GRADIENT_JET = new JHCGradient(new Color[] + {Color.BLUE, Color.decode("#add8e6"), Color.GREEN, Color.YELLOW, Color.ORANGE, Color.RED}); + + /** TAN, YELLOW, RED, BLACK*/ + public static final JHCGradient GRADIENT_HOT = new JHCGradient(new Color[] + {Color.decode("#d2b48c"), Color.YELLOW, Color.RED, Color.BLACK}); + + /** BLACK, RED, YELLOW, WHITE, LIGHT_BLUE*/ + public static final JHCGradient GRADIENT_BLACKBODY = new JHCGradient(new Color[] + {Color.BLACK, Color.RED, Color.YELLOW, Color.WHITE, Color.decode("#add8e6")}); + + /** BLUE, GREEN, YELLOW, BROWN, TAN, WHITE*/ + public static final JHCGradient GRADIENT_EARTH = new JHCGradient(new Color[] + {Color.BLUE, Color.GREEN, Color.YELLOW, Color.decode("#a52a2a"), Color.decode("#d2b48c"), Color.WHITE}); + + /** BLACK, PURPLE, ORANGE, YELLOW, TAN, WHITE*/ + public static final JHCGradient GRADIENT_ELECTRIC = new JHCGradient(new Color[] + {Color.BLACK, Color.decode("#800080"), Color.ORANGE, Color.YELLOW, Color.decode("#d2b48c"), Color.WHITE}); + + /** The colors. */ + private int[] colors; + + /** + * Instantiates a new gradient. + * + * @param _colors the _colors + */ + public JHCGradient(Color[] _colors) { + this(_colors, 100); + } + + /** + * Instantiates a new gradient. + * + * @param _colors the _colors + * @param steps the steps + */ + public JHCGradient(Color[] _colors, int steps) { + this.colors = getGradient(_colors, steps); + } + + /** + * Gets the color. + * + * @param heat the heat + * @return the color + */ + protected int getColor(int heat) { + return colors[heat]; + } + + /** + * Gets the steps. + * + * @return the steps + */ + protected int getSteps() { + return colors.length; + } + + /** + * Gets the gradient. + * + * @param colors the colors + * @param steps the steps + * @return the gradient + */ + private int[] getGradient(Color[] colors, int steps) { + + // Draw the gradient to a buffered image + Point2D start = new Point2D.Float(0, 0); + Point2D end = new Point2D.Float(1, steps); + float[] dist = new float[colors.length]; + for (int i = 0; i < dist.length; i++) { + dist[i] = (1.0f / dist.length) * i; + } + LinearGradientPaint p = new LinearGradientPaint(start, end, dist, colors); + BufferedImage legend = new BufferedImage(1, steps, BufferedImage.TYPE_INT_ARGB); + Graphics2D g2d = (Graphics2D) legend.getGraphics(); + g2d.setPaint(p); + g2d.drawRect(0, 0, 1, steps); + g2d.dispose(); + + // Convert to color array + int[] result = new int[steps]; + for (int y = 0; y < steps; y++) { + result[y] = legend.getRGB(0, y); + } + + // Return + return result; + } +} diff --git a/src/main/de/linearbits/jhc/JHCHeatmap.java b/src/main/de/linearbits/jhc/JHCHeatmap.java new file mode 100644 index 0000000..35cd635 --- /dev/null +++ b/src/main/de/linearbits/jhc/JHCHeatmap.java @@ -0,0 +1,109 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +import java.util.Iterator; + +/** + * This abstract class represents a (potentially scaled) heatmap that has been retrieved from an instance of JHCData + * + * @author Fabian Prasser + */ +public abstract class JHCHeatmap { + + /** + * This interface represents a point in the heatmap. It is defined by indices on the x- and y-axis where each + * index corresponds to the according entry in the current scale. + * + * @author Fabian Prasser + */ + public static interface Point { + + /** + * Gets the value. + * + * @return the value + */ + public abstract double getValue(); + + /** + * Gets the x. + * + * @return the x + */ + public abstract int getX(); + + /** + * Gets the y. + * + * @return the y + */ + public abstract int getY(); + } + + /** + * Gets the height. + * + * @return the height + */ + public abstract int getHeight(); + + /** + * Gets the max. + * + * @return the max + */ + public abstract double getMax(); + + /** + * Gets the min. + * + * @return the min + */ + public abstract double getMin(); + + /** + * Gets the width. + * + * @return the width + */ + public abstract int getWidth(); + + /** + * Gets the x label. + * + * @param index the index + * @return the x label + */ + public abstract String getXLabel(int index); + + /** + * Gets the y label. + * + * @param index the index + * @return the y label + */ + public abstract String getYLabel(int index); + + /** + * Iterator. + * + * @return the iterator + */ + public abstract Iterator iterator(); +} diff --git a/src/main/de/linearbits/jhc/JHCLayout.java b/src/main/de/linearbits/jhc/JHCLayout.java new file mode 100644 index 0000000..5f34711 --- /dev/null +++ b/src/main/de/linearbits/jhc/JHCLayout.java @@ -0,0 +1,756 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +/** + * This class represents the layout that is to be used when displaying the heatmap + * + * @author Fabian Prasser + */ +public class JHCLayout { + + /** The Constant MINIMAL_HEATMAP_SIZE. */ + private static final int MINIMAL_HEATMAP_SIZE = 10; + + /** The Constant DEFAULT_LARGE_TICK_LENGTH. */ + private static final int DEFAULT_LARGE_TICK_LENGTH = 5; + + /** The Constant DEFAULT_LEGEND_WIDTH. */ + private static final int DEFAULT_LEGEND_WIDTH = 30; + + /** The Constant DEFAULT_OFFSET_CENTER_RIGHT_TOP. */ + private static final int DEFAULT_OFFSET_CENTER_RIGHT_TOP = 30; + + /** The Constant DEFAULT_OFFSET_LEFT_BOTTOM. */ + private static final int DEFAULT_OFFSET_LEFT_BOTTOM = 5; + + /** The Constant DEFAULT_SMALL_TICK_LENGTH. */ + private static final int DEFAULT_SMALL_TICK_LENGTH = 3; + + /** The Constant DEFAULT_TEXT_OFFSET. */ + private static final int DEFAULT_TEXT_OFFSET = 5; + + /** The Constant DEFAULT_TICK_SPACE. */ + private static final int DEFAULT_TICK_SPACE = 20; + + /** The bottom offset. */ + private final int bottomOffset; + + /** The center offset. */ + private final int centerOffset; + + /** The large tick length. */ + private final int largeTickLength; + + /** The left offset. */ + private final int leftOffset; + + /** The legend width. */ + private final int legendWidth; + + /** The right offset. */ + private final int rightOffset; + + /** The small tick length. */ + private final int smallTickLength; + + /** The text offset. */ + private final int textOffset; + + /** The top offset. */ + private final int topOffset; + + /** The x tick rotate. */ + private final boolean xTickRotate; + + /** The x tick space. */ + private final int xTickSpace; + + /** The y tick rotate. */ + private final boolean yTickRotate; + + /** The y tick space. */ + private final int yTickSpace; + + /** + * Instantiates a new layout. + */ + public JHCLayout() { + this.leftOffset = DEFAULT_OFFSET_LEFT_BOTTOM; + this.rightOffset = DEFAULT_OFFSET_CENTER_RIGHT_TOP; + this.topOffset = DEFAULT_OFFSET_CENTER_RIGHT_TOP; + this.bottomOffset = DEFAULT_OFFSET_LEFT_BOTTOM; + this.centerOffset = DEFAULT_OFFSET_CENTER_RIGHT_TOP; + this.legendWidth = DEFAULT_LEGEND_WIDTH; + this.largeTickLength = DEFAULT_LARGE_TICK_LENGTH; + this.smallTickLength = DEFAULT_SMALL_TICK_LENGTH; + this.textOffset = DEFAULT_TEXT_OFFSET; + this.xTickRotate = false; + this.yTickRotate = false; + this.xTickSpace = DEFAULT_TICK_SPACE; + this.yTickSpace = DEFAULT_TICK_SPACE; + this.check(); + } + + /** + * Instantiates a new layout. + * + * @param xTickRotate the x tick rotate + * @param xTickSpace the x tick space + * @param yTickRotate the y tick rotate + * @param yTickSpace the y tick space + */ + public JHCLayout(boolean xTickRotate, int xTickSpace, boolean yTickRotate, int yTickSpace) { + this.leftOffset = DEFAULT_OFFSET_LEFT_BOTTOM; + this.rightOffset = DEFAULT_OFFSET_CENTER_RIGHT_TOP; + this.topOffset = DEFAULT_OFFSET_CENTER_RIGHT_TOP; + this.bottomOffset = DEFAULT_OFFSET_LEFT_BOTTOM; + this.centerOffset = DEFAULT_OFFSET_CENTER_RIGHT_TOP; + this.legendWidth = DEFAULT_LEGEND_WIDTH; + this.largeTickLength = DEFAULT_LARGE_TICK_LENGTH; + this.smallTickLength = DEFAULT_SMALL_TICK_LENGTH; + this.textOffset = DEFAULT_TEXT_OFFSET; + this.xTickRotate = xTickRotate; + this.yTickRotate = yTickRotate; + this.xTickSpace = xTickSpace; + this.yTickSpace = yTickSpace; + this.check(); + } + + /** + * Instantiates a new layout. + * + * @param legendWidth the legend width + * @param largeTickLength the large tick length + * @param smallTickLength the small tick length + */ + public JHCLayout(int legendWidth, int largeTickLength, int smallTickLength) { + this.leftOffset = DEFAULT_OFFSET_LEFT_BOTTOM; + this.rightOffset = DEFAULT_OFFSET_CENTER_RIGHT_TOP; + this.topOffset = DEFAULT_OFFSET_CENTER_RIGHT_TOP; + this.bottomOffset = DEFAULT_OFFSET_LEFT_BOTTOM; + this.centerOffset = DEFAULT_OFFSET_CENTER_RIGHT_TOP; + this.legendWidth = legendWidth; + this.smallTickLength = smallTickLength; + this.largeTickLength = largeTickLength; + this.textOffset = DEFAULT_TEXT_OFFSET; + this.xTickRotate = false; + this.yTickRotate = false; + this.xTickSpace = DEFAULT_TICK_SPACE; + this.yTickSpace = DEFAULT_TICK_SPACE; + this.check(); + } + + /** + * Instantiates a new layout. + * + * @param legendWidth the legend width + * @param largeTickLength the large tick length + * @param smallTickLength the small tick length + * @param xTickRotate the x tick rotate + * @param xTickSpace the x tick space + * @param yTickRotate the y tick rotate + * @param yTickSpace the y tick space + */ + public JHCLayout(int legendWidth, int largeTickLength, int smallTickLength, boolean xTickRotate, int xTickSpace, boolean yTickRotate, int yTickSpace) { + this.leftOffset = DEFAULT_OFFSET_LEFT_BOTTOM; + this.rightOffset = DEFAULT_OFFSET_CENTER_RIGHT_TOP; + this.topOffset = DEFAULT_OFFSET_CENTER_RIGHT_TOP; + this.bottomOffset = DEFAULT_OFFSET_LEFT_BOTTOM; + this.centerOffset = DEFAULT_OFFSET_CENTER_RIGHT_TOP; + this.legendWidth = legendWidth; + this.smallTickLength = smallTickLength; + this.largeTickLength = largeTickLength; + this.textOffset = DEFAULT_TEXT_OFFSET; + this.xTickRotate = xTickRotate; + this.yTickRotate = yTickRotate; + this.xTickSpace = xTickSpace; + this.yTickSpace = yTickSpace; + this.check(); + } + + /** + * Instantiates a new layout. + * + * @param offsetLeft the offset left + * @param offsetRight the offset right + * @param offsetTop the offset top + * @param offsetBottom the offset bottom + * @param offsetCenter the offset center + */ + public JHCLayout(int offsetLeft, int offsetRight, int offsetTop, int offsetBottom, int offsetCenter) { + this.leftOffset = offsetLeft; + this.rightOffset = offsetRight; + this.topOffset = offsetTop; + this.bottomOffset = offsetBottom; + this.centerOffset = offsetCenter; + this.legendWidth = DEFAULT_LEGEND_WIDTH; + this.largeTickLength = DEFAULT_LARGE_TICK_LENGTH; + this.smallTickLength = DEFAULT_SMALL_TICK_LENGTH; + this.textOffset = DEFAULT_TEXT_OFFSET; + this.xTickRotate = false; + this.yTickRotate = false; + this.xTickSpace = DEFAULT_TICK_SPACE; + this.yTickSpace = DEFAULT_TICK_SPACE; + this.check(); + } + + /** + * Instantiates a new layout. + * + * @param offsetLeft the offset left + * @param offsetRight the offset right + * @param offsetTop the offset top + * @param offsetBottom the offset bottom + * @param offsetCenter the offset center + * @param xTickRotate the x tick rotate + * @param xTickSpace the x tick space + * @param yTickRotate the y tick rotate + * @param yTickSpace the y tick space + */ + public JHCLayout(int offsetLeft, int offsetRight, int offsetTop, int offsetBottom, int offsetCenter, boolean xTickRotate, int xTickSpace, boolean yTickRotate, int yTickSpace) { + this.leftOffset = offsetLeft; + this.rightOffset = offsetRight; + this.topOffset = offsetTop; + this.bottomOffset = offsetBottom; + this.centerOffset = offsetCenter; + this.legendWidth = DEFAULT_LEGEND_WIDTH; + this.largeTickLength = DEFAULT_LARGE_TICK_LENGTH; + this.smallTickLength = DEFAULT_SMALL_TICK_LENGTH; + this.textOffset = DEFAULT_TEXT_OFFSET; + this.xTickRotate = xTickRotate; + this.yTickRotate = yTickRotate; + this.xTickSpace = xTickSpace; + this.yTickSpace = yTickSpace; + this.check(); + } + + /** + * Instantiates a new layout. + * + * @param offsetLeft the offset left + * @param offsetRight the offset right + * @param offsetTop the offset top + * @param offsetBottom the offset bottom + * @param offsetCenter the offset center + * @param minimalTextWidth the minimal text width + * @param legendWidth the legend width + * @param largeTickLength the large tick length + * @param smallTickLength the small tick length + * @param textOffset the text offset + */ + public JHCLayout(int offsetLeft, int offsetRight, int offsetTop, int offsetBottom, int offsetCenter, int minimalTextWidth, int legendWidth, int largeTickLength, int smallTickLength, int textOffset) { + this.leftOffset = offsetLeft; + this.rightOffset = offsetRight; + this.topOffset = offsetTop; + this.bottomOffset = offsetBottom; + this.centerOffset = offsetCenter; + this.legendWidth = legendWidth; + this.smallTickLength = smallTickLength; + this.largeTickLength = largeTickLength; + this.textOffset = textOffset; + this.xTickRotate = false; + this.yTickRotate = false; + this.xTickSpace = DEFAULT_TICK_SPACE; + this.yTickSpace = DEFAULT_TICK_SPACE; + this.check(); + } + + /** + * Instantiates a new layout. + * + * @param offsetLeft the offset left + * @param offsetRight the offset right + * @param offsetTop the offset top + * @param offsetBottom the offset bottom + * @param offsetCenter the offset center + * @param minimalTextWidth the minimal text width + * @param legendWidth the legend width + * @param largeTickLength the large tick length + * @param smallTickLength the small tick length + * @param textOffset the text offset + * @param xTickRotate the x tick rotate + * @param xTickSpace the x tick space + * @param yTickRotate the y tick rotate + * @param yTickSpace the y tick space + */ + public JHCLayout(int offsetLeft, int offsetRight, int offsetTop, int offsetBottom, int offsetCenter, int minimalTextWidth, int legendWidth, int largeTickLength, int smallTickLength, int textOffset, boolean xTickRotate, int xTickSpace, boolean yTickRotate, int yTickSpace) { + this.leftOffset = offsetLeft; + this.rightOffset = offsetRight; + this.topOffset = offsetTop; + this.bottomOffset = offsetBottom; + this.centerOffset = offsetCenter; + this.legendWidth = legendWidth; + this.smallTickLength = smallTickLength; + this.largeTickLength = largeTickLength; + this.textOffset = textOffset; + this.xTickRotate = xTickRotate; + this.yTickRotate = yTickRotate; + this.xTickSpace = xTickSpace; + this.yTickSpace = yTickSpace; + this.check(); + } + + /** + * Gets the rendered layout. + * + * @param config the config + * @param canvas the canvas + * @param data the data + * @return the rendered layout + */ + protected RenderedLayout getRenderedLayout(JHCConfiguration config, Canvas canvas, JHCData data) { + return getRenderedLayout(config, canvas, canvas.getCanvasSize(), new Dimension(data.getWidth(), data.getHeight())); + } + + /** + * Gets the rendered layout. + * + * @param config the config + * @param canvas the canvas + * @param size the size + * @param heatmap the heatmap + * @return the rendered layout + */ + protected RenderedLayout getRenderedLayout(JHCConfiguration config, Canvas canvas, Dimension size, RenderedHeatmap heatmap) { + return getRenderedLayout(config, canvas, size, new Dimension(heatmap.getWidth(), heatmap.getHeight())); + } + + /** + * Check. + */ + private void check() { + check("leftOffset", leftOffset); + check("rightOffset", rightOffset); + check("topOffset", topOffset); + check("bottomOffset", bottomOffset); + check("centerOffset", centerOffset); + check("legendWidth", legendWidth); + check("largeTickLength", largeTickLength); + check("smallTickLength", smallTickLength); + check("textOffset", textOffset); + check("xTickSpace", xTickSpace); + check("yTickSpace", yTickSpace); + } + + /** + * Check. + * + * @param parameter the parameter + * @param value the value + */ + private void check(String parameter, int value) { + if (value <= 0) { + throw new IllegalArgumentException("Parameter '" + parameter + "' must be larger than zero"); + } + } + + /** + * Gets the rendered layout. + * + * @param config the config + * @param canvas the canvas + * @param canvasSize the canvas size + * @param dataSize the data size + * @return the rendered layout + */ + private RenderedLayout getRenderedLayout(JHCConfiguration config, Canvas canvas, Dimension canvasSize, Dimension dataSize) { + + // Text Layout + int postfixHeight = canvas.getExtents().height; + int textOffset = getTextOffset(); + int minimalTextWidth = canvas.getExtents().width; + int minimalTextHeight = canvas.getExtents().height; + int labelOffsetTemp = 2 * textOffset + postfixHeight; + + // Size of heatmap + int x = getLeftOffset() + labelOffsetTemp; + int y = getTopOffset(); + int width = canvasSize.width - x - getCenterOffset() - getRightOffset() - getLegendWidth(); + int height = canvasSize.height - y - getBottomOffset() - labelOffsetTemp; + + if (width <= 0 || height <= 0) { + + // Return + return new RenderedLayout(this, x, y, 0, 0, 0, 0, textOffset, 0, 0, false, false, false, 0, false, 0); + } + + // Compute heatmap size in pixels + Dimension maxSize = config.getMaximalSize(); + int heatWidth = dataSize.width; + int heatHeight = dataSize.height; + if (maxSize != null && heatWidth > maxSize.width) heatWidth = maxSize.width; + if (maxSize != null && heatHeight > maxSize.height) heatHeight = maxSize.height; + if (heatWidth > width) heatWidth = width; + if (heatHeight > height) heatHeight = height; + + // Labels + boolean drawXTicks = true; + boolean drawYTicks = true; + + // Show both ticks + if (isLayoutCanShowBothTicks(width, height, heatWidth, heatHeight, + minimalTextHeight, minimalTextWidth, postfixHeight, textOffset)) { + + if (this.isXTickRotate() && this.isYTickRotate()) { + width -= this.getYTickSpace(); + x+= this.getYTickSpace(); + + height -= this.getXTickSpace(); + } else if (!this.isXTickRotate() && this.isYTickRotate()) { + width -= this.getYTickSpace(); + x += this.getYTickSpace(); + + height -= postfixHeight + textOffset; + } else if (this.isXTickRotate() && !this.isYTickRotate()) { + width -= postfixHeight + textOffset; + x+= postfixHeight + textOffset; + + height -= this.getXTickSpace(); + } else if (!this.isXTickRotate() && !this.isYTickRotate()) { + width -= postfixHeight + textOffset; + x+= postfixHeight + textOffset; + + height -= postfixHeight + textOffset; + } + + drawXTicks = true; + drawYTicks = true; + + // Show y ticks + } else if (isLayoutCanShowYTicks(width, height, heatWidth, heatHeight, + minimalTextHeight, minimalTextWidth, postfixHeight, textOffset)) { + + if (this.isYTickRotate()) { + width -= this.getYTickSpace(); + x += this.getYTickSpace(); + + } else if (!this.isYTickRotate()) { + width -= postfixHeight + textOffset; + x += postfixHeight + textOffset; + } + + drawXTicks = false; + drawYTicks = true; + + // Show x ticks + } else if (isLayoutCanShowXTicks(width, height, heatWidth, heatHeight, + minimalTextHeight, minimalTextWidth, postfixHeight, textOffset)) { + + if (this.isXTickRotate()) { + height -= this.getXTickSpace(); + + } else if (!this.isXTickRotate()) { + height -= postfixHeight + textOffset; + } + + drawXTicks = true; + drawYTicks = false; + + // Show no ticks + } else { + drawXTicks = false; + drawYTicks = false; + } + + // Ticks + double xTickOffset = (double) width / (double) heatWidth; + double yTickOffset = (double) height / (double) heatHeight; + + // Return + return new RenderedLayout(this, x, y, width, height, heatWidth, heatHeight, textOffset, xTickOffset, yTickOffset, drawXTicks, drawYTicks, isXTickRotate(), getXTickSpace(), isYTickRotate(), getYTickSpace()); + } + + /** + * Layouting + * @param width + * @param height + * @param heatWidth + * @param heatHeight + * @param minimalTextHeight + * @param minimalTextWidth + * @param postfixHeight + * @param textOffset + * @return + */ + private boolean isLayoutCanShowBothTicks(double width, double height, double heatWidth, double heatHeight, + int minimalTextHeight, int minimalTextWidth, int postfixHeight, int textOffset) { + + if (this.isXTickRotate() && this.isYTickRotate()) { + + width -= this.getYTickSpace(); + height -= this.getXTickSpace(); + + if (width < MINIMAL_HEATMAP_SIZE || height < MINIMAL_HEATMAP_SIZE) { + return false; + } + + if (height / heatHeight >= minimalTextHeight && + width / heatWidth >= minimalTextHeight) { + return true; + } + + } else if (!this.isXTickRotate() && this.isYTickRotate()) { + + width -= this.getYTickSpace(); + height -= postfixHeight + textOffset; + + if (width < MINIMAL_HEATMAP_SIZE || height < MINIMAL_HEATMAP_SIZE) { + return false; + } + + if (height / heatHeight >= minimalTextHeight && + width / heatWidth >= minimalTextWidth) { + return true; + } + + } else if (this.isXTickRotate() && !this.isYTickRotate()) { + + width -= postfixHeight + textOffset; + height -= this.getXTickSpace(); + + if (width < MINIMAL_HEATMAP_SIZE || height < MINIMAL_HEATMAP_SIZE) { + return false; + } + + if (height / heatHeight >= minimalTextWidth && + width / heatWidth >= minimalTextHeight) { + return true; + } + + } else if (!this.isXTickRotate() && !this.isYTickRotate()) { + + width -= postfixHeight + textOffset; + height -= postfixHeight + textOffset; + + if (width < MINIMAL_HEATMAP_SIZE || height < MINIMAL_HEATMAP_SIZE) { + return false; + } + + if (height / heatHeight >= minimalTextWidth && + width / heatWidth >= minimalTextWidth) { + return true; + } + } + + return false; + } + + /** + * Layouting + * @param width + * @param height + * @param heatWidth + * @param heatHeight + * @param minimalTextHeight + * @param minimalTextWidth + * @param postfixHeight + * @param textOffset + * @return + */ + private boolean isLayoutCanShowXTicks(double width, double height, double heatWidth, double heatHeight, + int minimalTextHeight, int minimalTextWidth, int postfixHeight, int textOffset) { + + if (this.isXTickRotate()) { + + height -= this.getXTickSpace(); + + if (width < MINIMAL_HEATMAP_SIZE || height < MINIMAL_HEATMAP_SIZE) { + return false; + } + + if (width / heatWidth >= minimalTextHeight) { + return true; + } + + } else if (!this.isXTickRotate()) { + + height -= postfixHeight + textOffset; + + if (width < MINIMAL_HEATMAP_SIZE || height < MINIMAL_HEATMAP_SIZE) { + return false; + } + + if (width / heatWidth >= minimalTextWidth) { + return true; + } + + } + return false; + } + + /** + * Layouting + * @param width + * @param height + * @param heatWidth + * @param heatHeight + * @param minimalTextHeight + * @param minimalTextWidth + * @param postfixHeight + * @param textOffset + * @return + */ + private boolean isLayoutCanShowYTicks(double width, double height, double heatWidth, double heatHeight, + int minimalTextHeight, int minimalTextWidth, int postfixHeight, int textOffset) { + + if (this.isYTickRotate()) { + + width -= this.getYTickSpace(); + + if (width < MINIMAL_HEATMAP_SIZE || height < MINIMAL_HEATMAP_SIZE) { + return false; + } + + if (height / heatHeight >= minimalTextHeight) { + return true; + } + + } else if (!this.isYTickRotate()) { + + width -= postfixHeight + textOffset; + + if (width < MINIMAL_HEATMAP_SIZE || height < MINIMAL_HEATMAP_SIZE) { + return false; + } + + if (height / heatHeight >= minimalTextWidth) { + return true; + } + + } + return false; + } + + /** + * Gets the bottom offset. + * + * @return the bottom offset + */ + protected int getBottomOffset() { + return bottomOffset; + } + + /** + * Gets the center offset. + * + * @return the center offset + */ + protected int getCenterOffset() { + return centerOffset; + } + + /** + * Gets the large tick length. + * + * @return the large tick length + */ + protected int getLargeTickLength() { + return largeTickLength; + } + + /** + * Gets the left offset. + * + * @return the left offset + */ + protected int getLeftOffset() { + return leftOffset; + } + + /** + * Gets the legend width. + * + * @return the legend width + */ + protected int getLegendWidth() { + return legendWidth; + } + + /** + * Gets the right offset. + * + * @return the right offset + */ + protected int getRightOffset() { + return rightOffset; + } + + /** + * Gets the small tick length. + * + * @return the small tick length + */ + protected int getSmallTickLength() { + return smallTickLength; + } + + /** + * Gets the text offset. + * + * @return the text offset + */ + protected int getTextOffset() { + return textOffset; + } + + /** + * Gets the top offset. + * + * @return the top offset + */ + protected int getTopOffset() { + return topOffset; + } + + /** + * Gets the x tick space. + * + * @return the x tick space + */ + protected int getXTickSpace() { + return xTickSpace; + } + + /** + * Gets the y tick space. + * + * @return the y tick space + */ + protected int getYTickSpace() { + return yTickSpace; + } + + /** + * Checks if is x tick rotate. + * + * @return true, if is x tick rotate + */ + protected boolean isXTickRotate() { + return xTickRotate; + } + + /** + * Checks if is y tick rotate. + * + * @return true, if is y tick rotate + */ + protected boolean isYTickRotate() { + return yTickRotate; + } +} diff --git a/src/main/de/linearbits/jhc/JHCScale.java b/src/main/de/linearbits/jhc/JHCScale.java new file mode 100644 index 0000000..6842923 --- /dev/null +++ b/src/main/de/linearbits/jhc/JHCScale.java @@ -0,0 +1,538 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +import java.text.DateFormat; +import java.text.DecimalFormat; + +/** + * This class provides an abstract type for scales + * + * @author Fabian Prasser + * + * @param the generic type + */ +public abstract class JHCScale { + + /** + * Adjust. + * + * @param length the length + * @return the scale + */ + protected abstract JHCScale adjust(int length); + + /** + * Check. + * + * @param length the length + */ + protected abstract void check(int length); + + /** + * Gets the label at. + * + * @param index the index + * @return the label at + */ + protected abstract java.lang.String getLabelAt(int index); + + /** + * This class implements a data/time scale + * + * @author Fabian Prasser + */ + public static class Date extends JHCScale { + + /** The format. */ + private final DateFormat format; + + /** The from. */ + private final java.util.Date from; + + /** The length. */ + private final int length; + + /** The to. */ + private final java.util.Date to; + + /** + * Instantiates a new scale date. + * + * @param from the from + * @param to the to + */ + public Date(java.util.Date from, java.util.Date to) { + this(from, to, null); + } + + /** + * Instantiates a new scale date. + * + * @param from the from + * @param to the to + * @param format the format + */ + public Date(java.util.Date from, java.util.Date to, DateFormat format) { + this.from = from; + this.to = to; + this.length = 1; + this.format = format; + + if (from.getTime() > to.getTime()) { + throw new IllegalArgumentException("Lower bound must be <= upper bound"); + } + } + + /** + * Instantiates a new scale date. + * + * @param format the format + * @param from the from + * @param to the to + * @param length the length + */ + private Date(DateFormat format, java.util.Date from, java.util.Date to, int length) { + this.from = from; + this.to = to; + this.length = length; + this.format = format; + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Scale#adjust(int) + */ + @Override + protected JHCScale adjust(int length) { + return new Date(format, from, to, length); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Scale#check(int) + */ + @Override + protected void check(int length) { + + long from = this.from.getTime(); + long to = this.to.getTime(); + + if (to - from + 1 < length) { + throw new IllegalArgumentException("Scale does not provide enough ticks for data of given length"); + } + } + + /** + * Gets the from. + * + * @return the from + */ + protected java.util.Date getFrom() { + return from; + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Scale#getLabelAt(int) + */ + @Override + protected java.lang.String getLabelAt(int index) { + if (index >= length) { + throw new IllegalArgumentException("Label index (" + index + ") out of range [0, " + length + "["); + } else { + double offset = (double) (to.getTime() - from.getTime()) / (double) length; + long lower = (long) (from.getTime() + index * offset); + long upper = (long) (from.getTime() + (index + 1) * offset); + if (format == null) { + return "[" + new java.util.Date(lower) + ", " + new java.util.Date(upper) + "["; + } else { + return "[" + format.format(new java.util.Date(lower)) + ", " + format.format(new java.util.Date(upper)) + "["; + } + } + } + + /** + * Gets the to. + * + * @return the to + */ + protected java.util.Date getTo() { + return to; + } + } + + /** + * This class implements a decimal scale + * + * @author Fabian Prasser + */ + public static class Decimal extends JHCScale { + + /** The format. */ + private final DecimalFormat format; + + /** The from. */ + private final double from; + + /** The length. */ + private final int length; + + /** The to. */ + private final double to; + + /** + * Instantiates a new scale decimal. + * + * @param from the from + * @param to the to + */ + public Decimal(double from, double to) { + this(from, to, null); + } + + /** + * Instantiates a new scale decimal. + * + * @param from the from + * @param to the to + * @param format the format + */ + public Decimal(double from, double to, DecimalFormat format) { + this.from = from; + this.to = to; + this.length = 1; + this.format = format; + + if (from > to) { + throw new IllegalArgumentException("Lower bound must be <= upper bound"); + } + } + + /** + * Instantiates a new scale decimal. + * + * @param format the format + * @param from the from + * @param to the to + * @param length the length + */ + private Decimal(DecimalFormat format, double from, double to, int length) { + this.from = from; + this.to = to; + this.length = length; + this.format = format; + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Scale#adjust(int) + */ + @Override + protected JHCScale adjust(int length) { + return new Decimal(format, from, to, length); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Scale#check(int) + */ + @Override + protected void check(int length) { + // Nothing to do + } + + /** + * Gets the from. + * + * @return the from + */ + protected double getFrom() { + return from; + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Scale#getLabelAt(int) + */ + @Override + protected java.lang.String getLabelAt(int index) { + if (index >= length) { + throw new IllegalArgumentException("Label index (" + index + ") out of range [0, " + length + "["); + } else { + double offset = (to - from) / length; + int lower = (int) (from + index * offset); + int upper = (int) (from + (index + 1) * offset); + if (format == null) { + return "[" + lower + ", " + upper + "["; + } else { + return "[" + format.format(lower) + ", " + format.format(upper) + "["; + } + } + } + + /** + * Gets the to. + * + * @return the to + */ + protected double getTo() { + return to; + } + } + + /** + * This class implements an integer scale + * + * @author Fabian Prasser + */ + public static class Integer extends JHCScale { + + /** The from. */ + private final int from; + + /** The length. */ + private final int length; + + /** The to. */ + private final int to; + + /** + * Instantiates a new scale integer. + * + * @param from the from + * @param to the to + */ + public Integer(int from, int to) { + this.from = from; + this.to = to; + this.length = 1; + + if (from > to) { + throw new IllegalArgumentException("Lower bound must be <= upper bound"); + } + } + + /** + * Instantiates a new scale integer. + * + * @param from the from + * @param to the to + * @param length the length + */ + private Integer(int from, int to, int length) { + this.from = from; + this.to = to; + this.length = length; + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Scale#adjust(int) + */ + @Override + protected Integer adjust(int length) { + return new Integer(from, to, length); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Scale#check(int) + */ + @Override + protected void check(int length) { + if (to - from + 1 < length) { + throw new IllegalArgumentException("Scale does not provide enough ticks for data of given length"); + } + } + + /** + * Gets the from. + * + * @return the from + */ + protected int getFrom() { + return from; + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Scale#getLabelAt(int) + */ + @Override + protected java.lang.String getLabelAt(int index) { + if (index >= length) { + throw new IllegalArgumentException("Label index (" + index + ") out of range [0, " + length + "["); + } else { + double offset = (double) (to - from) / (double) length; + int lower = (int) (from + index * offset); + int upper = (int) (from + (index + 1) * offset); + return "[" + lower + ", " + upper + "["; + } + } + + /** + * Gets the to. + * + * @return the to + */ + protected int getTo() { + return to; + } + } + + /** + * This class implements a string scale + * + * @author Fabian Prasser + */ + public static class String extends JHCScale { + + /** The values. */ + private final java.lang.String[] values; + + /** + * Instantiates a new scale string. + * + * @param values the values + */ + public String(java.lang.String[] values) { + this.values = values; + if (values == null || values.length == 0) { + throw new IllegalArgumentException("Labels must not be empty"); + } + } + + /** + * Instantiates a new scale string. + * + * @param values the values + * @param length the length + */ + private String(java.lang.String[] values, int length) { + this.values = adjust(length, values); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Scale#adjust(int) + */ + @Override + protected JHCScale adjust(int length) { + return new String(values, length); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Scale#check(int) + */ + @Override + protected void check(int length) { + if (length != values.length) { + throw new IllegalArgumentException("Number of labels must match data length"); + } + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Scale#getLabelAt(int) + */ + @Override + protected java.lang.String getLabelAt(int index) { + if (index >= values.length) { + throw new IllegalArgumentException("Label index (" + index + ") out of range [0, " + values.length + "["); + } else { + return values[index]; + } + } + + /** + * Gets the values. + * + * @return the values + */ + protected java.lang.String[] getValues() { + return this.values; + } + + /** + * Adjust. + * + * @param target the target + * @param source the source + * @param index the index + * @return the int + */ + protected int adjust(int target, int source, int index) { + index = (int) Math.round((double) target / (double) source * index); + return index < target ? index : target - 1; + } + + /** + * Adjust. + * + * @param target the target + * @param source the source + * @return the string[] + */ + protected java.lang.String[] adjust(int target, java.lang.String[] source) { + + if (source == null) { + return null; + } + + if (target == source.length) { + return source; + } + + StringBuilder[] buffers = new StringBuilder[target]; + + for (int x = 0; x < target; x++) { + buffers[x] = new StringBuilder("{"); + } + + for (int x = 0; x < source.length; x++) { + int index = adjust(target, source.length, x); + if (buffers[index].length() == 1) { + buffers[index].append(source[x]); + } else { + buffers[index].append(", ").append(source[x]); + } + } + + java.lang.String[] result = new java.lang.String[target]; + + for (int x = 0; x < target; x++) { + result[x] = buffers[x].append("}").toString(); + } + return result; + } + } +} diff --git a/src/main/de/linearbits/jhc/Painter.java b/src/main/de/linearbits/jhc/Painter.java new file mode 100644 index 0000000..3961d06 --- /dev/null +++ b/src/main/de/linearbits/jhc/Painter.java @@ -0,0 +1,323 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +/** + * This class paints the heatmap via a generic graphics object + * + * @author Fabian Prasser + * + * @param the generic type + * @param the generic type + * @param the value type + */ +class Painter { + + /** The canvas. */ + private final Canvas canvas; + + /** The gradient. */ + private JHCGradient gradient; + + /** The insets. */ + private Rectangle heatmapPosition = null; + + /** The position of the legend. */ + private Rectangle legendPosition = null; + + /** The legend. */ + private T legend; + + /** + * Instantiates a new painter. + * + * @param canvas the canvas + */ + protected Painter(Canvas canvas) { + this.canvas = canvas; + } + + /** + * Gets the insets. + * + * @return the heatmap position + */ + protected Rectangle getHeatmapPosition() { + return heatmapPosition; + } + + /** + * Gets the legend position. + * + * @return the legend position + */ + protected Rectangle getLegendPosition() { + return legendPosition; + } + /** + * Paint. + * + * @param graphics the graphics + * @param heatmap the heatmap + * @param size the size + */ + protected void paint(Graphics graphics, RenderedHeatmap heatmap, Dimension size) { + + if (heatmap == null || + heatmap == RenderedHeatmap.NO_DATA || + heatmap == RenderedHeatmap.TOO_SMALL) { + + graphics.init(); + + // Clear + graphics.setBackground(canvas.getBackground()); + graphics.drawRectangleFilled(0, 0, size.width, size.height); + graphics.setForeground(canvas.getForeground()); + + String message = "No data"; + if (heatmap == RenderedHeatmap.TOO_SMALL) { + message = "No space"; + } + graphics.drawStringCentered(message, 0, 0, size.width, size.height); + + // Return + return; + } + + + // Layout + JHCConfiguration config = heatmap.getConfig(); + RenderedLayout layout = config.getLayout().getRenderedLayout(config, canvas, size, heatmap); + + graphics.init(); + + // Prepare legend + if (legend == null || config.getGradient() != gradient) { + if (legend != null) { + disposeLegend(this.legend); + } + this.legend = graphics.drawLegend(config.getGradient()); + this.gradient = config.getGradient(); + } + + int width = layout.getWidth(); + int height = layout.getHeight(); + int x = layout.getX(); + int y = layout.getY(); + int textOffset = layout.getTextOffset(); + double xTickOffset = layout.getxTickOffset(); + double yTickOffset = layout.getyTickOffset(); + boolean drawXTicks = layout.isDrawXTicks(); + boolean drawYTicks = layout.isDrawYTicks(); + boolean xTicksRotate = layout.isXTicksRotate(); + boolean yTicksRotate = layout.isYTicksRotate(); + int xTicksSpace = layout.getXTicksSpace(); + int yTicksSpace = layout.getYTicksSpace(); + + if (width <= 0 || height <= 0) { + + // Clear + graphics.setBackground(canvas.getBackground()); + graphics.drawRectangleFilled(0, 0, size.width, size.height); + heatmapPosition = null; + + // Return + return; + } + + // Offsets and ticks + int xAxisLabelOffset = y + height + textOffset; + int yAxisLabelOffset = x - textOffset; + int smallTickLength = layout.getSmallTickLength(); + int largeTickLength = layout.getLargeTickLength(); + xTickOffset = xTickOffset >= 2 ? xTickOffset : 2; + yTickOffset = yTickOffset >= 2 ? yTickOffset : 2; + + // Legend + int centerOffset = layout.getCenterOffset(); + int legendWidth = layout.getLegendWidth(); + double legendTicksOffset = (double) height / (double) gradient.getSteps(); + legendTicksOffset = legendTicksOffset >= 2 ? legendTicksOffset : 2; + + // Clear + graphics.setBackground(canvas.getBackground()); + graphics.drawRectangleFilled(0, 0, size.width, size.height); + + // Heatmap + graphics.disableAntialiasing(); + graphics.disableInterpolation(); + graphics.drawImage(heatmap.getImage(), x, y, width, height); + graphics.resetAntialiasing(); + graphics.resetInterpolation(); + + // Small X-ticks + if (xTickOffset >= 2) { + graphics.setForeground(canvas.getGray()); + double xTickPosition = x; + for (int i = 0; i < heatmap.getWidth(); i++) { + int xTickPositionAsInt = (int) Math.round(xTickPosition); + xTickPositionAsInt = xTickPositionAsInt < x + width ? xTickPositionAsInt : x + width; + graphics.drawLine(xTickPositionAsInt, y + height, xTickPositionAsInt, y + height + smallTickLength); + graphics.drawLine(xTickPositionAsInt, y, xTickPositionAsInt, y - smallTickLength); + xTickPosition += xTickOffset; + } + } + + // X-tick labels + if (drawXTicks) { + + if (!xTicksRotate) { + graphics.setForeground(canvas.getForeground()); + double xTickPosition = x; + int xTickWidth = (int) xTickOffset; + for (int i = 0; i < heatmap.getWidth(); i++) { + int xTickPositionAsInt = (int) Math.round(xTickPosition); + graphics.drawStringBelowHorizontallyCentered(heatmap.getXLabel(i), xTickPositionAsInt, y + height + textOffset, xTickWidth); + xTickPosition += xTickOffset; + } + graphics.resetClipping(); + xAxisLabelOffset += textOffset + graphics.getTextHeight(config.getXLabel()); + } else { + + graphics.setRotation(-90); + double xTickPosition = x; + graphics.setForeground(canvas.getForeground()); + int xTickWidth = (int) xTickOffset; + for (int i = 0; i < heatmap.getWidth(); i++) { + + int xTickPositionAsInt = (int) Math.round(xTickPosition); + String label = heatmap.getXLabel(i); + int offset = Math.min(xTicksSpace, graphics.getTextWidth(label)); + graphics.drawStringVerticallyCenteredLeftAligned(label, -(y + height + textOffset + offset), xTickPositionAsInt, xTicksSpace, xTickWidth); + xTickPosition += xTickOffset; + } + graphics.resetRotation(); + graphics.resetClipping(); + xAxisLabelOffset += xTicksSpace; + } + } + + // Small Y-ticks + if (yTickOffset >= 2) { + double yTickPosition = y + height; + graphics.setForeground(canvas.getGray()); + for (int i = 0; i < heatmap.getHeight(); i++) { + int yTickPositionAsInt = (int) Math.round(yTickPosition); + yTickPositionAsInt = yTickPositionAsInt >= y ? yTickPositionAsInt : y; + graphics.drawLine(x, yTickPositionAsInt, x - smallTickLength, yTickPositionAsInt); + graphics.drawLine(x + width, yTickPositionAsInt, x + width + smallTickLength, yTickPositionAsInt); + yTickPosition -= yTickOffset; + } + } + + // Y-tick labels + if (drawYTicks) { + + if (!yTicksRotate) { + graphics.setRotation(-90); + double yTickPosition = y + height; + graphics.setForeground(canvas.getForeground()); + int yTickWidth = (int) yTickOffset; + for (int i = 0; i < heatmap.getHeight(); i++) { + int yTickPositionAsInt = (int) Math.round(yTickPosition); + graphics.drawStringAboveHorizontallyCentered(heatmap.getYLabel(i), -yTickPositionAsInt, x - textOffset, yTickWidth); + yTickPosition -= yTickOffset; + } + graphics.resetRotation(); + graphics.resetClipping(); + yAxisLabelOffset -= textOffset + graphics.getTextHeight(config.getYLabel()); + } else { + + double yTickPosition = y + height - yTickOffset; + int yTickX = x - textOffset - yTicksSpace; + graphics.setForeground(canvas.getForeground()); + for (int i = 0; i < heatmap.getHeight(); i++) { + int yTickPositionAsInt = (int) Math.round(yTickPosition); + String label = heatmap.getYLabel(i); + int offset = yTicksSpace - Math.min(yTicksSpace, graphics.getTextWidth(label)); + graphics.drawStringVerticallyCenteredLeftAligned(heatmap.getYLabel(i), yTickX + offset, yTickPositionAsInt, yTicksSpace, (int) yTickOffset); + yTickPosition -= yTickOffset; + } + graphics.resetClipping(); + yAxisLabelOffset -= yTicksSpace; + } + } + + // Large ticks + graphics.setForeground(canvas.getBlack()); + graphics.drawLine(x, y - largeTickLength, x, y + height + largeTickLength); + graphics.drawLine(x + width, y - largeTickLength, x + width, y + height + largeTickLength); + graphics.drawLine(x - largeTickLength, y, x + width + largeTickLength, y); + graphics.drawLine(x - largeTickLength, y + height, x + width + largeTickLength, y + height); + + // Legend ticks + int legendX = x + width + centerOffset; + double legendTicksPosition = y; + graphics.setForeground(canvas.getGray()); + for (int i = 0; i < gradient.getSteps(); i++) { + int position = (int) Math.round(legendTicksPosition); + position = position <= y + height ? position : y + height; + graphics.drawLine(legendX - smallTickLength, position, legendX + legendWidth + smallTickLength, position); + legendTicksPosition += legendTicksOffset; + } + + // Legend + graphics.enableAntialiasing(); + graphics.enableInterpolation(); + + graphics.drawImage(legend, legendX, y, legendWidth, height); + graphics.resetAntialiasing(); + graphics.resetInterpolation(); + + // Legend border + graphics.setForeground(canvas.getBlack()); + graphics.drawLine(legendX, y - largeTickLength, legendX, y + height + largeTickLength); + graphics.drawLine(legendX + legendWidth, y - largeTickLength, legendX + legendWidth, y + height + largeTickLength); + graphics.drawLine(legendX - largeTickLength, y, legendX + legendWidth + largeTickLength, y); + graphics.drawLine(legendX - largeTickLength, y + height, legendX + legendWidth + largeTickLength, y + height); + + // Legend labels + graphics.setForeground(canvas.getForeground()); + graphics.drawStringAboveHorizontallyCentered("Max", legendX, y - textOffset, legendWidth); + graphics.drawStringBelowHorizontallyCentered("Min", legendX + 1, y + height + textOffset, legendWidth); + graphics.resetClipping(); + + // X-axis label + graphics.drawStringBelowHorizontallyCentered(config.getXLabel(), x, xAxisLabelOffset, width); + + // Y-axis label + graphics.setRotation(-90); + graphics.drawStringAboveHorizontallyCentered(config.getYLabel(), -(y + height), yAxisLabelOffset, height); + graphics.resetRotation(); + graphics.resetClipping(); + + // Store insets + heatmapPosition = new Rectangle(x, y, width, height); + legendPosition = new Rectangle(legendX, y, legendWidth, height); + } + + protected void disposeLegend(T legend) { + // Overwritten by SWT version + } + + protected void dispose(){ + if (legend != null) { + disposeLegend(legend); + } + } +} diff --git a/src/main/de/linearbits/jhc/Pixels.java b/src/main/de/linearbits/jhc/Pixels.java new file mode 100644 index 0000000..d3335b5 --- /dev/null +++ b/src/main/de/linearbits/jhc/Pixels.java @@ -0,0 +1,56 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +/** + * This interface describes an array of pixels + * + * @author Fabian Prasser + * + * @param the generic type + */ +interface Pixels { + + /** + * Gets the image. + * + * @return the image + */ + public abstract T getImage(); + + /** + * Gets the size. + * + * @return the size + */ + public abstract Dimension getSize(); + + /** + * Sets the. + * + * @param x the x + * @param y the y + * @param val the val + */ + public abstract void set(int x, int y, int val); + + /** + * Update. + */ + public abstract void update(); +} diff --git a/src/main/de/linearbits/jhc/ProviderCharArray.java b/src/main/de/linearbits/jhc/ProviderCharArray.java new file mode 100644 index 0000000..9ebb6b1 --- /dev/null +++ b/src/main/de/linearbits/jhc/ProviderCharArray.java @@ -0,0 +1,149 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +/** + * This class implements a data provider based on char arrays + * + * @author Fabian Prasser + */ +class ProviderCharArray implements JHCDataProvider{ + + /** The orientation*/ + private final Orientation orientation; + /** The array*/ + private final char[][] array; + /** Scale*/ + private final JHCScale xScale; + /** Scale*/ + private final JHCScale yScale; + + /** + * Creates a new instance + * @param array + * @param orientation + */ + protected ProviderCharArray(char[][] array, Orientation orientation){ + this(array, orientation, null, null); + } + + /** + * Creates a new instance + * @param array + * @param orientation + * @param xScale + * @param yScale + */ + protected ProviderCharArray(char[][] array, Orientation orientation, JHCScale xScale, JHCScale yScale){ + + if (array == null || array.length == 0 || array[0] == null || array[0].length ==0){ + throw new IllegalArgumentException("Array must not be empty"); + } + + int length = -1; + for (char[] row : array) { + if (row == null || row.length == 0){ + throw new IllegalArgumentException("Array must not be empty"); + } + if (length == -1) { + length = row.length; + } else if (length != row.length) { + throw new IllegalArgumentException("All rows must have equal length"); + } + } + + if (orientation == null) { + throw new IllegalArgumentException("Orientation must not be null"); + } + + this.xScale = xScale; + this.yScale = yScale; + this.array = array; + this.orientation = orientation; + } + + /** + * Returns the. + * + * @param x the x + * @param y the y + * @return the double + */ + public double get(int x, int y) { + switch (orientation){ + case ROW: + return array[y][x]; + case COLUMN: + return array[x][y]; + } + throw new IllegalStateException("Unknown array orientation"); + } + + /** + * Gets the height. + * + * @return the height + */ + public int getHeight() { + switch (orientation){ + case ROW: + return array.length; + case COLUMN: + return array[0].length; + } + throw new IllegalStateException("Unknown array orientation"); + } + + /** + * Gets the width. + * + * @return the width + */ + public int getWidth() { + switch (orientation){ + case ROW: + return array[0].length; + case COLUMN: + return array.length; + } + throw new IllegalStateException("Unknown array orientation"); + } + + /** + * Gets the x labels. + * + * @return the x scale + */ + public JHCScale getXScale() { + return xScale; + } + + /** + * Gets the y labels. + * + * @return the y scale + */ + public JHCScale getYScale() { + return yScale; + } + + @Override + public Orientation getOrientation() { + return orientation; + } +} diff --git a/src/main/de/linearbits/jhc/ProviderData.java b/src/main/de/linearbits/jhc/ProviderData.java new file mode 100644 index 0000000..4f8e257 --- /dev/null +++ b/src/main/de/linearbits/jhc/ProviderData.java @@ -0,0 +1,494 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +import java.util.Iterator; + +import de.linearbits.jhc.JHCDataProvider.Orientation; +import de.linearbits.jhc.JHCHeatmap.Point; + +/** + * This class implements JHC data based on a given data provider + * + * @author Fabian Prasser + */ +class ProviderData extends JHCData { + + /** + * The Class HeatPointProvider. + */ + protected class ProviderDataPoint implements Point { + + /** The x */ + protected int x; + + /** The y */ + protected int y; + + /** The value*/ + protected double value; + + @Override + public double getValue() { + return value; + } + + @Override + public int getX() { + return x; + } + + @Override + public int getY() { + return y; + } + } + + /** The x labels. */ + protected final JHCScale xScale; + + /** The y labels. */ + protected final JHCScale yScale; + + /** The orientation*/ + private final Orientation orientation; + + /** The provider*/ + private final JHCDataProvider provider; + + /** The min*/ + private double min = Double.MAX_VALUE; + + /** The min*/ + private double max = Double.MIN_VALUE; + + /** + * Instantiates a new data provider. + * + * @param provider the provider + */ + protected ProviderData(JHCDataProvider provider) { + + // Check + if (provider == null) { + throw new IllegalArgumentException("Data must not be null"); + } + if (provider.getWidth() == 0 || provider.getHeight() == 0) { + throw new IllegalArgumentException("Data must not be empty"); + } + + // Init + this.xScale = provider.getXScale(); + this.yScale = provider.getYScale(); + this.orientation = provider.getOrientation(); + this.provider = provider; + + if (xScale != null) { + xScale.check(provider.getWidth()); + } + if (yScale != null) { + yScale.check(provider.getHeight()); + } + } + + /** + * Check if all required values have been computed + */ + private void ensureMinMaxAvailable() { + if (min==Double.MAX_VALUE && max==Double.MIN_VALUE) { + + switch (orientation){ + case COLUMN: + for (int x = 0; x < provider.getWidth(); x++) { + for (int y = 0; y < provider.getHeight(); y++) { + double value = provider.get(x, y); + min = Math.min(min, value); + max = Math.max(max, value); + } + } + break; + case ROW: + for (int y = 0; y < provider.getHeight(); y++) { + for (int x = 0; x < provider.getWidth(); x++) { + double value = provider.get(x, y); + min = Math.min(min, value); + max = Math.max(max, value); + } + } + break; + } + } + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Data#getHeat(int, int) + */ + @Override + public JHCHeatmap getHeatmap(int width, int height) { + + int originalWidth = provider.getWidth(); + int originalHeight = provider.getHeight(); + + // Check bounds + if (width > originalWidth) width = originalWidth; + if (height > originalHeight) height = originalHeight; + + // Scale the scale + JHCScale xScale = this.xScale != null ? this.xScale.adjust(width) : null; + JHCScale yScale = this.yScale != null ? this.yScale.adjust(height) : null; + + // Check if no need to scale + if (width == originalWidth && height == originalHeight) { + ensureMinMaxAvailable(); + ProviderDataPoint point = new ProviderDataPoint(); + return getHeatmap(point, provider, min, max, xScale, yScale); + } + + // Create maps + int[] xMap = createMap(width, originalWidth); + int[] yMap = createMap(height, originalHeight); + + // Create entry set + double[][] frequencies = new double[height][width]; + int[][] counts = new int[height][width]; + for (int y = 0; y < height; y++) { + frequencies[y] = new double[width]; + counts[y] = new int[width]; + } + + if (min == Double.MAX_VALUE && max == Double.MIN_VALUE) { + + switch (orientation){ + case COLUMN: + for (int x = 0; x < provider.getWidth(); x++) { + int xIndex = xMap[x]; + for (int y = 0; y < provider.getHeight(); y++) { + int yIndex = yMap[y]; + double value = provider.get(x,y); + frequencies[yIndex][xIndex] += value; + counts[yIndex][xIndex]++; + max = Math.max(max, value); + min = Math.min(min, value); + } + } + break; + case ROW: + for (int y = 0; y < provider.getHeight(); y++) { + int yIndex = yMap[y]; + for (int x = 0; x < provider.getWidth(); x++) { + int xIndex = xMap[x]; + double value = provider.get(x,y); + frequencies[yIndex][xIndex] += value; + counts[yIndex][xIndex]++; + max = Math.max(max, value); + min = Math.min(min, value); + } + } + break; + } + } else { + + switch (orientation){ + case COLUMN: + for (int x = 0; x < provider.getWidth(); x++) { + int xIndex = xMap[x]; + for (int y = 0; y < provider.getHeight(); y++) { + int yIndex = yMap[y]; + frequencies[yIndex][xIndex] += provider.get(x,y); + counts[yIndex][xIndex]++; + } + } + break; + case ROW: + for (int y = 0; y < provider.getHeight(); y++) { + int yIndex = yMap[y]; + for (int x = 0; x < provider.getWidth(); x++) { + int xIndex = xMap[x]; + frequencies[yIndex][xIndex] += provider.get(x,y); + counts[yIndex][xIndex]++; + } + } + break; + } + + } + + // Aggregate + for (int y = 0; y < height; y++) { + for (int x = 0; x < width; x++) { + frequencies[y][x] = frequencies[y][x] / counts[y][x]; + } + } + + // Return + ProviderDataPoint point = new ProviderDataPoint(); + return getHeatmap(point, width, height, originalWidth, originalHeight, frequencies, min, max, xScale, yScale); + } + + @Override + public int getWidth() { + return provider.getWidth(); + } + + @Override + public int getHeight() { + return provider.getHeight(); + } + + /** + * Creates the index. + * + * @param target the target + * @param source the source + * @param index the index + * @return the int + */ + private int createIndex(int target, int source, int index) { + index = (int) Math.round((double) target / (double) source * index); + return index < target ? index : target - 1; + } + + /** + * Creates the map. + * + * @param target the target + * @param source the source + * @return the int[] + */ + protected int[] createMap(int target, int source) { + int[] result = new int[source]; + if (source != target) { + for (int x = 0; x < source; x++) { + result[x] = createIndex(target, source, x); + } + } else { + for (int x = 0; x < source; x++) { + result[x] = x; + } + } + return result; + } + + /** + * Gets the heat. + * + * @param point the point + * @param width the width + * @param height the height + * @param originalWidth the original width + * @param originalHeight the original height + * @param max the max + * @param xScale the x scale + * @param yScale the y scale + * @return the heat + */ + protected JHCHeatmap getHeatmap(final ProviderDataPoint point, final int width, final int height, final int originalWidth, final int originalHeight, final double[][] data, final double min, final double max, final JHCScale xScale, final JHCScale yScale) { + + // Create iterator + final Iterator iterator = new Iterator() { + + int x = 0; + int y = 0; + + @Override + public boolean hasNext() { + return y < height; + } + + @Override + public Point next() { + + point.x = x; + point.y = y; + point.value = data[y][x]; + + x++; + if (x == width) { + x = 0; + y++; + } + + return point; + } + + @Override + public void remove() { + throw new UnsupportedOperationException(); + } + }; + + // Return heat + return new JHCHeatmap() { + + @Override + public int getHeight() { + return height; + } + + @Override + public double getMin() { + return min; + } + + @Override + public double getMax() { + return max; + } + + @Override + public int getWidth() { + return width; + } + + @Override + public String getXLabel(int index) { + if (xScale == null) { + if (originalWidth != width) { + int lower = (int) ((double) index / (double) width * originalWidth); + int upper = (int) ((double) (index + 1) / (double) width * originalWidth); + if (upper > originalWidth) upper = originalWidth; + return "[" + lower + ", " + upper + "["; + + } else { + return String.valueOf(index); + } + } else return xScale.getLabelAt(index); + } + + @Override + public String getYLabel(int index) { + if (yScale == null) { + if (originalHeight != height) { + int lower = (int) ((double) index / (double) height * originalHeight); + int upper = (int) ((double) (index + 1) / (double) height * originalHeight); + if (upper > originalHeight) upper = originalHeight; + return "[" + lower + ", " + upper + "["; + + } else { + return String.valueOf(index); + } + } else return yScale.getLabelAt(index); + } + + @Override + public Iterator iterator() { + return iterator; + } + }; + } + + /** + * Gets the heat for an unscaled version of the provider's data + * + * @param point the point + * @param provider the provider + * @param min the min + * @param max the max + * @param xScale the x scale + * @param yScale the y scale + * @return the heat + */ + protected JHCHeatmap getHeatmap(final ProviderDataPoint point, final JHCDataProvider provider, final double min, final double max, final JHCScale xScale, final JHCScale yScale) { + + + final int width = provider.getWidth(); + final int height = provider.getHeight(); + + // Create iterator + final Iterator iterator = new Iterator() { + + int x = 0; + int y = 0; + + @Override + public boolean hasNext() { + return y < height; + } + + @Override + public Point next() { + + point.x = x; + point.y = y; + point.value = provider.get(x, y); + + x++; + if (x == width) { + x = 0; + y++; + } + + return point; + } + + @Override + public void remove() { + throw new UnsupportedOperationException(); + } + }; + + // Return heat + return new JHCHeatmap() { + + @Override + public int getHeight() { + return height; + } + + @Override + public double getMin() { + return min; + } + + @Override + public double getMax() { + return max; + } + + @Override + public int getWidth() { + return width; + } + + @Override + public String getXLabel(int index) { + if (xScale == null) { + return String.valueOf(index); + } else { + return xScale.getLabelAt(index); + } + } + + @Override + public String getYLabel(int index) { + if (yScale == null) { + return String.valueOf(index); + } else { + return yScale.getLabelAt(index); + } + } + + @Override + public Iterator iterator() { + return iterator; + } + }; + } +} diff --git a/src/main/de/linearbits/jhc/ProviderDoubleArray.java b/src/main/de/linearbits/jhc/ProviderDoubleArray.java new file mode 100644 index 0000000..ca3a822 --- /dev/null +++ b/src/main/de/linearbits/jhc/ProviderDoubleArray.java @@ -0,0 +1,158 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + + +/** + * This class implements a data provider based on double arrays + * + * @author Fabian Prasser + */ +class ProviderDoubleArray implements JHCDataProvider{ + + /** Orientation*/ + private final Orientation orientation; + /** Array*/ + private final double[][] array; + /** Scale*/ + private final JHCScale xScale; + /** Scale*/ + private final JHCScale yScale; + + /** + * Creates a new instance + * @param array + */ + protected ProviderDoubleArray(double[][] array){ + this(array, Orientation.ROW, null, null); + } + + /** + * Creates a new instance + * @param array + * @param orientation + */ + protected ProviderDoubleArray(double[][] array, Orientation orientation){ + this(array, orientation, null, null); + } + + /** + * Creates a new instance + * @param array + * @param orientation + * @param xScale + * @param yScale + */ + protected ProviderDoubleArray(double[][] array, Orientation orientation, JHCScale xScale, JHCScale yScale){ + + if (array == null || array.length == 0 || array[0] == null || array[0].length ==0){ + throw new IllegalArgumentException("Array must not be empty"); + } + + int length = -1; + for (double[] row : array) { + if (row == null || row.length == 0){ + throw new IllegalArgumentException("Array must not be empty"); + } + if (length == -1) { + length = row.length; + } else if (length != row.length) { + throw new IllegalArgumentException("All rows must have equal length"); + } + } + + if (orientation == null) { + throw new IllegalArgumentException("Orientation must not be null"); + } + + this.xScale = xScale; + this.yScale = yScale; + this.array = array; + this.orientation = orientation; + } + + /** + * Returns the. + * + * @param x the x + * @param y the y + * @return the double + */ + public double get(int x, int y) { + switch (orientation){ + case ROW: + return array[y][x]; + case COLUMN: + return array[x][y]; + } + throw new IllegalStateException("Unknown array orientation"); + } + + /** + * Gets the height. + * + * @return the height + */ + public int getHeight() { + switch (orientation){ + case ROW: + return array.length; + case COLUMN: + return array[0].length; + } + throw new IllegalStateException("Unknown array orientation"); + } + + /** + * Gets the width. + * + * @return the width + */ + public int getWidth() { + switch (orientation){ + case ROW: + return array[0].length; + case COLUMN: + return array.length; + } + throw new IllegalStateException("Unknown array orientation"); + } + + /** + * Gets the x labels. + * + * @return the x scale + */ + public JHCScale getXScale() { + return xScale; + } + + /** + * Gets the y labels. + * + * @return the y scale + */ + public JHCScale getYScale() { + return yScale; + } + + @Override + public Orientation getOrientation() { + return orientation; + } +} diff --git a/src/main/de/linearbits/jhc/ProviderFloatArray.java b/src/main/de/linearbits/jhc/ProviderFloatArray.java new file mode 100644 index 0000000..210b3f4 --- /dev/null +++ b/src/main/de/linearbits/jhc/ProviderFloatArray.java @@ -0,0 +1,157 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +/** + * This class implements a data provider based on float arrays + * + * @author Fabian Prasser + */ +class ProviderFloatArray implements JHCDataProvider{ + + /** Orientation*/ + private final Orientation orientation; + /** Array*/ + private final float[][] array; + /** Scale*/ + private final JHCScale xScale; + /** Scale*/ + private final JHCScale yScale; + + /** + * Creates a new instance + * @param array + */ + protected ProviderFloatArray(float[][] array){ + this(array, Orientation.ROW, null, null); + } + + /** + * Creates a new instance + * @param array + * @param orientation + */ + protected ProviderFloatArray(float[][] array, Orientation orientation){ + this(array, orientation, null, null); + } + + /** + * Creates a new instance + * @param array + * @param orientation + * @param xScale + * @param yScale + */ + protected ProviderFloatArray(float[][] array, Orientation orientation, JHCScale xScale, JHCScale yScale){ + + if (array == null || array.length == 0 || array[0] == null || array[0].length ==0){ + throw new IllegalArgumentException("Array must not be empty"); + } + + int length = -1; + for (float[] row : array) { + if (row == null || row.length == 0){ + throw new IllegalArgumentException("Array must not be empty"); + } + if (length == -1) { + length = row.length; + } else if (length != row.length) { + throw new IllegalArgumentException("All rows must have equal length"); + } + } + + if (orientation == null) { + throw new IllegalArgumentException("Orientation must not be null"); + } + + this.xScale = xScale; + this.yScale = yScale; + this.array = array; + this.orientation = orientation; + } + + /** + * Returns the. + * + * @param x the x + * @param y the y + * @return the double + */ + public double get(int x, int y) { + switch (orientation){ + case ROW: + return array[y][x]; + case COLUMN: + return array[x][y]; + } + throw new IllegalStateException("Unknown array orientation"); + } + + /** + * Gets the height. + * + * @return the height + */ + public int getHeight() { + switch (orientation){ + case ROW: + return array.length; + case COLUMN: + return array[0].length; + } + throw new IllegalStateException("Unknown array orientation"); + } + + /** + * Gets the width. + * + * @return the width + */ + public int getWidth() { + switch (orientation){ + case ROW: + return array[0].length; + case COLUMN: + return array.length; + } + throw new IllegalStateException("Unknown array orientation"); + } + + /** + * Gets the x labels. + * + * @return the x scale + */ + public JHCScale getXScale() { + return xScale; + } + + /** + * Gets the y labels. + * + * @return the y scale + */ + public JHCScale getYScale() { + return yScale; + } + + @Override + public Orientation getOrientation() { + return orientation; + } +} diff --git a/src/main/de/linearbits/jhc/ProviderIntegerArray.java b/src/main/de/linearbits/jhc/ProviderIntegerArray.java new file mode 100644 index 0000000..0040be5 --- /dev/null +++ b/src/main/de/linearbits/jhc/ProviderIntegerArray.java @@ -0,0 +1,157 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +/** + * This class implements a data provider based on integer arrays + * + * @author Fabian Prasser + */ +class ProviderIntegerArray implements JHCDataProvider{ + + /** Orientation*/ + private final Orientation orientation; + /** Array*/ + private final int[][] array; + /** Scale*/ + private final JHCScale xScale; + /** Scale*/ + private final JHCScale yScale; + + /** + * Creates a new instance + * @param array + */ + protected ProviderIntegerArray(int[][] array){ + this(array, Orientation.ROW, null, null); + } + + /** + * Creates a new instance + * @param array + * @param orientation + */ + protected ProviderIntegerArray(int[][] array, Orientation orientation){ + this(array, orientation, null, null); + } + + /** + * Creates a new instance + * @param array + * @param orientation + * @param xScale + * @param yScale + */ + protected ProviderIntegerArray(int[][] array, Orientation orientation, JHCScale xScale, JHCScale yScale){ + + if (array == null || array.length == 0 || array[0] == null || array[0].length ==0){ + throw new IllegalArgumentException("Array must not be empty"); + } + + int length = -1; + for (int[] row : array) { + if (row == null || row.length == 0){ + throw new IllegalArgumentException("Array must not be empty"); + } + if (length == -1) { + length = row.length; + } else if (length != row.length) { + throw new IllegalArgumentException("All rows must have equal length"); + } + } + + if (orientation == null) { + throw new IllegalArgumentException("Orientation must not be null"); + } + + this.xScale = xScale; + this.yScale = yScale; + this.array = array; + this.orientation = orientation; + } + + /** + * Returns the. + * + * @param x the x + * @param y the y + * @return the double + */ + public double get(int x, int y) { + switch (orientation){ + case ROW: + return array[y][x]; + case COLUMN: + return array[x][y]; + } + throw new IllegalStateException("Unknown array orientation"); + } + + /** + * Gets the height. + * + * @return the height + */ + public int getHeight() { + switch (orientation){ + case ROW: + return array.length; + case COLUMN: + return array[0].length; + } + throw new IllegalStateException("Unknown array orientation"); + } + + /** + * Gets the width. + * + * @return the width + */ + public int getWidth() { + switch (orientation){ + case ROW: + return array[0].length; + case COLUMN: + return array.length; + } + throw new IllegalStateException("Unknown array orientation"); + } + + /** + * Gets the x labels. + * + * @return the x scale + */ + public JHCScale getXScale() { + return xScale; + } + + /** + * Gets the y labels. + * + * @return the y scale + */ + public JHCScale getYScale() { + return yScale; + } + + @Override + public Orientation getOrientation() { + return orientation; + } +} diff --git a/src/main/de/linearbits/jhc/ProviderLongArray.java b/src/main/de/linearbits/jhc/ProviderLongArray.java new file mode 100644 index 0000000..572441a --- /dev/null +++ b/src/main/de/linearbits/jhc/ProviderLongArray.java @@ -0,0 +1,157 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +/** + * This class implements a data provider based on long arrays + * + * @author Fabian Prasser + */ +class ProviderLongArray implements JHCDataProvider{ + + /** Orientation*/ + private final Orientation orientation; + /** Array*/ + private final long[][] array; + /** Scale*/ + private final JHCScale xScale; + /** Scale*/ + private final JHCScale yScale; + + /** + * Creates a new instance + * @param array + */ + protected ProviderLongArray(long[][] array){ + this(array, Orientation.ROW, null, null); + } + + /** + * Creates a new instance + * @param array + * @param orientation + */ + protected ProviderLongArray(long[][] array, Orientation orientation){ + this(array, orientation, null, null); + } + + /** + * Creates a new instance + * @param array + * @param orientation + * @param xScale + * @param yScale + */ + protected ProviderLongArray(long[][] array, Orientation orientation, JHCScale xScale, JHCScale yScale){ + + if (array == null || array.length == 0 || array[0] == null || array[0].length ==0){ + throw new IllegalArgumentException("Array must not be empty"); + } + + int length = -1; + for (long[] row : array) { + if (row == null || row.length == 0){ + throw new IllegalArgumentException("Array must not be empty"); + } + if (length == -1) { + length = row.length; + } else if (length != row.length) { + throw new IllegalArgumentException("All rows must have equal length"); + } + } + + if (orientation == null) { + throw new IllegalArgumentException("Orientation must not be null"); + } + + this.xScale = xScale; + this.yScale = yScale; + this.array = array; + this.orientation = orientation; + } + + /** + * Returns the. + * + * @param x the x + * @param y the y + * @return the double + */ + public double get(int x, int y) { + switch (orientation){ + case ROW: + return array[y][x]; + case COLUMN: + return array[x][y]; + } + throw new IllegalStateException("Unknown array orientation"); + } + + /** + * Gets the height. + * + * @return the height + */ + public int getHeight() { + switch (orientation){ + case ROW: + return array.length; + case COLUMN: + return array[0].length; + } + throw new IllegalStateException("Unknown array orientation"); + } + + /** + * Gets the width. + * + * @return the width + */ + public int getWidth() { + switch (orientation){ + case ROW: + return array[0].length; + case COLUMN: + return array.length; + } + throw new IllegalStateException("Unknown array orientation"); + } + + /** + * Gets the x labels. + * + * @return the x scale + */ + public JHCScale getXScale() { + return xScale; + } + + /** + * Gets the y labels. + * + * @return the y scale + */ + public JHCScale getYScale() { + return yScale; + } + + @Override + public Orientation getOrientation() { + return orientation; + } +} diff --git a/src/main/de/linearbits/jhc/Rectangle.java b/src/main/de/linearbits/jhc/Rectangle.java new file mode 100644 index 0000000..1eb608b --- /dev/null +++ b/src/main/de/linearbits/jhc/Rectangle.java @@ -0,0 +1,73 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +/** + * This class implements a rectangle + * + * @author Fabian Prasser + */ +class Rectangle { + + /** The height. */ + public final int height; + + /** The width. */ + public final int width; + + /** The x. */ + public final int x; + + /** The y. */ + public final int y; + + /** + * Instantiates a new rectangle. + */ + protected Rectangle() { + this.x = 0; + this.y = 0; + this.width = 0; + this.height = 0; + } + + /** + * Instantiates a new rectangle. + * + * @param x the x + * @param y the y + * @param width the width + * @param height the height + */ + protected Rectangle(int x, int y, int width, int height) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Rectangle [x=" + x + ", y=" + y + ", width=" + width + ", height=" + height + "]"; + } +} diff --git a/src/main/de/linearbits/jhc/RenderedHeatmap.java b/src/main/de/linearbits/jhc/RenderedHeatmap.java new file mode 100644 index 0000000..5a6e9d1 --- /dev/null +++ b/src/main/de/linearbits/jhc/RenderedHeatmap.java @@ -0,0 +1,149 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +/** + * This class represents a heatmap that has been rendered to an image + * + * @author Fabian Prasser + * + * @param the generic type + */ +class RenderedHeatmap { + + @SuppressWarnings("rawtypes") + protected static final RenderedHeatmap NO_DATA = new RenderedHeatmap(); + @SuppressWarnings("rawtypes") + protected static final RenderedHeatmap TOO_SMALL = new RenderedHeatmap(); + + /** The config. */ + private final JHCConfiguration config; + + /** The heat. */ + private final JHCHeatmap heat; + + /** The height. */ + private final int height; + + /** The image. */ + private final T image; + + /** The width. */ + private final int width; + + /** + * Creates a new instance + * + * @param image the image + * @param heat the heat + * @param config the config + */ + protected RenderedHeatmap(T image, JHCHeatmap heat, JHCConfiguration config) { + this.image = image; + this.heat = heat; + this.config = config; + this.width = heat.getWidth(); + this.height = heat.getHeight(); + } + + /** + * For special instances + */ + private RenderedHeatmap() { + this.image = null; + this.heat = null; + this.config = null; + this.width = 0; + this.height = 0; + } + + /** + * Gets the config. + * + * @return the config + */ + protected JHCConfiguration getConfig() { + return config; + } + + /** + * Gets the height. + * + * @return the height + */ + protected int getHeight() { + return height; + } + + /** + * Gets the image. + * + * @return the image + */ + protected T getImage() { + return image; + } + + /** + * Gets the width. + * + * @return the width + */ + protected int getWidth() { + return width; + } + + /** + * Gets the x label. + * + * @param index the index + * @return the x label + */ + protected String getXLabel(int index) { + if (heat == null) return null; + else return heat.getXLabel(index); + } + + /** + * Gets the y label. + * + * @param index the index + * @return the y label + */ + protected String getYLabel(int index) { + if (heat == null) return null; + else return heat.getYLabel(index); + } + + /** + * Returns the min + * @return + */ + protected double getMin(){ + if (heat == null) return 0; + else return heat.getMin(); + } + + /** + * Returns the max + */ + protected double getMax() { + if (heat == null) return 0; + else return heat.getMax(); + } +} diff --git a/src/main/de/linearbits/jhc/RenderedLayout.java b/src/main/de/linearbits/jhc/RenderedLayout.java new file mode 100644 index 0000000..3215333 --- /dev/null +++ b/src/main/de/linearbits/jhc/RenderedLayout.java @@ -0,0 +1,285 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General protected License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General protected License for more details. + * + * You should have received a copy of the GNU General protected License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +/** + * This class represents a layout that has been rendered in a concrete context + * + * @author Fabian Prasser + */ +class RenderedLayout { + + /** The draw x ticks. */ + private final boolean drawXTicks; + + /** The draw y labels. */ + private final boolean drawYTicks; + + /** The heat height. */ + private final int heatHeight; + + /** The heat width. */ + private final int heatWidth; + + /** The height. */ + private final int height; + + /** The layout. */ + private final JHCLayout layout; + + /** The text offset. */ + private final int textOffset; + + /** The width. */ + private final int width; + + /** The x. */ + private final int x; + + /** The x labels rotate. */ + private final boolean rotateXTicks; + + /** The x labels rotate space. */ + private final int xTicksSpace; + + /** The x tick offset. */ + private final double xTicksOffset; + + /** The y. */ + private final int y; + + /** The y labels rotate. */ + private final boolean rotateYTicks; + + /** The y labels rotate space. */ + private final int yTicksSpace; + + /** The y tick offset. */ + private final double yTicksOffset; + + /** + * Instantiates a new layout rendered. + * + * @param layout the layout + * @param x the x + * @param y the y + * @param width the width + * @param height the height + * @param heatWidth the heat width + * @param heatHeight the heat height + * @param textOffset the text offset + * @param xTickOffset the x tick offset + * @param yTickOffset the y tick offset + * @param drawXTicks the draw x labels + * @param drawYTicks the draw y labels + * @param rotateXTicks the x labels rotate + * @param xTicksSpace the x labels rotate space + * @param rotateYTicks the y labels rotate + * @param yTicksSpace the y labels rotate space + */ + protected RenderedLayout(JHCLayout layout, int x, int y, int width, int height, int heatWidth, int heatHeight, int textOffset, double xTickOffset, double yTickOffset, boolean drawXTicks, boolean drawYTicks, boolean rotateXTicks, int xTicksSpace, boolean rotateYTicks, int yTicksSpace) { + + this.layout = layout; + this.x = x; + this.y = y; + this.width = width; + this.height = height; + this.textOffset = textOffset; + this.xTicksOffset = xTickOffset; + this.yTicksOffset = yTickOffset; + this.drawXTicks = drawXTicks; + this.drawYTicks = drawYTicks; + this.heatHeight = heatHeight; + this.heatWidth = heatWidth; + this.rotateXTicks = rotateXTicks; + this.xTicksSpace = xTicksSpace; + this.rotateYTicks = rotateYTicks; + this.yTicksSpace = yTicksSpace; + } + + /** + * Gets the center offset. + * + * @return the center offset + */ + protected int getCenterOffset() { + return layout.getCenterOffset(); + } + + /** + * Gets the heat height. + * + * @return the heat height + */ + protected int getHeatHeight() { + return heatHeight; + } + + /** + * Gets the heat width. + * + * @return the heat width + */ + protected int getHeatWidth() { + return heatWidth; + } + + /** + * Gets the height. + * + * @return the height + */ + protected int getHeight() { + return height; + } + + /** + * Gets the large tick length. + * + * @return the large tick length + */ + protected int getLargeTickLength() { + return layout.getLargeTickLength(); + } + + /** + * Gets the legend width. + * + * @return the legend width + */ + protected int getLegendWidth() { + return layout.getLegendWidth(); + } + + /** + * Gets the small tick length. + * + * @return the small tick length + */ + protected int getSmallTickLength() { + return layout.getSmallTickLength(); + } + + /** + * Gets the text offset. + * + * @return the text offset + */ + protected int getTextOffset() { + return textOffset; + } + + /** + * Gets the width. + * + * @return the width + */ + protected int getWidth() { + return width; + } + + /** + * Gets the x. + * + * @return the x + */ + protected int getX() { + return x; + } + + /** + * Gets the x labels rotate space. + * + * @return the x labels rotate space + */ + protected int getXTicksSpace() { + return xTicksSpace; + } + + /** + * Gets the x tick offset. + * + * @return the x tick offset + */ + protected double getxTickOffset() { + return xTicksOffset; + } + + /** + * Gets the y. + * + * @return the y + */ + protected int getY() { + return y; + } + + /** + * Gets the y labels rotate space. + * + * @return the y labels rotate space + */ + protected int getYTicksSpace() { + return yTicksSpace; + } + + /** + * Gets the y tick offset. + * + * @return the y tick offset + */ + protected double getyTickOffset() { + return yTicksOffset; + } + + /** + * Checks if is draw x labels. + * + * @return true, if is draw x labels + */ + protected boolean isDrawXTicks() { + return drawXTicks; + } + + /** + * Checks if is draw y labels. + * + * @return true, if is draw y labels + */ + protected boolean isDrawYTicks() { + return drawYTicks; + } + + /** + * Checks if is x labels rotate. + * + * @return true, if is x labels rotate + */ + protected boolean isXTicksRotate() { + return rotateXTicks; + } + + /** + * Checks if is y labels rotate. + * + * @return true, if is y labels rotate + */ + protected boolean isYTicksRotate() { + return rotateYTicks; + } +} diff --git a/src/main/de/linearbits/jhc/Renderer.java b/src/main/de/linearbits/jhc/Renderer.java new file mode 100644 index 0000000..e797361 --- /dev/null +++ b/src/main/de/linearbits/jhc/Renderer.java @@ -0,0 +1,206 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +import java.util.Iterator; + +import de.linearbits.jhc.JHCHeatmap.Point; + +/** + * This class controls the asynchronous rendering process + * + * @author Fabian Prasser + * + * @param the generic type + */ +abstract class Renderer { + + /** Resize delay */ + public static final int WAKEUP_DELAY = 100; + + /** Resize delay */ + public static final int RENDERING_DELAY = 500; + + /** + * A job to be run by the renderer + * @author Fabian Prasser + * + */ + private class Job { + + /** Timestamp*/ + public final long timestamp = System.currentTimeMillis(); + /** Data*/ + public final JHCData data; + /** Config*/ + public final JHCConfiguration config; + + /** + * Creates a new instance + * + * @param data + * @param config + */ + public Job(JHCData data, JHCConfiguration config) { + this.data = data; + this.config = config; + } + } + + /** The canvas. */ + private Canvas canvas; + + /** The jhc. */ + private _JHC jhc; + + /** The next job */ + private Job next = null; + + /** + * Adds a new job + * @param data + * @param config + */ + private void addJob(JHCData data, JHCConfiguration config){ + synchronized(this) { + this.next = new Job(data, config); + } + } + + /** + * Returns the current job, if any + * @return + */ + private Job getJob(){ + synchronized(this) { + if (this.next != null && System.currentTimeMillis() - this.next.timestamp >= RENDERING_DELAY) { + Job result = this.next; + this.next = null; + return result; + } else { + return null; + } + } + } + + /** + * Processes the given job + * @param job + */ + private void processJob(Job job){ + + if (job.data == null) { + jhc.setHeatmap(RenderedHeatmap.NO_DATA); + return; + } + + RenderedLayout layout = job.config.getLayout().getRenderedLayout(job.config, canvas, job.data); + + if (layout.getHeatWidth() == 0 || layout.getHeatHeight() == 0) { + jhc.setHeatmap(RenderedHeatmap.TOO_SMALL); + return; + } + + JHCHeatmap heat = job.data.getHeatmap(layout.getHeatWidth(), layout.getHeatHeight()); + Pixels pixels = getPixels(heat, job.config); + double max = heat.getMax(); + double min = heat.getMin(); + + Iterator iter = heat.iterator(); + while (iter.hasNext()) { + Point point = iter.next(); + int color = getColor(job.config, point.getValue(), min, max); + int x = point.getX(); + int y = point.getY(); + if (x<0 || y<0 || x>=heat.getWidth() || y>=heat.getHeight()) { + throw new IllegalStateException("Point coordinates ("+x+", "+y+") out of range ("+heat.getWidth()+", "+heat.getHeight()+")"); + } + pixels.set(point.getX(), point.getY(), color); + } + + pixels.update(); + + RenderedHeatmap rendered = new RenderedHeatmap(pixels.getImage(), heat, job.config); + jhc.setHeatmap(rendered); + } + + /** + * Instantiates a new renderer. + * + * @param jhc the jhc + * @param canvas the canvas + */ + protected Renderer(_JHC jhc, Canvas canvas) { + + // Init + this.jhc = jhc; + this.canvas = canvas; + + // Create rendering thread + Runnable r = new Runnable() { + public void run(){ + while (true) { + try { + Thread.sleep(WAKEUP_DELAY); + } catch (InterruptedException e) { + /** Ignore*/ + } + Job job = getJob(); + if (job != null) { + processJob(job); + } + } + } + }; + Thread t = new Thread(r); + t.setDaemon(true); + t.start(); + } + + /** + * Render. + * + * @param data the data + * @param config the config + */ + protected void render(JHCData data, JHCConfiguration config) { + this.addJob(data, config); + } + + /** + * Gets the color. + * + * @param config the config + * @param value the value + * @param max the max + * @return the color + */ + protected int getColor(JHCConfiguration config, double value, double min, double max) { + int index = (int) Math.round((value - min) / (max - min) * (config.getGradient().getSteps() - 1)); + return config.getGradient().getColor(index); + } + + /** + * Gets the pixels. + * + * @param heat the heat + * @param config the config + * @return the pixels + */ + protected abstract Pixels getPixels(JHCHeatmap heat, JHCConfiguration config); +} diff --git a/src/main/de/linearbits/jhc/ToolTip.java b/src/main/de/linearbits/jhc/ToolTip.java new file mode 100644 index 0000000..a028357 --- /dev/null +++ b/src/main/de/linearbits/jhc/ToolTip.java @@ -0,0 +1,69 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +/** + * This class provides helper methods for displaying tooltips + * + * @author Fabian Prasser + */ +class ToolTip { + + /** + * Gets the tool tip. + * + * @param heatmap the heatmap + * @param painter the painter + * @param x the x + * @param y the y + * @return the tool tip + */ + public static String getToolTip(RenderedHeatmap heatmap, Painter painter, int sx, int sy, boolean html) { + Rectangle heatmapPosition = painter.getHeatmapPosition(); + if (heatmapPosition != null) { + int x = sx - heatmapPosition.x; + int y = heatmapPosition.height - (sy - heatmapPosition.y); + if (x >= 0 && y >= 0 && x < heatmapPosition.width && y < heatmapPosition.height) { + int dX = (int) ((double) x / (double) heatmapPosition.width * heatmap.getWidth()); + int dY = (int) ((double) y / (double) heatmapPosition.height * heatmap.getHeight()); + StringBuilder b = new StringBuilder(); + if (html) b.append(""); + b.append("x=").append(heatmap.getXLabel(dX)); + if (html) b.append("
"); + else b.append("\n"); + b.append("y=").append(heatmap.getYLabel(dY)); + if (html) b.append(""); + return b.toString(); + } + } + Rectangle legendPosition = painter.getLegendPosition(); + if (legendPosition != null) { + int x = sx - legendPosition.x; + int y = legendPosition.height - (sy - legendPosition.y); + if (x >= 0 && y >= 0 && x < legendPosition.width && y < legendPosition.height) { + double dY = ((double) y / (double) legendPosition.height) * (heatmap.getMax() - heatmap.getMin()) + heatmap.getMin(); + StringBuilder b = new StringBuilder(); + if (html) b.append(""); + b.append(dY); + if (html) b.append(""); + return b.toString(); + } + } + return null; + } +} diff --git a/src/swing/de/linearbits/examples/ExamplesSwing.java b/src/swing/de/linearbits/examples/ExamplesSwing.java new file mode 100644 index 0000000..1ed4f89 --- /dev/null +++ b/src/swing/de/linearbits/examples/ExamplesSwing.java @@ -0,0 +1,45 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.examples; + +import de.linearbits.examples.ExampleData; +import de.linearbits.examples.Examples; + +/** + * This class implements examples for swing + * + * @author Fabian Prasser + */ +class ExamplesSwing extends ExampleData { + + /** + * The main method. + * + * @param args the arguments + */ + public static void main(String[] args) { + + Examples.example1(new WindowSwing()); + Examples.example2(new WindowSwing()); + Examples.example3(new WindowSwing()); + Examples.example4(new WindowSwing()); + Examples.example5(new WindowSwing()); + Examples.example6(new WindowSwing()); + Examples.example7(new WindowSwing()); + } +} diff --git a/src/swing/de/linearbits/examples/WindowSwing.java b/src/swing/de/linearbits/examples/WindowSwing.java new file mode 100644 index 0000000..a713a5d --- /dev/null +++ b/src/swing/de/linearbits/examples/WindowSwing.java @@ -0,0 +1,66 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.examples; + +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Font; + +import javax.swing.JFrame; + +import de.linearbits.jhc.JHC; +import de.linearbits.jhc.JHCConfiguration; +import de.linearbits.jhc.JHCData; + +/** + * This class implements a window for Swing + * + * @author Fabian Prasser + */ +class WindowSwing extends JFrame implements Window { + + /** The Constant serialVersionUID. */ + private static final long serialVersionUID = -6498074114197249215L; + + /** The panel. */ + private JHC panel; + + /** + * Instantiates a new window swing. + */ + protected WindowSwing() { + + this.setTitle("Swing"); + this.setSize(200, 200); + this.setLayout(new BorderLayout()); + this.panel = new JHC(); + this.add(panel, BorderLayout.CENTER); + this.panel.setFont(this.panel.getFont().deriveFont(12f)); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.examples.Window#open(de.linearbits.jhc.Data, de.linearbits.jhc.Configuration) + */ + @Override + public void open(JHCData data, JHCConfiguration config) { + panel.setData(data, config); + this.setVisible(true); + } +} diff --git a/src/swing/de/linearbits/jhc/CanvasSwing.java b/src/swing/de/linearbits/jhc/CanvasSwing.java new file mode 100644 index 0000000..831bbd0 --- /dev/null +++ b/src/swing/de/linearbits/jhc/CanvasSwing.java @@ -0,0 +1,170 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +import java.awt.Color; +import java.awt.Font; +import java.awt.FontMetrics; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Image; +import java.awt.event.ComponentAdapter; +import java.awt.event.ComponentEvent; +import java.awt.event.MouseMotionAdapter; + +import javax.swing.JComponent; + +/** + * This class implements a canvas for swing + * + * @author Fabian Prasser + */ +class CanvasSwing extends JComponent implements Canvas { + + /** The Constant serialVersionUID. */ + private static final long serialVersionUID = -3788402111642606157L; + + /** The black. */ + private Color black; + + /** The gray. */ + private Color gray; + + /** The heatmap. */ + private RenderedHeatmap heatmap = null; + + /** The listener. */ + private CanvasListener listener = null; + + /** The painter. */ + private final Painter painter = new Painter(this); + + /** The text extents. */ + private Dimension textExtents = null; + + /** + * Creates a new instance + */ + protected CanvasSwing() { + + this.black = new Color(0, 0, 0); + this.gray = new Color(128, 128, 128); + + this.addComponentListener(new ComponentAdapter() { + + @Override + public void componentResized(ComponentEvent e) { + if (listener != null) listener.resized(); + } + + @Override + public void componentShown(ComponentEvent e) { + if (listener != null) listener.shown(); + } + }); + + this.addMouseMotionListener(new MouseMotionAdapter() { + + @Override + public void mouseMoved(java.awt.event.MouseEvent e) { + if (heatmap != null && painter != null) { + String text = ToolTip.getToolTip(heatmap, painter, e.getX(), e.getY(), true); + CanvasSwing.this.setToolTipText(text); + } else { + CanvasSwing.this.setToolTipText(null); + } + } + }); + + this.setDoubleBuffered(true); + } + + @Override + public Color getBlack() { + return black; + } + + @Override + public Dimension getCanvasSize() { + return new Dimension(getWidth(), getHeight()); + } + + @Override + public Dimension getExtents() { + if (textExtents == null) { + textExtents = getTextExtents(); + } + return textExtents; + } + + @Override + public Color getGray() { + return gray; + } + + @Override + public void setFont(Font font) { + super.setFont(font); + textExtents = getTextExtents(); + if (listener != null) listener.resized(); + } + + @Override + public void setForeground(Color fg) { + super.setForeground(fg); + if (listener != null) listener.resized(); + } + + @Override + public void setBackground(Color bg) { + super.setBackground(bg); + if (listener != null) listener.resized(); + } + + @SuppressWarnings("unchecked") + @Override + public void setHeatmap(RenderedHeatmap heatmap) { + this.heatmap = (RenderedHeatmap)heatmap; + this.repaint(); + } + + @Override + public void setListener(CanvasListener listener) { + this.listener = listener; + } + + /** + * Gets the text extents. + * + * @return the text extents + */ + private Dimension getTextExtents() { + FontMetrics metrics = this.getFontMetrics(this.getFont()); + int height = metrics.getHeight(); + int width = 2 * metrics.stringWidth(de.linearbits.jhc.Graphics.POSTFIX); + return new Dimension(width, height); + } + + @Override + protected void paintComponent(Graphics g) { + if (painter != null) { + GraphicsJava2D graphics = new GraphicsJava2D(this, (Graphics2D) g); + painter.paint(graphics, heatmap, this.getCanvasSize()); + } + } +} diff --git a/src/swing/de/linearbits/jhc/JHC.java b/src/swing/de/linearbits/jhc/JHC.java new file mode 100644 index 0000000..f2d1be3 --- /dev/null +++ b/src/swing/de/linearbits/jhc/JHC.java @@ -0,0 +1,66 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Font; + +import javax.swing.JComponent; + +/** + * This class provides a heatmap control for Swing + * @author Fabian Prasser + */ +public class JHC extends JComponent { + + /** SUID */ + private static final long serialVersionUID = -2953032744074537804L; + + /** The real widget*/ + private _JHC jhc = new _JHC(); + + /** Creates a new instance*/ + public JHC(){ + this.setLayout(new BorderLayout()); + this.add(jhc, BorderLayout.CENTER); + } + + /** + * Updates the data displayed by this control + * @param data + * @param config + */ + public void setData(JHCData data, JHCConfiguration config) { + jhc.setData(data, config); + } + + /** + * Sets the font + */ + public void setFont(Font font) { + jhc.setFont(font); + } + + /** + * Sets the background color + */ + public void setBackground(Color bg) { + jhc.setBackground(bg); + } +} diff --git a/src/swing/de/linearbits/jhc/_JHC.java b/src/swing/de/linearbits/jhc/_JHC.java new file mode 100644 index 0000000..453e686 --- /dev/null +++ b/src/swing/de/linearbits/jhc/_JHC.java @@ -0,0 +1,80 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +import java.awt.Image; + +/** + * This class implements JHC for Swing + * + * @author Fabian Prasser + */ +class _JHC extends CanvasSwing { + + /** The Constant serialVersionUID. */ + private static final long serialVersionUID = 6100042540949178860L; + + /** The config. */ + private volatile JHCConfiguration config = null; + + /** The data. */ + private volatile JHCData data = null; + + /** The renderer. */ + private volatile Renderer renderer = new RendererJava2D(this, this); + + /** + * Creates a new instance + */ + protected _JHC() { + super.setListener(new CanvasListener(){ + @Override + public void resized() { + _JHC.this.resized(); + } + + @Override + public void shown() { + _JHC.this.shown(); + } + }); + } + + /* + * @see de.linearbits.jhc.CanvasListener#resized() + */ + private void resized() { + this.renderer.render(data, config); + } + + /* + * @see de.linearbits.jhc.CanvasListener#shown() + */ + private void shown() { + this.renderer.render(data, config); + } + + /** + * Sets the data to be rendered + */ + protected void setData(JHCData data, JHCConfiguration config) { + this.data = data; + this.config = config; + this.renderer.render(data, config); + } +} diff --git a/src/swing/de/linearbits/jhc/package-info.java b/src/swing/de/linearbits/jhc/package-info.java new file mode 100644 index 0000000..d2b01a9 --- /dev/null +++ b/src/swing/de/linearbits/jhc/package-info.java @@ -0,0 +1,24 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * This package provides a heatmap control for Swing + * + * @author Fabian Prasser + */ +package de.linearbits.jhc; \ No newline at end of file diff --git a/src/swt/de/linearbits/examples/ExamplesSWT.java b/src/swt/de/linearbits/examples/ExamplesSWT.java new file mode 100644 index 0000000..2ad9839 --- /dev/null +++ b/src/swt/de/linearbits/examples/ExamplesSWT.java @@ -0,0 +1,42 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.examples; + +/** + * This class implements examples for SWT + * + * @author Fabian Prasser + */ +class ExamplesSWT extends ExampleData { + + /** + * The main method. + * + * @param args the arguments + */ + public static void main(String[] args) { + + Examples.example1(new WindowSWT()); + Examples.example2(new WindowSWT()); + Examples.example3(new WindowSWT()); + Examples.example4(new WindowSWT()); + Examples.example5(new WindowSWT()); + Examples.example6(new WindowSWT()); + Examples.example7(new WindowSWT()); + } +} diff --git a/src/swt/de/linearbits/examples/WindowSWT.java b/src/swt/de/linearbits/examples/WindowSWT.java new file mode 100644 index 0000000..35ef23a --- /dev/null +++ b/src/swt/de/linearbits/examples/WindowSWT.java @@ -0,0 +1,82 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.examples; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.Font; +import org.eclipse.swt.graphics.FontData; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Shell; + +import de.linearbits.jhc.JHC; +import de.linearbits.jhc.JHCConfiguration; +import de.linearbits.jhc.JHCData; + +/** + * This class implements a window for SWT + * + * @author Fabian Prasser + */ +class WindowSWT implements Window { + + /** The display. */ + private Display display; + + /** The panel. */ + private JHC jhc; + + /** The shell. */ + private Shell shell; + + @Override + public void open(JHCData data, JHCConfiguration config) { + + this.display = new Display(); + this.shell = new Shell(display); + shell.setText("SWT"); + shell.setSize(200, 200); + + GridLayout gridLayout = new GridLayout(); + gridLayout.numColumns = 1; + shell.setLayout(gridLayout); + + jhc = new JHC(shell, SWT.NONE); + GridData gridData = new GridData(); + gridData.grabExcessVerticalSpace = true; + gridData.grabExcessHorizontalSpace = true; + gridData.horizontalAlignment = SWT.FILL; + gridData.verticalAlignment = SWT.FILL; + jhc.setLayoutData(gridData); + jhc.setData(data, config); + + // Update some settings + FontData[] fd = jhc.getFont().getFontData(); + fd[0].setHeight(8); + jhc.setFont(new Font(Display.getCurrent(), fd[0])); + + // Enter event loop + shell.open(); + while (!shell.isDisposed()) { + if (!display.readAndDispatch()) display.sleep(); + } + display.dispose(); + } +} diff --git a/src/swt/de/linearbits/jhc/CanvasSWT.java b/src/swt/de/linearbits/jhc/CanvasSWT.java new file mode 100644 index 0000000..4957fd0 --- /dev/null +++ b/src/swt/de/linearbits/jhc/CanvasSWT.java @@ -0,0 +1,217 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.ControlAdapter; +import org.eclipse.swt.events.ControlEvent; +import org.eclipse.swt.events.DisposeEvent; +import org.eclipse.swt.events.DisposeListener; +import org.eclipse.swt.events.MouseEvent; +import org.eclipse.swt.events.MouseMoveListener; +import org.eclipse.swt.events.PaintEvent; +import org.eclipse.swt.events.PaintListener; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.Font; +import org.eclipse.swt.graphics.GC; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.widgets.Composite; + +/** + * This class implements a canvas for SWT + * + * @author Fabian Prasser + */ +class CanvasSWT extends org.eclipse.swt.widgets.Canvas implements Canvas { + + /** The Constant SHOWN_DELAY. */ + private static final int SHOWN_DELAY = 200; + + /** The black. */ + private Color black; + + /** The gray. */ + private Color gray; + + /** The heatmap. */ + private RenderedHeatmap heatmap = null; + + /** The listener. */ + private CanvasListener listener = null; + + /** The painter. */ + private final Painter painter; + + /** The size. */ + private Point size = null; + + /** The text extents. */ + private Dimension textExtents = null; + + /** + * Creates a new instance + * + * @param parent the parent + * @param style the style + */ + protected CanvasSWT(Composite parent, int style) { + + super(parent, style | SWT.DOUBLE_BUFFERED); + + this.black = new Color(getDisplay(), 0, 0, 0); + this.gray = new Color(getDisplay(), 128, 128, 128); + + this.textExtents = getTextExtents(); + + this.setCanvasSize(getSize()); + this.painter = new PainterSWT(this); + this.addDisposeListener(new DisposeListener() { + @Override + public void widgetDisposed(DisposeEvent arg0) { + painter.dispose(); + black.dispose(); + gray.dispose(); + } + }); + + this.addControlListener(new ControlAdapter() { + @Override + public void controlResized(ControlEvent arg0) { + setCanvasSize(getSize()); + if (listener != null) listener.resized(); + } + }); + + // Simulate shown event + this.addPaintListener(new PaintListener() { + @Override + public void paintControl(PaintEvent arg0) { + removePaintListener(this); + getDisplay().timerExec(SHOWN_DELAY, new Runnable() { + @Override + public void run() { + if (listener != null) listener.shown(); + } + }); + } + }); + + // Paint the component + this.addPaintListener(new PaintListener() { + @Override + public void paintControl(PaintEvent arg0) { + if (painter != null) { + Dimension size = getCanvasSize(); + GraphicsSWT graphics = new GraphicsSWT(CanvasSWT.this, arg0.gc); + painter.paint(graphics, heatmap, size); + } + } + }); + + this.addMouseMoveListener(new MouseMoveListener() { + @Override + public void mouseMove(MouseEvent arg0) { + if (heatmap != null && painter != null) { + String text = ToolTip.getToolTip(heatmap, painter, arg0.x, arg0.y, false); + CanvasSWT.this.setToolTipText(text); + } else { + CanvasSWT.this.setToolTipText(null); + } + } + }); + } + + @Override + public Color getBlack() { + return black; + } + + @Override + public Dimension getCanvasSize() { + return new Dimension(size.x, size.y); + } + + @Override + public Dimension getExtents() { + return this.textExtents; + } + + @Override + public Color getGray() { + return gray; + } + + @Override + public void setFont(Font arg0) { + super.setFont(arg0); + textExtents = getTextExtents(); + if (listener != null) listener.resized(); + } + + @Override + public void setForeground(Color fg) { + super.setForeground(fg); + if (listener != null) listener.resized(); + } + + @Override + public void setBackground(Color bg) { + super.setBackground(bg); + if (listener != null) listener.resized(); + } + + @SuppressWarnings("unchecked") + @Override + public void setHeatmap(RenderedHeatmap heatmap) { + this.heatmap = (RenderedHeatmap)heatmap; + if (this.isDisposed()) return; + getDisplay().asyncExec(new Runnable() { + @Override + public void run() { + if (!CanvasSWT.this.isDisposed()) redraw(); + } + }); + } + + @Override + public void setListener(CanvasListener listener) { + this.listener = listener; + } + + /** + * Gets the text extents. + * + * @return the text extents + */ + private Dimension getTextExtents() { + GC gc = new GC(this); + int width = 2 * gc.textExtent(Graphics.POSTFIX).x; + int height = gc.textExtent(Graphics.POSTFIX).y; + return new Dimension(width, height); + } + + /** + * Sets the canvas size. + * + * @param size the new canvas size + */ + private void setCanvasSize(Point size) { + this.size = size; + } +} diff --git a/src/swt/de/linearbits/jhc/GraphicsSWT.java b/src/swt/de/linearbits/jhc/GraphicsSWT.java new file mode 100644 index 0000000..7bea0ec --- /dev/null +++ b/src/swt/de/linearbits/jhc/GraphicsSWT.java @@ -0,0 +1,335 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.GC; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.graphics.Transform; + +/** + * This class implements graphics operations for SWT + * + * @author Fabian Prasser + */ +class GraphicsSWT implements Graphics { + + /** The antialias. */ + private int antialias; + + /** The canvas. */ + private CanvasSWT canvas; + + /** The gc. */ + private GC gc; + + /** The interpolation. */ + private int interpolation; + + /** + * Creates a new instance + * + * @param canvas the canvas + * @param gc the gc + */ + protected GraphicsSWT(CanvasSWT canvas, GC gc) { + this.canvas = canvas; + this.gc = gc; + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#disableAntialiasing() + */ + @Override + public void disableAntialiasing() { + gc.setAntialias(SWT.OFF); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#disableInterpolation() + */ + @Override + public void disableInterpolation() { + gc.setInterpolation(SWT.NONE); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#drawImage(java.lang.Object, int, int, int, int) + */ + @Override + public void drawImage(Image image, int x, int y, int width, int height) { + org.eclipse.swt.graphics.Rectangle bounds = image.getBounds(); + gc.drawImage(image, 0, 0, bounds.width, bounds.height, x, y, width, height); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#drawLegend(de.linearbits.jhc.Gradient) + */ + @Override + public Image drawLegend(JHCGradient gradient) { + PixelsSWT pixels = new PixelsSWT(new Dimension(1, gradient.getSteps()), canvas.getDisplay(), gradient.getColor(0)); + for (int i = 0; i < gradient.getSteps(); i++) { + pixels.set(0, i, gradient.getColor(i)); + } + pixels.update(); + return pixels.getImage(); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#drawLine(int, int, int, int) + */ + @Override + public void drawLine(int x1, int y1, int x2, int y2) { + gc.drawLine(x1, y1, x2, y2); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#drawRectangle(int, int, int, int) + */ + @Override + public void drawRectangle(int x, int y, int width, int height) { + gc.drawRectangle(x, y, width, height); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#drawRectangleFilled(int, int, int, int) + */ + @Override + public void drawRectangleFilled(int x, int y, int width, int height) { + gc.fillRectangle(x, y, width, height); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#drawStringAboveHorizontallyCentered(java.lang.String, int, int, int) + */ + @Override + public void drawStringAboveHorizontallyCentered(String string, int x, int y, int width) { + + Point extent = gc.textExtent(string); + int yy = y - extent.y; + if (width >= extent.x) { + gc.setClipping(x, yy, width, extent.y); + int xx = x + (width - extent.x) / 2; + gc.drawText(string, xx, yy, true); + } else { + int postfixWidth = gc.textExtent(POSTFIX).x; + gc.setClipping(x, yy, width - postfixWidth, extent.y); + gc.drawText(string, x, yy, true); + gc.setClipping(x + width - postfixWidth, yy, postfixWidth, extent.y); + gc.drawText(POSTFIX, x + width - postfixWidth, yy, true); + } + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#drawStringBelowHorizontallyCentered(java.lang.String, int, int, int) + */ + @Override + public void drawStringBelowHorizontallyCentered(String string, int x, int y, int width) { + Point extent = gc.textExtent(string); + int descent = gc.getFontMetrics().getDescent(); + if (width >= extent.x) { + gc.setClipping(x, y + descent, width, extent.y); + int xx = x + (width - extent.x) / 2; + gc.drawText(string, xx, y + descent, true); + } else { + int postfixWidth = gc.textExtent(POSTFIX).x; + gc.setClipping(x, y + descent, width - postfixWidth, extent.y); + gc.drawText(string, x, y + descent, true); + gc.setClipping(x + width - postfixWidth, y + descent, postfixWidth, extent.y); + gc.drawText(POSTFIX, x + width - postfixWidth, y + descent, true); + } + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#drawStringVerticallyCenteredLeftAligned(java.lang.String, int, int, int, int) + */ + @Override + public void drawStringVerticallyCenteredLeftAligned(String string, int x, int y, int width, int height) { + + Point extent = gc.textExtent(string); + int yy = y + height / 2 - extent.y / 2; + + if (width >= extent.x) { + gc.setClipping(x, yy, width, extent.y); + gc.drawText(string, x, yy, true); + } else { + int postfixWidth = gc.textExtent(POSTFIX).x; + gc.setClipping(x, yy, width - postfixWidth, extent.y); + gc.drawText(string, x, yy, true); + gc.setClipping(x + width - postfixWidth, yy, postfixWidth, extent.y); + gc.drawText(POSTFIX, x + width - postfixWidth, yy, true); + } + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#enableAntialiasing() + */ + @Override + public void enableAntialiasing() { + gc.setAntialias(SWT.ON); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#enableInterpolation() + */ + @Override + public void enableInterpolation() { + gc.setInterpolation(SWT.HIGH); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#getTextHeight(java.lang.String) + */ + @Override + public int getTextHeight(String string) { + return gc.textExtent(string).y; + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#getTextWidth(java.lang.String) + */ + @Override + public int getTextWidth(String string) { + return gc.textExtent(string).x; + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#init() + */ + @Override + public void init() { + gc.setFont(canvas.getFont()); + antialias = gc.getAntialias(); + interpolation = gc.getInterpolation(); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#resetAntialiasing() + */ + @Override + public void resetAntialiasing() { + gc.setAntialias(antialias); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#resetClipping() + */ + @Override + public void resetClipping() { + org.eclipse.swt.graphics.Rectangle bounds = canvas.getBounds(); + gc.setClipping(0, 0, bounds.width, bounds.height); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#resetInterpolation() + */ + @Override + public void resetInterpolation() { + gc.setInterpolation(interpolation); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#resetRotation() + */ + @Override + public void resetRotation() { + gc.setTransform(null); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#setBackground(java.lang.Object) + */ + @Override + public void setBackground(Color color) { + gc.setBackground(color); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#setForeground(java.lang.Object) + */ + @Override + public void setForeground(Color color) { + gc.setForeground(color); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Graphics#setRotation(int) + */ + @Override + public void setRotation(int degrees) { + Transform tr = new Transform(canvas.getDisplay()); + tr.rotate(degrees); + gc.setTransform(tr); + } + + @Override + public void drawStringCentered(String string, int x, int y, int width, int height) { + + Point extent = gc.textExtent(string); + int yy = y + (height - extent.y) / 2; + int xx = x + (width - extent.x) / 2; + gc.setClipping(xx, yy, extent.x, extent.y); + gc.drawText(string, xx, yy, true); + } +} diff --git a/src/swt/de/linearbits/jhc/JHC.java b/src/swt/de/linearbits/jhc/JHC.java new file mode 100644 index 0000000..e52eb49 --- /dev/null +++ b/src/swt/de/linearbits/jhc/JHC.java @@ -0,0 +1,102 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.Font; +import org.eclipse.swt.widgets.Composite; + +/** + * This class implements a heatmap widget for SWT + * + * @author Fabian Prasser + */ +public class JHC { + + /** + * Checks the style + * + * @param style + */ + private static int checkStyle(int style) { + return style; + } + + /** The real jhc*/ + private _JHC jhc; + + /** + * Creates a new instance + * + * @param parent the parent + * @param style the style + */ + public JHC(Composite parent, int style) { + this.jhc = new _JHC(parent, checkStyle(style) | SWT.DOUBLE_BUFFERED); + } + + /** + * Returns the background color + * @return + */ + public Color getBackground() { + return jhc.getBackground(); + } + + /** + * Returns the font + * @return + */ + public Font getFont() { + return jhc.getFont(); + } + + /** + * Sets the background color + * @param arg0 + */ + public void setBackground(Color arg0) { + jhc.setBackground(arg0); + } + + /** + * Sets the data to be displayed by this widget + * @param data + * @param config + */ + public void setData(JHCData data, JHCConfiguration config) { + jhc.setData(data, config); + } + + /** + * Sets the font + * @param arg0 + */ + public void setFont(Font arg0) { + jhc.setFont(arg0); + } + + /** + * Sets the layout data + * @param arg0 + */ + public void setLayoutData(Object arg0) { + jhc.setLayoutData(arg0); + } +} diff --git a/src/swt/de/linearbits/jhc/PainterSWT.java b/src/swt/de/linearbits/jhc/PainterSWT.java new file mode 100644 index 0000000..8359dc8 --- /dev/null +++ b/src/swt/de/linearbits/jhc/PainterSWT.java @@ -0,0 +1,53 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +import org.eclipse.swt.graphics.Image; + +/** + * This class implements a painter for SWT. The only difference to the standard painter is that + * the legend is disposed proberly + * + * @author Fabian Prasser + * + * @param + * @param + * @param + */ +class PainterSWT extends Painter { + + /** + * Creates a new instance + * @param canvas + */ + protected PainterSWT(Canvas canvas) { + super(canvas); + } + + @Override + protected void disposeLegend(T legend) { + + if (legend != null) { + if (legend instanceof Image) { + if (!((Image) legend).isDisposed()) { + ((Image) legend).dispose(); + } + } + } + } +} diff --git a/src/swt/de/linearbits/jhc/PixelsSWT.java b/src/swt/de/linearbits/jhc/PixelsSWT.java new file mode 100644 index 0000000..47624bb --- /dev/null +++ b/src/swt/de/linearbits/jhc/PixelsSWT.java @@ -0,0 +1,114 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.ImageData; +import org.eclipse.swt.graphics.PaletteData; +import org.eclipse.swt.widgets.Display; + +/** + * This class implements Pixels for SWT + * + * @author Fabian Prasser + */ +class PixelsSWT implements Pixels { + + /** The buffer. */ + private byte[] buffer; + + /** The display. */ + private final Display display; + + /** The image. */ + private Image image; + + /** The size. */ + private final Dimension size; + + /** The source. */ + private ImageData source; + + /** + * Creates a new instance + * + * @param size the size + * @param display the display + * @param initialColor the initial color + */ + protected PixelsSWT(Dimension size, Display display, int initialColor) { + + // Init + this.size = size; + this.display = display; + + // Create buffer + this.buffer = new byte[size.height * size.width * 4]; + this.source = new ImageData(size.width, size.height, 32, new PaletteData(0x00ff0000, 0x0000ff00, 0x000000ff), 1, buffer); + + // TODO: Potentially inefficient + if (initialColor != 0) { + for (int y = 0; y < size.height; y++) { + for (int x = 0; x < size.width; x++) { + set(x, y, initialColor); + } + } + } + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Pixels#getImage() + */ + @Override + public Image getImage() { + return image; + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Pixels#getSize() + */ + @Override + public Dimension getSize() { + return size; + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Pixels#set(int, int, int) + */ + @Override + public void set(int x, int y, int val) { + source.setPixel(x, size.height - 1 - y, val); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Pixels#update() + */ + @Override + public void update() { + if (this.image != null) this.image.dispose(); + this.image = new Image(display, source); + } +} diff --git a/src/swt/de/linearbits/jhc/RendererSWT.java b/src/swt/de/linearbits/jhc/RendererSWT.java new file mode 100644 index 0000000..41bfb8f --- /dev/null +++ b/src/swt/de/linearbits/jhc/RendererSWT.java @@ -0,0 +1,57 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.Font; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Display; + + +/** + * This class implements a renderer for SWT + * + * @author Fabian Prasser + */ +class RendererSWT extends Renderer { + + /** The display. */ + private final Display display; + + /** + * Creates a new instance + * + * @param jhc the jhc + * @param canvas the canvas + */ + protected RendererSWT(_JHC jhc, Canvas canvas) { + super(jhc, canvas); + this.display = jhc.getDisplay(); + } + + /* + * (non-Javadoc) + * + * @see de.linearbits.jhc.Renderer#getPixels(de.linearbits.jhc.Heat, de.linearbits.jhc.Configuration) + */ + @Override + protected Pixels getPixels(JHCHeatmap heat, JHCConfiguration config) { + int initialColor = config.getGradient().getColor(0); + return new PixelsSWT(new Dimension(heat.getWidth(), heat.getHeight()), display, initialColor); + } +} diff --git a/src/swt/de/linearbits/jhc/_JHC.java b/src/swt/de/linearbits/jhc/_JHC.java new file mode 100644 index 0000000..b9cb224 --- /dev/null +++ b/src/swt/de/linearbits/jhc/_JHC.java @@ -0,0 +1,87 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.linearbits.jhc; + +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Composite; + +/** + * This class implements JHC for SWT + * + * @author Fabian Prasser + */ +class _JHC extends CanvasSWT { + + /** Resize delay */ + public static final int RESIZE_DELAY = 500; + + /** The config. */ + private volatile JHCConfiguration config = null; + + /** The data. */ + private volatile JHCData data = null; + + /** The renderer. */ + private volatile Renderer renderer = new RendererSWT(this, this); + + + /** + * Creates a new instance + * + * @param parent the parent + * @param style the style + */ + _JHC(Composite parent, int style) { + super(parent, style); + super.setListener(new CanvasListener(){ + @Override + public void resized() { + _JHC.this.resized(); + } + + @Override + public void shown() { + _JHC.this.shown(); + } + }); + } + + /* + * @see de.linearbits.jhc.CanvasListener#resized() + */ + private void resized() { + this.renderer.render(data, config); + } + + /* + * @see de.linearbits.jhc.CanvasListener#shown() + */ + private void shown() { + this.renderer.render(data, config); + } + + /** + * Sets new data to render + */ + protected void setData(JHCData data, JHCConfiguration config) { + checkWidget(); + this.data = data; + this.config = config; + this.renderer.render(data, config); + } +} diff --git a/src/swt/de/linearbits/jhc/package-info.java b/src/swt/de/linearbits/jhc/package-info.java new file mode 100644 index 0000000..3ddefdd --- /dev/null +++ b/src/swt/de/linearbits/jhc/package-info.java @@ -0,0 +1,24 @@ +/* + * JHC - Java Heatmap Control + * Copyright (C) 2014 Fabian Prasser + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * This package provides a heatmap widget for SWT + * + * @author Fabian Prasser + */ +package de.linearbits.jhc; \ No newline at end of file