├── .gitignore ├── CHANGELOG.md ├── LICENSE.txt ├── README.md ├── doc └── name_conventions.txt ├── example ├── canvas │ ├── canvas.css │ ├── canvas.html │ └── canvas_example.dart ├── grid │ ├── grid.html │ └── grid_example.dart ├── hello │ ├── frame_test.html │ ├── hello.css │ ├── hello.html │ ├── ie.css │ ├── img │ │ ├── ajax-loader.gif │ │ ├── circles.png │ │ ├── circles_ie6.png │ │ ├── lights.png │ │ └── test.jpg │ ├── props │ │ └── LocalizableResource │ │ │ ├── ar.json │ │ │ ├── en.json │ │ │ ├── fr.json │ │ │ └── zh.json │ └── src │ │ └── hello.dart ├── history │ ├── history.css │ ├── history.dart │ ├── history.html │ └── img │ │ └── ajax-loader.gif ├── panels │ ├── img │ │ └── ajax-loader.gif │ ├── panels.css │ ├── panels.dart │ └── panels.html ├── tree │ ├── tree.html │ └── tree_example.dart ├── uibinder │ ├── img │ │ └── ajax-loader.gif │ ├── login_view.dart │ ├── uibinder.css │ ├── uibinder.dart │ └── uibinder.html └── validation │ ├── img │ └── ajax-loader.gif │ ├── validation.css │ ├── validation.dart │ └── validation.html ├── lib ├── activity.dart ├── animation.dart ├── core.dart ├── data.dart ├── editor.dart ├── event.dart ├── http.dart ├── i18n.dart ├── layout.dart ├── place.dart ├── resource.dart ├── resource │ ├── chrome │ │ ├── chrome.css │ │ ├── chrome_rtl.css │ │ └── images │ │ │ ├── corner.png │ │ │ ├── corner_ie6.png │ │ │ ├── hborder.png │ │ │ ├── hborder_ie6.png │ │ │ ├── ie6 │ │ │ ├── corner_dialog_topleft.png │ │ │ ├── corner_dialog_topright.png │ │ │ ├── hborder_blue_shadow.png │ │ │ ├── hborder_gray_shadow.png │ │ │ ├── vborder_blue_shadow.png │ │ │ └── vborder_gray_shadow.png │ │ │ ├── splitPanelThumb.png │ │ │ ├── vborder.png │ │ │ └── vborder_ie6.png │ ├── clean │ │ ├── clean.css │ │ ├── clean_rtl.css │ │ └── images │ │ │ ├── circles.png │ │ │ ├── circles_ie6.png │ │ │ ├── clear.gif │ │ │ ├── corner.png │ │ │ ├── corner_ie6.png │ │ │ ├── hborder.png │ │ │ ├── hborder_ie6.png │ │ │ ├── thumb_horz.png │ │ │ ├── thumb_vertical.png │ │ │ ├── vborder.png │ │ │ └── vborder_ie6.png │ ├── dark │ │ ├── dark.css │ │ ├── dark_rtl.css │ │ └── images │ │ │ ├── corner.png │ │ │ ├── corner_ie6.png │ │ │ ├── hborder.png │ │ │ ├── hborder_ie6.png │ │ │ ├── ie6 │ │ │ ├── corner_dialog_topleft.png │ │ │ ├── corner_dialog_topright.png │ │ │ ├── hborder_blue_shadow.png │ │ │ ├── hborder_gray_shadow.png │ │ │ ├── vborder_blue_shadow.png │ │ │ └── vborder_gray_shadow.png │ │ │ ├── splitPanelThumb.png │ │ │ ├── vborder.png │ │ │ └── vborder_ie6.png │ ├── images │ │ ├── clear.gif │ │ ├── disclosurePanelClosed.png │ │ ├── disclosurePanelClosed_rtl.png │ │ ├── disclosurePanelOpen.png │ │ ├── menuBarSubMenuIcon.gif │ │ ├── menuBarSubMenuIcon_rtl.gif │ │ ├── splitPanelThumb.png │ │ ├── treeClosed.gif │ │ ├── treeLeaf.gif │ │ └── treeOpen.gif │ └── standard │ │ ├── images │ │ ├── corner.png │ │ ├── corner_ie6.png │ │ ├── hborder.png │ │ ├── hborder_ie6.png │ │ ├── ie6 │ │ │ ├── corner_dialog_topleft.png │ │ │ ├── corner_dialog_topright.png │ │ │ ├── hborder_blue_shadow.png │ │ │ ├── hborder_gray_shadow.png │ │ │ ├── vborder_blue_shadow.png │ │ │ └── vborder_gray_shadow.png │ │ ├── splitPanelThumb.png │ │ ├── vborder.png │ │ └── vborder_ie6.png │ │ ├── standard.css │ │ └── standard_rtl.css ├── role.dart ├── scheduler.dart ├── src │ ├── activity │ │ ├── abstract_activity.dart │ │ ├── activity.dart │ │ ├── activity_manager.dart │ │ ├── activity_mapper.dart │ │ ├── caching_activity_mapper.dart │ │ └── filtered_activity_mapper.dart │ ├── animation │ │ ├── animated_layout.dart │ │ ├── animation.dart │ │ ├── animation_scheduler.dart │ │ └── impl │ │ │ ├── animation_scheduler_impl.dart │ │ │ ├── animation_scheduler_impl_timer.dart │ │ │ └── animation_scheduler_impl_webkit.dart │ ├── core │ │ ├── dwt.dart │ │ └── impl.dart │ ├── data │ │ ├── provides_key.dart │ │ └── simple_key_provider.dart │ ├── editor │ │ ├── editor.dart │ │ ├── editor_delegate.dart │ │ ├── has_editor_delegate.dart │ │ ├── is_editor.dart │ │ └── leaf_value_editor.dart │ ├── event │ │ ├── adapter │ │ │ ├── all_mouse_handlers_adapter.dart │ │ │ ├── attach_event_handler_adapter.dart │ │ │ ├── before_selection_handler_adapter.dart │ │ │ ├── blur_handler_adapter.dart │ │ │ ├── change_handler_adapter.dart │ │ │ ├── click_handler_adapter.dart │ │ │ ├── close_handler_adapter.dart │ │ │ ├── closing_handler_adapter.dart │ │ │ ├── double_click_handler_adapter.dart │ │ │ ├── drag_end_handler_adapter.dart │ │ │ ├── drag_enter_handler_adapter.dart │ │ │ ├── drag_handler_adapter.dart │ │ │ ├── drag_leave_handler_adapter.dart │ │ │ ├── drag_over_handler_adapter.dart │ │ │ ├── drag_start_handler_adapter.dart │ │ │ ├── drop_handler_adapter.dart │ │ │ ├── error_handler_adapter.dart │ │ │ ├── focus_handler_adapter.dart │ │ │ ├── gesture_change_handler_adapter.dart │ │ │ ├── gesture_end_handler_adapter.dart │ │ │ ├── gesture_start_handler_adapter.dart │ │ │ ├── key_down_handler_adapter.dart │ │ │ ├── key_press_handler_adapter.dart │ │ │ ├── key_up_handler_adapter.dart │ │ │ ├── load_handler_adapter.dart │ │ │ ├── mouse_down_handler_adapter.dart │ │ │ ├── mouse_move_handler_adapter.dart │ │ │ ├── mouse_out_handler_adapter.dart │ │ │ ├── mouse_over_handler_adapter.dart │ │ │ ├── mouse_up_handler_adapter.dart │ │ │ ├── mouse_wheel_handler_adapter.dart │ │ │ ├── native_preview_handler_adapter.dart │ │ │ ├── open_handler_adapter.dart │ │ │ ├── scroll_handler_adapter.dart │ │ │ ├── selection_handler_adapter.dart │ │ │ ├── touch_cancel_handler_adapter.dart │ │ │ ├── touch_end_handler_adapter.dart │ │ │ ├── touch_move_handler_adapter.dart │ │ │ ├── touch_start_handler_adapter.dart │ │ │ └── value_change_handler_adapter.dart │ │ ├── attach_event.dart │ │ ├── attach_event_handler.dart │ │ ├── before_selection_event.dart │ │ ├── before_selection_handler.dart │ │ ├── blur_event.dart │ │ ├── blur_handler.dart │ │ ├── browser_events.dart │ │ ├── change_event.dart │ │ ├── change_handler.dart │ │ ├── click_event.dart │ │ ├── click_handler.dart │ │ ├── close_event.dart │ │ ├── close_handler.dart │ │ ├── closing_event.dart │ │ ├── closing_handler.dart │ │ ├── command.dart │ │ ├── dom.dart │ │ ├── dom_event.dart │ │ ├── double_click_event.dart │ │ ├── double_click_handler.dart │ │ ├── drag_drop_event_base.dart │ │ ├── drag_end_event.dart │ │ ├── drag_end_handler.dart │ │ ├── drag_enter_event.dart │ │ ├── drag_enter_handler.dart │ │ ├── drag_event.dart │ │ ├── drag_handler.dart │ │ ├── drag_leave_event.dart │ │ ├── drag_leave_handler.dart │ │ ├── drag_over_event.dart │ │ ├── drag_over_handler.dart │ │ ├── drag_start_event.dart │ │ ├── drag_start_handler.dart │ │ ├── drop_event.dart │ │ ├── drop_handler.dart │ │ ├── dwt_event.dart │ │ ├── error_event.dart │ │ ├── error_handler.dart │ │ ├── event.dart │ │ ├── event_bus.dart │ │ ├── event_handler.dart │ │ ├── event_handler_adapter.dart │ │ ├── event_listener.dart │ │ ├── focus_event.dart │ │ ├── focus_handler.dart │ │ ├── focusable.dart │ │ ├── gesture_change_event.dart │ │ ├── gesture_change_handler.dart │ │ ├── gesture_end_event.dart │ │ ├── gesture_end_handler.dart │ │ ├── gesture_start_event.dart │ │ ├── gesture_start_handler.dart │ │ ├── handler_registration.dart │ │ ├── has_all_drag_and_drop_handlers.dart │ │ ├── has_all_focus_handlers.dart │ │ ├── has_all_gesture_handlers.dart │ │ ├── has_all_key_handlers.dart │ │ ├── has_all_mouse_handlers.dart │ │ ├── has_all_touch_handlers.dart │ │ ├── has_animation.dart │ │ ├── has_attach_handlers.dart │ │ ├── has_before_selection_handlers.dart │ │ ├── has_blur_handlers.dart │ │ ├── has_change_handlers.dart │ │ ├── has_click_handlers.dart │ │ ├── has_constrained_value.dart │ │ ├── has_direction_estimator.dart │ │ ├── has_double_click_handlers.dart │ │ ├── has_drag_end_handlers.dart │ │ ├── has_drag_enter_handlers.dart │ │ ├── has_drag_handlers.dart │ │ ├── has_drag_leave_handlers.dart │ │ ├── has_drag_over_handlers.dart │ │ ├── has_drag_start_handlers.dart │ │ ├── has_drop_handlers.dart │ │ ├── has_enabled.dart │ │ ├── has_error_handlers.dart │ │ ├── has_focus_handlers.dart │ │ ├── has_gesture_change_handlers.dart │ │ ├── has_gesture_end_handlers.dart │ │ ├── has_gesture_start_handlers.dart │ │ ├── has_handlers.dart │ │ ├── has_horizontal_scrolling.dart │ │ ├── has_html.dart │ │ ├── has_key_down_handlers.dart │ │ ├── has_key_press_handlers.dart │ │ ├── has_key_up_handlers.dart │ │ ├── has_load_handlers.dart │ │ ├── has_mouse_down_handlers.dart │ │ ├── has_mouse_move_handlers.dart │ │ ├── has_mouse_out_handlers.dart │ │ ├── has_mouse_over_handlers.dart │ │ ├── has_mouse_up_handlers.dart │ │ ├── has_mouse_wheel_handlers.dart │ │ ├── has_name.dart │ │ ├── has_native_event.dart │ │ ├── has_open_handlers.dart │ │ ├── has_resize_handlers.dart │ │ ├── has_safe_html.dart │ │ ├── has_scroll_handlers.dart │ │ ├── has_selection_handlers.dart │ │ ├── has_text.dart │ │ ├── has_touch_cancel_handlers.dart │ │ ├── has_touch_end_handlers.dart │ │ ├── has_touch_move_handlers.dart │ │ ├── has_touch_start_handlers.dart │ │ ├── has_value.dart │ │ ├── has_value_change_handlers.dart │ │ ├── has_vertical_scrolling.dart │ │ ├── has_visibility.dart │ │ ├── has_word_wrap.dart │ │ ├── human_input_event.dart │ │ ├── impl │ │ │ ├── dom_impl.dart │ │ │ └── dom_impl_standard.dart │ │ ├── key_code_event.dart │ │ ├── key_down_event.dart │ │ ├── key_down_handler.dart │ │ ├── key_event.dart │ │ ├── key_press_event.dart │ │ ├── key_press_handler.dart │ │ ├── key_up_event.dart │ │ ├── key_up_handler.dart │ │ ├── load_event.dart │ │ ├── load_handler.dart │ │ ├── mouse_down_event.dart │ │ ├── mouse_down_handler.dart │ │ ├── mouse_event.dart │ │ ├── mouse_move_event.dart │ │ ├── mouse_move_handler.dart │ │ ├── mouse_out_event.dart │ │ ├── mouse_out_handler.dart │ │ ├── mouse_over_event.dart │ │ ├── mouse_over_handler.dart │ │ ├── mouse_up_event.dart │ │ ├── mouse_up_handler.dart │ │ ├── mouse_wheel_event.dart │ │ ├── mouse_wheel_handler.dart │ │ ├── native_preview_event.dart │ │ ├── native_preview_handler.dart │ │ ├── open_event.dart │ │ ├── open_handler.dart │ │ ├── resettable_event_bus.dart │ │ ├── resize_event.dart │ │ ├── resize_handler.dart │ │ ├── scroll_event.dart │ │ ├── scroll_handler.dart │ │ ├── selection_event.dart │ │ ├── selection_handler.dart │ │ ├── simple_event_bus.dart │ │ ├── takes_value.dart │ │ ├── touch_cancel_event.dart │ │ ├── touch_cancel_handler.dart │ │ ├── touch_end_event.dart │ │ ├── touch_end_handler.dart │ │ ├── touch_event.dart │ │ ├── touch_move_event.dart │ │ ├── touch_move_handler.dart │ │ ├── touch_start_event.dart │ │ ├── touch_start_handler.dart │ │ ├── umbrella_exception.dart │ │ ├── value_change_event.dart │ │ └── value_change_handler.dart │ ├── http │ │ ├── header.dart │ │ ├── request.dart │ │ ├── request_builder.dart │ │ ├── request_callback.dart │ │ ├── response.dart │ │ └── string_validator.dart │ ├── i18n │ │ ├── auto_direction_handler.dart │ │ ├── bidi_formatter.dart │ │ ├── bidi_formatter_base.dart │ │ ├── bidi_policy.dart │ │ ├── bidi_utils.dart │ │ ├── constants.dart │ │ ├── constants │ │ │ └── number_constants.dart │ │ ├── currency_data.dart │ │ ├── currency_list.dart │ │ ├── date_time_format.dart │ │ ├── date_time_format_info.dart │ │ ├── default_currency_data.dart │ │ ├── default_date_time_format_info.dart │ │ ├── dictionary.dart │ │ ├── direction.dart │ │ ├── direction_estimator.dart │ │ ├── directional_text_helper.dart │ │ ├── has_alignment.dart │ │ ├── has_auto_horizontal_alignment.dart │ │ ├── has_direction.dart │ │ ├── has_directional_html.dart │ │ ├── has_directional_safe_html.dart │ │ ├── has_directional_text.dart │ │ ├── has_horizontal_alignment.dart │ │ ├── has_text_direction.dart │ │ ├── has_vertical_alignment.dart │ │ ├── impl │ │ │ ├── currency_data_impl.dart │ │ │ ├── date_record.dart │ │ │ ├── date_time_format_info_impl.dart │ │ │ └── locale_info_impl.dart │ │ ├── locale_info.dart │ │ ├── localizable.dart │ │ ├── localizable_resource.dart │ │ ├── number_format.dart │ │ ├── time_zone.dart │ │ ├── time_zone_info.dart │ │ └── word_count_direction_estimator.dart │ ├── layout │ │ ├── impl │ │ │ └── layout_impl.dart │ │ └── layout.dart │ ├── place │ │ ├── place.dart │ │ ├── place_change_event.dart │ │ ├── place_change_event_handler.dart │ │ ├── place_change_request_event.dart │ │ ├── place_change_request_event_handler.dart │ │ ├── place_controller.dart │ │ ├── place_history_handler.dart │ │ ├── place_history_mapper.dart │ │ ├── place_history_mapper_with_factory.dart │ │ └── place_tokenizer.dart │ ├── resource │ │ ├── client_bundle.dart │ │ ├── image_resource.dart │ │ ├── impl │ │ │ └── image_resource_prototype.dart │ │ └── resource_prototype.dart │ ├── role │ │ ├── aria_attribute_type.dart │ │ ├── aria_value_attribute.dart │ │ ├── attribute.dart │ │ ├── button_role.dart │ │ ├── command_role.dart │ │ ├── pressed_value.dart │ │ ├── role.dart │ │ ├── roles.dart │ │ ├── roletype_role.dart │ │ ├── state.dart │ │ └── widget_role.dart │ ├── scheduler │ │ ├── impl │ │ │ ├── flusher.dart │ │ │ ├── rescuer.dart │ │ │ ├── scheduler_impl.dart │ │ │ └── task.dart │ │ └── scheduler.dart │ ├── text │ │ ├── abstract_renderer.dart │ │ ├── appendable.dart │ │ ├── date_time_format_renderer.dart │ │ ├── double_parser.dart │ │ ├── double_renderer.dart │ │ ├── integer_parser.dart │ │ ├── integer_renderer.dart │ │ ├── number_format_renderer.dart │ │ ├── parser.dart │ │ ├── passthrough_parser.dart │ │ ├── passthrough_renderer.dart │ │ └── renderer.dart │ ├── ui │ │ ├── Html.dart │ │ ├── absolute_panel.dart │ │ ├── abstract_image_prototype.dart │ │ ├── accepts_one_widget.dart │ │ ├── adapter │ │ │ ├── has_text_editor.dart │ │ │ ├── takes_value_editor.dart │ │ │ └── value_box_editor.dart │ │ ├── anchor.dart │ │ ├── attach_detach_exception.dart │ │ ├── button.dart │ │ ├── button_base.dart │ │ ├── caption_panel.dart │ │ ├── cell_panel.dart │ │ ├── check_box.dart │ │ ├── complex_panel.dart │ │ ├── composite.dart │ │ ├── custom_button.dart │ │ ├── date_label.dart │ │ ├── deck_layout_panel.dart │ │ ├── deck_panel.dart │ │ ├── decorated_popup_panel.dart │ │ ├── decorated_stack_panel.dart │ │ ├── decorator_panel.dart │ │ ├── dialog_box.dart │ │ ├── disclosure_panel.dart │ │ ├── dock_layout_panel.dart │ │ ├── dock_panel.dart │ │ ├── double_box.dart │ │ ├── file_upload.dart │ │ ├── finite_widget_iterator.dart │ │ ├── flex_table.dart │ │ ├── flow_panel.dart │ │ ├── focus_panel.dart │ │ ├── focus_widget.dart │ │ ├── frame.dart │ │ ├── grid.dart │ │ ├── has_one_widget.dart │ │ ├── has_scrolling.dart │ │ ├── has_tree_items.dart │ │ ├── has_widgets.dart │ │ ├── header_panel.dart │ │ ├── hidden.dart │ │ ├── history.dart │ │ ├── horizontal_panel.dart │ │ ├── html_panel.dart │ │ ├── html_table.dart │ │ ├── hyperlink.dart │ │ ├── image.dart │ │ ├── impl │ │ │ ├── clipped_image_impl.dart │ │ │ ├── clipped_image_prototype.dart │ │ │ ├── element_mapper_impl.dart │ │ │ ├── focus_impl.dart │ │ │ ├── focus_impl_default.dart │ │ │ ├── history_impl.dart │ │ │ ├── hyperlink_impl.dart │ │ │ ├── popup_impl.dart │ │ │ ├── resize_layout_panel_impl.dart │ │ │ ├── resize_layout_panel_impl_standard.dart │ │ │ ├── scroll_impl.dart │ │ │ └── text_box_impl.dart │ │ ├── indexed_panel.dart │ │ ├── inline_html.dart │ │ ├── inline_hyperlink.dart │ │ ├── inline_label.dart │ │ ├── insert_panel.dart │ │ ├── integer_box.dart │ │ ├── is_renderable.dart │ │ ├── is_tree_item.dart │ │ ├── is_widget.dart │ │ ├── label.dart │ │ ├── label_base.dart │ │ ├── layout_command.dart │ │ ├── layout_panel.dart │ │ ├── lazy_panel.dart │ │ ├── list_box.dart │ │ ├── menu_bar.dart │ │ ├── menu_item.dart │ │ ├── menu_item_separator.dart │ │ ├── notification_mole.dart │ │ ├── number_label.dart │ │ ├── panel.dart │ │ ├── password_text_box.dart │ │ ├── popup_panel.dart │ │ ├── provides_resize.dart │ │ ├── push_button.dart │ │ ├── radio_button.dart │ │ ├── requires_resize.dart │ │ ├── reset_button.dart │ │ ├── resize_composite.dart │ │ ├── resize_layout_panel.dart │ │ ├── root_layout_panel.dart │ │ ├── root_panel.dart │ │ ├── scroll_panel.dart │ │ ├── simple_check_box.dart │ │ ├── simple_layout_panel.dart │ │ ├── simple_panel.dart │ │ ├── simple_radio_button.dart │ │ ├── split_layout_panel.dart │ │ ├── splitter.dart │ │ ├── stack_layout_panel.dart │ │ ├── stack_panel.dart │ │ ├── submit_button.dart │ │ ├── tab_bar.dart │ │ ├── tab_layout_panel.dart │ │ ├── tab_panel.dart │ │ ├── text_alignment.dart │ │ ├── text_area.dart │ │ ├── text_box.dart │ │ ├── text_box_base.dart │ │ ├── toggle_button.dart │ │ ├── tree.dart │ │ ├── tree_item.dart │ │ ├── ui_object.dart │ │ ├── value_box.dart │ │ ├── value_box_base.dart │ │ ├── value_label.dart │ │ ├── value_list_box.dart │ │ ├── vertical_panel.dart │ │ ├── widget.dart │ │ ├── widget_collection.dart │ │ └── widget_iterators.dart │ ├── uibinder │ │ ├── binder.dart │ │ ├── creator.dart │ │ ├── parser.dart │ │ └── processor.dart │ ├── util │ │ ├── animation_type.dart │ │ ├── enum.dart │ │ ├── layout_constant.dart │ │ ├── remove_iterator.dart │ │ ├── safe_hml_renderer.dart │ │ ├── safe_html.dart │ │ ├── safe_html_builder.dart │ │ ├── safe_html_string.dart │ │ ├── safe_html_templates.dart │ │ ├── safe_html_utils.dart │ │ ├── safe_styles.dart │ │ ├── safe_styles_builder.dart │ │ ├── safe_styles_string.dart │ │ ├── safe_styles_utils.dart │ │ ├── safe_uri.dart │ │ ├── style.dart │ │ ├── timer.dart │ │ └── uri_utils.dart │ └── validation │ │ ├── number_validator.dart │ │ ├── phone_number_validator.dart │ │ ├── reg_exp_validator.dart │ │ ├── social_security_number_validator.dart │ │ ├── string_validator.dart │ │ ├── validator.dart │ │ └── widget_validator.dart ├── text.dart ├── ui.dart ├── uibinder.dart ├── util.dart └── validation.dart ├── pubspec.lock ├── pubspec.yaml ├── test ├── dart_web_toolkit_test.dart ├── index.html ├── run.sh ├── src │ ├── solid_ui_object.dart │ ├── ui_object_test_group.dart │ └── widget_test_group.dart └── test_group.dart └── tool ├── d2d ├── dwt-small-logo.png └── html.sed /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .project 3 | .children 4 | *.dart.js 5 | *.dart.js_ 6 | *.dart.js.map 7 | packages 8 | packages/ 9 | docs/ 10 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (C) 2012 - 2015 Sergey Akopkokhyants. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | #Dart Web Toolkit or DWT 2 | 3 | Dart Web Toolkit (DWT) is a development toolkit for building and optimizing complex browser-based applications. 4 | 5 | [![Build Status](https://drone.io/github.com/akserg/dart_web_toolkit/status.png)](https://drone.io/github.com/akserg/dart_web_toolkit/latest) 6 | 7 | ##License 8 | Copyright (c) 2012-2015 Sergey Akopkokhyants Licensed under the Apache 2.0 License. 9 | 10 | ##Credits 11 | This makes use of a lot of ideas from the GWT source code, so big thanks to the Google GWT team! 12 | 13 | 14 | -------------------------------------------------------------------------------- /example/canvas/canvas.css: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file */ 2 | /* for details. All rights reserved. Use of this source code is governed by a */ 3 | /* BSD-style license that can be found in the LICENSE file. */ 4 | 5 | body { 6 | background-color: #F8F8F8; 7 | font-family: 'Open Sans', sans-serif; 8 | font-size: 14px; 9 | font-weight: normal; 10 | line-height: 1.2em; 11 | margin: 15px; 12 | } 13 | 14 | p { 15 | color: #333; 16 | } 17 | 18 | #container { 19 | width: 100%; 20 | height: 400px; 21 | border: 1px solid #ccc; 22 | background-color: #fff; 23 | } 24 | 25 | #summary { 26 | float: left; 27 | } 28 | 29 | #notes { 30 | float: right; 31 | width: 120px; 32 | text-align: right; 33 | } 34 | 35 | .error { 36 | font-style: italic; 37 | color: red; 38 | } -------------------------------------------------------------------------------- /example/canvas/canvas.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Dart Web Toolkit.Grid 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /example/grid/grid.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Dart Web Toolkit.Grid 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /example/grid/grid_example.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2013 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | library grid_example; 5 | 6 | import 'package:dart_web_toolkit/ui.dart' as ui; 7 | import 'package:dart_web_toolkit/i18n.dart' as i18n; 8 | 9 | void main() { 10 | ui.Grid grid = new ui.Grid(1, 2); 11 | grid.setCellPadding(2); 12 | grid.getRowFormatter().setVerticalAlign(0, i18n.HasVerticalAlignment.ALIGN_TOP); 13 | grid.setHtml(0, 0, "Cell 0x0"); 14 | grid.setWidget(0, 1, new ui.Label("Cell 0x1")); 15 | ui.RootPanel.get().add(grid); 16 | } -------------------------------------------------------------------------------- /example/hello/frame_test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Frame Test page 7 | 8 | 9 | This is a frame test page. 10 | 11 | 12 | -------------------------------------------------------------------------------- /example/hello/hello.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Dart Web Toolkit Test 7 | 8 | 9 | 12 | 15 | 16 | 17 | 18 |
Loading
19 | 20 | 21 |
22 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /example/hello/ie.css: -------------------------------------------------------------------------------- 1 | nav { 2 | display: none; 3 | } -------------------------------------------------------------------------------- /example/hello/img/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/example/hello/img/ajax-loader.gif -------------------------------------------------------------------------------- /example/hello/img/circles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/example/hello/img/circles.png -------------------------------------------------------------------------------- /example/hello/img/circles_ie6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/example/hello/img/circles_ie6.png -------------------------------------------------------------------------------- /example/hello/img/lights.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/example/hello/img/lights.png -------------------------------------------------------------------------------- /example/hello/img/test.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/example/hello/img/test.jpg -------------------------------------------------------------------------------- /example/hello/props/LocalizableResource/ar.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainSubTitle":"عرض المزايا", 3 | "mainLinkExamples":"المزيد من الامثله", 4 | "categoryI18N":"التدويل" 5 | } -------------------------------------------------------------------------------- /example/hello/props/LocalizableResource/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainSubTitle":"Showcase of Features", 3 | "mainLinkExamples":"More Examples", 4 | "categoryI18N":"Internationalization" 5 | } -------------------------------------------------------------------------------- /example/hello/props/LocalizableResource/fr.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainSubTitle":"Présentation des fonctionnalités", 3 | "mainLinkExamples":"Autres exemples", 4 | "categoryI18N":"Internationalisation" 5 | } -------------------------------------------------------------------------------- /example/hello/props/LocalizableResource/zh.json: -------------------------------------------------------------------------------- 1 | { 2 | "mainSubTitle":"功能展示", 3 | "mainLinkExamples":"更多示例", 4 | "categoryI18N":"国际化" 5 | } -------------------------------------------------------------------------------- /example/history/history.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #F8F8F8; 3 | font-family: 'Open Sans', sans-serif; 4 | font-size: 14px; 5 | font-weight: normal; 6 | line-height: 1.2em; 7 | margin: 15px; 8 | } 9 | 10 | #loading { 11 | display: block; 12 | position: absolute; 13 | top: 50%; 14 | left: 50%; 15 | text-align: center; 16 | margin-left: -100px; 17 | } -------------------------------------------------------------------------------- /example/history/history.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Dart Web Toolkit History 7 | 8 | 9 | 12 | 15 | 16 | 17 | 18 |
Loading
19 | 20 | 21 |
22 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /example/history/img/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/example/history/img/ajax-loader.gif -------------------------------------------------------------------------------- /example/panels/img/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/example/panels/img/ajax-loader.gif -------------------------------------------------------------------------------- /example/panels/panels.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #F8F8F8; 3 | font-family: 'Open Sans', sans-serif; 4 | font-size: 14px; 5 | font-weight: normal; 6 | line-height: 1.2em; 7 | margin: 15px; 8 | } 9 | 10 | #loading { 11 | display: block; 12 | position: absolute; 13 | top: 50%; 14 | left: 50%; 15 | text-align: center; 16 | margin-left: -100px; 17 | } 18 | 19 | .border { 20 | border: 2px solid #ffff00; 21 | } 22 | 23 | .error-field { 24 | border: 2px solid #ff0000; 25 | } 26 | -------------------------------------------------------------------------------- /example/panels/panels.dart: -------------------------------------------------------------------------------- 1 | library panels_example; 2 | 3 | import 'dart:html'; 4 | 5 | import 'package:dart_web_toolkit/ui.dart'; 6 | 7 | void main() { 8 | querySelector("#loading").remove(); 9 | // 10 | RootLayoutPanel root = RootLayoutPanel.get(); 11 | // 12 | HeaderPanel pnl = new HeaderPanel() 13 | ..setHeaderWidget( new Label( 'Header' )) 14 | ..setContentWidget( new TextBox() ) 15 | ..setFooterWidget( new Label( 'Footer' )); 16 | root.add( pnl ); 17 | } 18 | -------------------------------------------------------------------------------- /example/panels/panels.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dart Web Toolkit Validation 6 | 7 | 8 | 9 | 10 | 11 | 12 |
Loading
13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /example/tree/tree.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Dart Web Toolkit.Tree 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /example/uibinder/img/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/example/uibinder/img/ajax-loader.gif -------------------------------------------------------------------------------- /example/uibinder/uibinder.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #F8F8F8; 3 | font-family: 'Open Sans', sans-serif; 4 | font-size: 14px; 5 | font-weight: normal; 6 | line-height: 1.2em; 7 | margin: 15px; 8 | } 9 | 10 | #loading { 11 | display: block; 12 | position: absolute; 13 | top: 50%; 14 | left: 50%; 15 | text-align: center; 16 | margin-left: -100px; 17 | } 18 | 19 | .ui-panel { 20 | margin : 15px auto; 21 | background-color : #ddd; 22 | border : 3px solid #999; 23 | } 24 | 25 | .ui-message { 26 | margin : 0 auto; 27 | background-color : #ff0; 28 | text-align : center; 29 | border : 1px solid #009; 30 | } 31 | -------------------------------------------------------------------------------- /example/uibinder/uibinder.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | library test_uibinder; 5 | 6 | import 'dart:html' as dart_html; 7 | 8 | import 'package:dart_web_toolkit/event.dart' as event; 9 | import 'package:dart_web_toolkit/ui.dart' as ui; 10 | import 'package:dart_web_toolkit/uibinder.dart'; 11 | 12 | part 'login_view.dart'; 13 | 14 | void main() { 15 | dart_html.querySelector("#loading").remove(); 16 | // 17 | String template = """ 18 |
19 |

My Form

20 |
User Name
21 | 22 |
Password
23 | 24 | 25 |
"""; 26 | 27 | ui.RootPanel.get().add(new LoginView(template)); 28 | } -------------------------------------------------------------------------------- /example/uibinder/uibinder.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Dart Web Toolkit Test 7 | 8 | 9 | 12 | 15 | 16 | 17 | 18 |
Loading
19 | 20 | 21 |
22 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /example/validation/img/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/example/validation/img/ajax-loader.gif -------------------------------------------------------------------------------- /example/validation/validation.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #F8F8F8; 3 | font-family: 'Open Sans', sans-serif; 4 | font-size: 14px; 5 | font-weight: normal; 6 | line-height: 1.2em; 7 | margin: 15px; 8 | } 9 | 10 | #loading { 11 | display: block; 12 | position: absolute; 13 | top: 50%; 14 | left: 50%; 15 | text-align: center; 16 | margin-left: -100px; 17 | } 18 | 19 | .error-field { 20 | border: 2px solid #ff0000; 21 | } 22 | -------------------------------------------------------------------------------- /example/validation/validation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dart Web Toolkit Validation 6 | 7 | 8 | 9 | 10 | 11 | 12 |
Loading
13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /lib/activity.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | /** 5 | * Dart Web Toolkit Activity library. 6 | * Classes used to implement app navigation. 7 | */ 8 | library dart_web_toolkit_activity; 9 | 10 | import 'dart:collection' as dart_collection; 11 | 12 | import 'ui.dart'; 13 | import 'event.dart'; 14 | import 'place.dart'; 15 | 16 | part 'src/activity/activity.dart'; 17 | part 'src/activity/abstract_activity.dart'; 18 | part 'src/activity/activity_manager.dart'; 19 | part 'src/activity/activity_mapper.dart'; 20 | part 'src/activity/caching_activity_mapper.dart'; 21 | part 'src/activity/filtered_activity_mapper.dart'; -------------------------------------------------------------------------------- /lib/animation.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | /** 5 | * Dart Web Toolkit Animation library. 6 | */ 7 | library dart_web_toolkit_animation; 8 | 9 | import 'dart:html' as dart_html; 10 | import 'dart:math' as dart_math; 11 | 12 | import 'util.dart'; 13 | import 'layout.dart'; 14 | 15 | part 'src/animation/animation.dart'; 16 | part 'src/animation/animation_scheduler.dart'; 17 | part 'src/animation/animated_layout.dart'; 18 | 19 | part 'src/animation/impl/animation_scheduler_impl.dart'; 20 | part 'src/animation/impl/animation_scheduler_impl_webkit.dart'; 21 | part 'src/animation/impl/animation_scheduler_impl_timer.dart'; 22 | -------------------------------------------------------------------------------- /lib/core.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | library dart_web_toolkit_core; 5 | 6 | part 'src/core/impl.dart'; 7 | part 'src/core/dwt.dart'; 8 | -------------------------------------------------------------------------------- /lib/data.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | /** 5 | * Dart Web Toolkit Data library. 6 | */ 7 | library dart_web_toolkit_data; 8 | 9 | part 'src/data/provides_key.dart'; 10 | part 'src/data/simple_key_provider.dart'; -------------------------------------------------------------------------------- /lib/editor.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | /** 5 | * Dart Web Toolkit Editor library. 6 | */ 7 | library dart_web_toolkit_editor; 8 | 9 | import 'event.dart'; 10 | 11 | part 'src/editor/is_editor.dart'; 12 | part 'src/editor/leaf_value_editor.dart'; 13 | part 'src/editor/editor.dart'; 14 | part 'src/editor/editor_delegate.dart'; 15 | 16 | part 'src/editor/has_editor_delegate.dart'; -------------------------------------------------------------------------------- /lib/http.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | library dart_web_toolkit_http; 5 | 6 | import 'dart:html' as dart_html; 7 | import 'dart:async' as dart_async; 8 | 9 | part 'src/http/request_callback.dart'; 10 | part 'src/http/request.dart'; 11 | part 'src/http/response.dart'; 12 | part 'src/http/request_builder.dart'; 13 | part 'src/http/string_validator.dart'; 14 | part 'src/http/header.dart'; 15 | 16 | -------------------------------------------------------------------------------- /lib/layout.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | /** 5 | * Dart Web Toolkit Layout library. 6 | */ 7 | library dart_web_toolkit_layout; 8 | 9 | import 'dart:html' as dart_html; 10 | 11 | import 'animation.dart'; 12 | import 'util.dart'; 13 | 14 | part 'src/layout/layout.dart'; 15 | part 'src/layout/impl/layout_impl.dart'; -------------------------------------------------------------------------------- /lib/place.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | /** 5 | * Dart Web Toolkit Place library. 6 | */ 7 | library dart_web_toolkit_place; 8 | 9 | import 'dart:html' as dart_html; 10 | import 'dart:async' as dart_async; 11 | 12 | import 'ui.dart'; 13 | import 'event.dart'; 14 | 15 | part 'src/place/place.dart'; 16 | part 'src/place/place_change_event.dart'; 17 | part 'src/place/place_change_event_handler.dart'; 18 | part 'src/place/place_change_request_event.dart'; 19 | part 'src/place/place_change_request_event_handler.dart'; 20 | part 'src/place/place_controller.dart'; 21 | part 'src/place/place_history_handler.dart'; 22 | part 'src/place/place_history_mapper.dart'; 23 | part 'src/place/place_history_mapper_with_factory.dart'; 24 | part 'src/place/place_tokenizer.dart'; -------------------------------------------------------------------------------- /lib/resource.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | /** 5 | * Dart Web Toolkit Resource library. 6 | */ 7 | library dart_web_toolkit_resource; 8 | 9 | import 'util.dart'; 10 | 11 | part 'src/resource/client_bundle.dart'; 12 | part 'src/resource/resource_prototype.dart'; 13 | part 'src/resource/image_resource.dart'; 14 | 15 | part 'src/resource/impl/image_resource_prototype.dart'; -------------------------------------------------------------------------------- /lib/resource/chrome/images/corner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/chrome/images/corner.png -------------------------------------------------------------------------------- /lib/resource/chrome/images/corner_ie6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/chrome/images/corner_ie6.png -------------------------------------------------------------------------------- /lib/resource/chrome/images/hborder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/chrome/images/hborder.png -------------------------------------------------------------------------------- /lib/resource/chrome/images/hborder_ie6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/chrome/images/hborder_ie6.png -------------------------------------------------------------------------------- /lib/resource/chrome/images/ie6/corner_dialog_topleft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/chrome/images/ie6/corner_dialog_topleft.png -------------------------------------------------------------------------------- /lib/resource/chrome/images/ie6/corner_dialog_topright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/chrome/images/ie6/corner_dialog_topright.png -------------------------------------------------------------------------------- /lib/resource/chrome/images/ie6/hborder_blue_shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/chrome/images/ie6/hborder_blue_shadow.png -------------------------------------------------------------------------------- /lib/resource/chrome/images/ie6/hborder_gray_shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/chrome/images/ie6/hborder_gray_shadow.png -------------------------------------------------------------------------------- /lib/resource/chrome/images/ie6/vborder_blue_shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/chrome/images/ie6/vborder_blue_shadow.png -------------------------------------------------------------------------------- /lib/resource/chrome/images/ie6/vborder_gray_shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/chrome/images/ie6/vborder_gray_shadow.png -------------------------------------------------------------------------------- /lib/resource/chrome/images/splitPanelThumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/chrome/images/splitPanelThumb.png -------------------------------------------------------------------------------- /lib/resource/chrome/images/vborder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/chrome/images/vborder.png -------------------------------------------------------------------------------- /lib/resource/chrome/images/vborder_ie6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/chrome/images/vborder_ie6.png -------------------------------------------------------------------------------- /lib/resource/clean/images/circles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/clean/images/circles.png -------------------------------------------------------------------------------- /lib/resource/clean/images/circles_ie6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/clean/images/circles_ie6.png -------------------------------------------------------------------------------- /lib/resource/clean/images/clear.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/clean/images/clear.gif -------------------------------------------------------------------------------- /lib/resource/clean/images/corner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/clean/images/corner.png -------------------------------------------------------------------------------- /lib/resource/clean/images/corner_ie6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/clean/images/corner_ie6.png -------------------------------------------------------------------------------- /lib/resource/clean/images/hborder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/clean/images/hborder.png -------------------------------------------------------------------------------- /lib/resource/clean/images/hborder_ie6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/clean/images/hborder_ie6.png -------------------------------------------------------------------------------- /lib/resource/clean/images/thumb_horz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/clean/images/thumb_horz.png -------------------------------------------------------------------------------- /lib/resource/clean/images/thumb_vertical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/clean/images/thumb_vertical.png -------------------------------------------------------------------------------- /lib/resource/clean/images/vborder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/clean/images/vborder.png -------------------------------------------------------------------------------- /lib/resource/clean/images/vborder_ie6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/clean/images/vborder_ie6.png -------------------------------------------------------------------------------- /lib/resource/dark/images/corner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/dark/images/corner.png -------------------------------------------------------------------------------- /lib/resource/dark/images/corner_ie6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/dark/images/corner_ie6.png -------------------------------------------------------------------------------- /lib/resource/dark/images/hborder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/dark/images/hborder.png -------------------------------------------------------------------------------- /lib/resource/dark/images/hborder_ie6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/dark/images/hborder_ie6.png -------------------------------------------------------------------------------- /lib/resource/dark/images/ie6/corner_dialog_topleft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/dark/images/ie6/corner_dialog_topleft.png -------------------------------------------------------------------------------- /lib/resource/dark/images/ie6/corner_dialog_topright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/dark/images/ie6/corner_dialog_topright.png -------------------------------------------------------------------------------- /lib/resource/dark/images/ie6/hborder_blue_shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/dark/images/ie6/hborder_blue_shadow.png -------------------------------------------------------------------------------- /lib/resource/dark/images/ie6/hborder_gray_shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/dark/images/ie6/hborder_gray_shadow.png -------------------------------------------------------------------------------- /lib/resource/dark/images/ie6/vborder_blue_shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/dark/images/ie6/vborder_blue_shadow.png -------------------------------------------------------------------------------- /lib/resource/dark/images/ie6/vborder_gray_shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/dark/images/ie6/vborder_gray_shadow.png -------------------------------------------------------------------------------- /lib/resource/dark/images/splitPanelThumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/dark/images/splitPanelThumb.png -------------------------------------------------------------------------------- /lib/resource/dark/images/vborder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/dark/images/vborder.png -------------------------------------------------------------------------------- /lib/resource/dark/images/vborder_ie6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/dark/images/vborder_ie6.png -------------------------------------------------------------------------------- /lib/resource/images/clear.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/images/clear.gif -------------------------------------------------------------------------------- /lib/resource/images/disclosurePanelClosed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/images/disclosurePanelClosed.png -------------------------------------------------------------------------------- /lib/resource/images/disclosurePanelClosed_rtl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/images/disclosurePanelClosed_rtl.png -------------------------------------------------------------------------------- /lib/resource/images/disclosurePanelOpen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/images/disclosurePanelOpen.png -------------------------------------------------------------------------------- /lib/resource/images/menuBarSubMenuIcon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/images/menuBarSubMenuIcon.gif -------------------------------------------------------------------------------- /lib/resource/images/menuBarSubMenuIcon_rtl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/images/menuBarSubMenuIcon_rtl.gif -------------------------------------------------------------------------------- /lib/resource/images/splitPanelThumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/images/splitPanelThumb.png -------------------------------------------------------------------------------- /lib/resource/images/treeClosed.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/images/treeClosed.gif -------------------------------------------------------------------------------- /lib/resource/images/treeLeaf.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/images/treeLeaf.gif -------------------------------------------------------------------------------- /lib/resource/images/treeOpen.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/images/treeOpen.gif -------------------------------------------------------------------------------- /lib/resource/standard/images/corner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/standard/images/corner.png -------------------------------------------------------------------------------- /lib/resource/standard/images/corner_ie6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/standard/images/corner_ie6.png -------------------------------------------------------------------------------- /lib/resource/standard/images/hborder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/standard/images/hborder.png -------------------------------------------------------------------------------- /lib/resource/standard/images/hborder_ie6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/standard/images/hborder_ie6.png -------------------------------------------------------------------------------- /lib/resource/standard/images/ie6/corner_dialog_topleft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/standard/images/ie6/corner_dialog_topleft.png -------------------------------------------------------------------------------- /lib/resource/standard/images/ie6/corner_dialog_topright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/standard/images/ie6/corner_dialog_topright.png -------------------------------------------------------------------------------- /lib/resource/standard/images/ie6/hborder_blue_shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/standard/images/ie6/hborder_blue_shadow.png -------------------------------------------------------------------------------- /lib/resource/standard/images/ie6/hborder_gray_shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/standard/images/ie6/hborder_gray_shadow.png -------------------------------------------------------------------------------- /lib/resource/standard/images/ie6/vborder_blue_shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/standard/images/ie6/vborder_blue_shadow.png -------------------------------------------------------------------------------- /lib/resource/standard/images/ie6/vborder_gray_shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/standard/images/ie6/vborder_gray_shadow.png -------------------------------------------------------------------------------- /lib/resource/standard/images/splitPanelThumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/standard/images/splitPanelThumb.png -------------------------------------------------------------------------------- /lib/resource/standard/images/vborder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/standard/images/vborder.png -------------------------------------------------------------------------------- /lib/resource/standard/images/vborder_ie6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/lib/resource/standard/images/vborder_ie6.png -------------------------------------------------------------------------------- /lib/role.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | /** 5 | * Dart Web Toolkit Role library. 6 | */ 7 | library dart_web_toolkit_role; 8 | 9 | import 'dart:html' as dart_html; 10 | 11 | import 'util.dart'; 12 | 13 | part 'src/role/role.dart'; 14 | part 'src/role/roles.dart'; 15 | part 'src/role/roletype_role.dart'; 16 | part 'src/role/widget_role.dart'; 17 | part 'src/role/command_role.dart'; 18 | part 'src/role/attribute.dart'; 19 | 20 | part 'src/role/aria_attribute_type.dart'; 21 | part 'src/role/aria_value_attribute.dart'; 22 | part 'src/role/pressed_value.dart'; 23 | 24 | part 'src/role/state.dart'; 25 | 26 | 27 | part 'src/role/button_role.dart'; -------------------------------------------------------------------------------- /lib/scheduler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | /** 5 | * Dart Web Toolkit Scheduler library. 6 | */ 7 | library dart_web_toolkit_scheduler; 8 | 9 | import 'dart:html' as dart_html; 10 | import 'dart:async' as dart_async; 11 | 12 | part 'src/scheduler/scheduler.dart'; 13 | 14 | part 'src/scheduler/impl/scheduler_impl.dart'; 15 | part 'src/scheduler/impl/task.dart'; 16 | part 'src/scheduler/impl/flusher.dart'; 17 | part 'src/scheduler/impl/rescuer.dart'; 18 | 19 | -------------------------------------------------------------------------------- /lib/src/activity/abstract_activity.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | /** 5 | * Dart Web Toolkit Activity library. 6 | * Classes used to implement app navigation. 7 | */ 8 | part of dart_web_toolkit_activity; 9 | 10 | /** 11 | * Simple Activity implementation that is always willing to stop, and does 12 | * nothing onStop and onCancel. 13 | */ 14 | abstract class AbstractActivity implements Activity { 15 | 16 | String mayStop() { 17 | return null; 18 | } 19 | 20 | void onCancel() { 21 | } 22 | 23 | void onStop() { 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /lib/src/activity/activity_mapper.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | /** 5 | * Dart Web Toolkit Activity library. 6 | * Classes used to implement app navigation. 7 | */ 8 | part of dart_web_toolkit_activity; 9 | 10 | /** 11 | * Finds the activity to run for a given {@link Place}, used to configure 12 | * an {@link ActivityManager}. 13 | */ 14 | abstract class ActivityMapper { 15 | /** 16 | * Returns the activity to run for the given {@link Place}, or null. 17 | * 18 | * @param place a Place object 19 | */ 20 | Activity getActivity(Place place); 21 | } -------------------------------------------------------------------------------- /lib/src/activity/caching_activity_mapper.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | /** 5 | * Dart Web Toolkit Activity library. 6 | * Classes used to implement app navigation. 7 | */ 8 | part of dart_web_toolkit_activity; 9 | 10 | /** 11 | * Wraps another {@link ActivityMapper} and caches the last activity it 12 | * returned, to be re-used if we see the same place twice. 13 | */ 14 | class CachingActivityMapper implements ActivityMapper { 15 | 16 | final ActivityMapper wrapped; 17 | 18 | Place lastPlace; 19 | Activity lastActivity; 20 | 21 | /** 22 | * Constructs a CachingActivityMapper object. 23 | * 24 | * @param wrapped an ActivityMapper object 25 | */ 26 | CachingActivityMapper(this.wrapped); 27 | 28 | Activity getActivity(Place place) { 29 | if (place != lastPlace) { 30 | lastPlace = place; 31 | lastActivity = wrapped.getActivity(place); 32 | } 33 | 34 | return lastActivity; 35 | } 36 | } -------------------------------------------------------------------------------- /lib/src/core/dwt.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_core; 5 | 6 | /** 7 | * Supports core functionality that in some cases requires direct support from 8 | * the compiler and runtime systems such as runtime type information and 9 | * deferred binding. 10 | */ 11 | class DWT { 12 | /** 13 | * Gets the URL prefix that should be prepended to URLs that 14 | * are intended to be module-relative, such as RPC entry points. 15 | * 16 | *

If the URL points to an output file of the GWT compiler (such as 17 | * a file in the public path), use {@link #getModuleBaseForStaticFiles()} 18 | * instead.

19 | * 20 | * @return if non-empty, the base URL is guaranteed to end with a slash 21 | */ 22 | static String getModuleBaseURL() { 23 | return Impl.getModuleBaseURL(); 24 | } 25 | 26 | // DWT Major version number 27 | static String get majorVersion => "0.4"; 28 | // DWT Minor version number 29 | static String get minorVersion => "0"; 30 | } 31 | -------------------------------------------------------------------------------- /lib/src/core/impl.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_core; 5 | 6 | /** 7 | * Private implementation class for GWT core. This API is should not be 8 | * considered public or stable. 9 | */ 10 | class Impl { 11 | static String getModuleBaseURL() { 12 | return "packages/dart_web_toolkit/"; 13 | } 14 | } -------------------------------------------------------------------------------- /lib/src/data/simple_key_provider.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_data; 5 | 6 | /** 7 | * Simple passthrough implementation of {@link ProvidesKey}. 8 | * 9 | * @param the data type of records 10 | */ 11 | class SimpleKeyProvider implements ProvidesKey { 12 | 13 | /** 14 | * Return the passed-in item. 15 | */ 16 | Object getKey(T item) { 17 | return item; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/src/editor/has_editor_delegate.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_editor; 5 | 6 | /** 7 | * Indicates that an Editor requires an EditorDelegate. 8 | * 9 | * @param the type of object the EditorDelegate operates on 10 | */ 11 | abstract class HasEditorDelegate extends Editor { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /lib/src/editor/leaf_value_editor.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_editor; 5 | 6 | /** 7 | * Used to edit non-object or immutable values. The Editor framework will not 8 | * descend into a LeafValueEditor. 9 | * 10 | * @param The type of primitive value 11 | * @see com.google.gwt.editor.client.adapters.SimpleEditor 12 | */ 13 | abstract class LeafValueEditor implements Editor, TakesValue { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /lib/src/event/adapter/attach_event_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link AttachEvent} events. 8 | */ 9 | class AttachEventHandlerAdapter extends EventHandlerAdapter implements AttachEventHandler { 10 | 11 | AttachEventHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when {@link AttachEvent} is fired. 15 | * 16 | * @param event the {@link AttachEvent} that was fired 17 | */ 18 | void onAttachOrDetach(AttachEvent event) { 19 | callback(event); 20 | } 21 | } 22 | 23 | 24 | -------------------------------------------------------------------------------- /lib/src/event/adapter/before_selection_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link BlurEvent} events. 8 | */ 9 | class BeforeSelectionHandlerAdapter extends EventHandlerAdapter implements BeforeSelectionHandler { 10 | 11 | BeforeSelectionHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when {@link BeforeSelectionEvent} is fired. 15 | * 16 | * @param event the {@link BeforeSelectionEvent} that was fired 17 | */ 18 | void onBeforeSelection(BeforeSelectionEvent event) { 19 | callback(event); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/event/adapter/blur_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link BlurEvent} events. 8 | */ 9 | class BlurHandlerAdapter extends EventHandlerAdapter implements BlurHandler { 10 | 11 | BlurHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when BlurEvent is fired. 15 | * 16 | * @param event the {@link BlurEvent} that was fired 17 | */ 18 | void onBlur(BlurEvent event) { 19 | callback(event); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/event/adapter/change_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler for {@link ChangeEvent} events. 8 | */ 9 | class ChangeHandlerAdapter extends EventHandlerAdapter implements ChangeHandler { 10 | 11 | ChangeHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when a change event is fired. 15 | * 16 | * @param event the {@link ChangeEvent} that was fired 17 | */ 18 | void onChange(ChangeEvent event) { 19 | callback(event); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/event/adapter/click_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler for {@link ClickEvent} events. 8 | */ 9 | class ClickHandlerAdapter extends EventHandlerAdapter implements ClickHandler { 10 | 11 | ClickHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when a native click event is fired. 15 | * 16 | * @param event the {@link ClickEvent} that was fired 17 | */ 18 | void onClick(ClickEvent event) { 19 | callback(event); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/event/adapter/close_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler for {@link CloseEvent} events. 8 | */ 9 | class CloseHandlerAdapter extends EventHandlerAdapter implements CloseHandler { 10 | 11 | CloseHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when a close event is fired. 15 | * 16 | * @param event the {@link CloseEvent} that was fired 17 | */ 18 | void onClose(CloseEvent event) { 19 | callback(event); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/event/adapter/closing_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler for {@link CloseEvent} events. 8 | */ 9 | class ClosingHandlerAdapter extends EventHandlerAdapter implements ClosingHandler { 10 | 11 | ClosingHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Fired just before the browser window closes or navigates to a different 15 | * site. No user-interface may be displayed during shutdown. 16 | * 17 | * @param event the event 18 | */ 19 | void onWindowClosing(ClosingEvent event) { 20 | callback(event); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/src/event/adapter/double_click_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link DoubleClickEvent} events. 8 | */ 9 | class DoubleClickHandlerAdapter extends EventHandlerAdapter implements DoubleClickHandler { 10 | 11 | DoubleClickHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when a {@link DoubleClickEvent} is fired. 15 | * 16 | * @param event the {@link DoubleClickEvent} that was fired 17 | */ 18 | void onDoubleClick(DoubleClickEvent event) { 19 | callback(event); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/event/adapter/drag_end_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link DragEndEvent} events. 8 | */ 9 | class DragEndHandlerAdapter extends EventHandlerAdapter implements DragEndHandler { 10 | 11 | DragEndHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when a {@link DragEndEvent} is fired. 15 | * 16 | * @param event the {@link DragEndEvent} that was fired 17 | */ 18 | void onDragEnd(DragEndEvent event) { 19 | callback(event); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/event/adapter/drag_enter_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link DragEnterEvent} events. 8 | */ 9 | class DragEnterHandlerAdapter extends EventHandlerAdapter implements DragEnterHandler { 10 | 11 | DragEnterHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when a {@link DragEnterEvent} is fired. 15 | * 16 | * @param event the {@link DragEnterEvent} that was fired 17 | */ 18 | void onDragEnter(DragEnterEvent event) { 19 | callback(event); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/event/adapter/drag_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link DragEvent} events. 8 | */ 9 | class DragHandlerAdapter extends EventHandlerAdapter implements DragHandler { 10 | 11 | DragHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when a {@link DragEvent} is fired. 15 | * 16 | * @param event the {@link DragEvent} that was fired 17 | */ 18 | void onDrag(DragEvent event) { 19 | callback(event); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/event/adapter/drag_leave_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link DragLeaveEvent} events. 8 | */ 9 | class DragLeaveHandlerAdapter extends EventHandlerAdapter implements DragLeaveHandler { 10 | 11 | DragLeaveHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when a {@link DragLeaveEvent} is fired. 15 | * 16 | * @param event the {@link DragLeaveEvent} that was fired 17 | */ 18 | void onDragLeave(DragLeaveEvent event) { 19 | callback(event); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/event/adapter/drag_over_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link DragOverEvent} events. 8 | */ 9 | class DragOverHandlerAdapter extends EventHandlerAdapter implements DragOverHandler { 10 | 11 | DragOverHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when a {@link DragOverEvent} is fired. 15 | * 16 | * @param event the {@link DragOverEvent} that was fired 17 | */ 18 | void onDragOver(DragOverEvent event) { 19 | callback(event); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/event/adapter/drag_start_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link DragStartEvent} events. 8 | */ 9 | class DragStartHandlerAdapter extends EventHandlerAdapter implements DragStartHandler { 10 | 11 | DragStartHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when a {@link DragStartEvent} is fired. 15 | * 16 | * @param event the {@link DragStartEvent} that was fired 17 | */ 18 | void onDragStart(DragStartEvent event) { 19 | callback(event); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/event/adapter/drop_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link DropEvent} events. 8 | */ 9 | class DropHandlerAdapter extends EventHandlerAdapter implements DropHandler { 10 | 11 | DropHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when a {@link DropEvent} is fired. 15 | * 16 | * @param event the {@link DropEvent} that was fired 17 | */ 18 | void onDrop(DropEvent event) { 19 | callback(event); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /lib/src/event/adapter/error_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link ErrorEvent} events. 8 | */ 9 | class ErrorHandlerAdapter extends EventHandlerAdapter implements ErrorHandler { 10 | 11 | ErrorHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when ErrorEvent is fired. 15 | * 16 | * @param event the {@link ErrorEvent} that was fired 17 | */ 18 | void onError(ErrorEvent event) { 19 | callback(event); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/event/adapter/focus_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link FocusEvent} events. 8 | */ 9 | class FocusHandlerAdapter extends EventHandlerAdapter implements FocusHandler { 10 | 11 | FocusHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when FocusEvent is fired. 15 | * 16 | * @param event the {@link FocusEvent} that was fired 17 | */ 18 | void onFocus(FocusEvent event) { 19 | callback(event); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/event/adapter/gesture_change_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link GestureChangeEvent} events. 8 | */ 9 | class GestureChangeHandlerAdapter extends EventHandlerAdapter implements GestureChangeHandler { 10 | 11 | GestureChangeHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when GestureChangeEvent is fired. 15 | * 16 | * @param event the {@link GestureChangeEvent} that was fired 17 | */ 18 | void onGestureChange(GestureChangeEvent event) { 19 | callback(event); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /lib/src/event/adapter/gesture_end_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link GestureEndEvent} events. 8 | */ 9 | class GestureEndHandlerAdapter extends EventHandlerAdapter implements GestureEndHandler { 10 | 11 | GestureEndHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when GestureEndEvent is fired. 15 | * 16 | * @param event the {@link GestureEndEvent} that was fired 17 | */ 18 | void onGestureEnd(GestureEndEvent event) { 19 | callback(event); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/event/adapter/gesture_start_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link GestureStartEvent} events. 8 | */ 9 | class GestureStartHandlerAdapter extends EventHandlerAdapter implements GestureStartHandler { 10 | 11 | GestureStartHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when GestureStartEvent is fired. 15 | * 16 | * @param event the {@link GestureStartEvent} that was fired 17 | */ 18 | void onGestureStart(GestureStartEvent event) { 19 | callback(event); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/event/adapter/key_down_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link KeyDownEvent} events. 8 | */ 9 | class KeyDownHandlerAdapter extends EventHandlerAdapter implements KeyDownHandler { 10 | 11 | KeyDownHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when {@link KeyDownEvent} is fired. 15 | * 16 | * @param event the {@link KeyDownEvent} that was fired 17 | */ 18 | void onKeyDown(KeyDownEvent event) { 19 | callback(event); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/event/adapter/key_press_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link KeyPressEvent} events. 8 | */ 9 | class KeyPressHandlerAdapter extends EventHandlerAdapter implements KeyPressHandler { 10 | 11 | KeyPressHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when KeyPressEvent is fired. 15 | * 16 | * @param event the {@link KeyPressEvent} that was fired 17 | */ 18 | void onKeyPress(KeyPressEvent event) { 19 | callback(event); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/event/adapter/key_up_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link KeyUpEvent} events. 8 | */ 9 | class KeyUpHandlerAdapter extends EventHandlerAdapter implements KeyUpHandler { 10 | 11 | KeyUpHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when KeyUpEvent is fired. 15 | * 16 | * @param event the {@link KeyUpEvent} that was fired 17 | */ 18 | void onKeyUp(KeyUpEvent event) { 19 | callback(event); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/event/adapter/load_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link LoadEvent} events. 8 | */ 9 | class LoadHandlerAdapter extends EventHandlerAdapter implements LoadHandler { 10 | 11 | LoadHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when LoadEvent is fired. 15 | * 16 | * @param event the {@link LoadEvent} that was fired 17 | */ 18 | void onLoad(LoadEvent event) { 19 | callback(event); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/event/adapter/mouse_down_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link MouseDownEvent} events. 8 | */ 9 | class MouseDownHandlerAdapter extends EventHandlerAdapter implements MouseDownHandler { 10 | 11 | MouseDownHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when MouseDown is fired. 15 | * 16 | * @param event the {@link MouseDownEvent} that was fired 17 | */ 18 | void onMouseDown(MouseDownEvent event) { 19 | callback(event); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /lib/src/event/adapter/mouse_move_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link MouseMoveEvent} events. 8 | */ 9 | class MouseMoveHandlerAdapter extends EventHandlerAdapter implements MouseMoveHandler { 10 | 11 | MouseMoveHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when MouseMoveEvent is fired. 15 | * 16 | * @param event the {@link MouseMoveEvent} that was fired 17 | */ 18 | void onMouseMove(MouseMoveEvent event) { 19 | callback(event); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /lib/src/event/adapter/mouse_out_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link MouseOutEvent} events. 8 | */ 9 | class MouseOutHandlerAdapter extends EventHandlerAdapter implements MouseOutHandler { 10 | 11 | MouseOutHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when MouseOutEvent is fired. 15 | * 16 | * @param event the {@link MouseOutEvent} that was fired 17 | */ 18 | void onMouseOut(MouseOutEvent event) { 19 | callback(event); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/event/adapter/mouse_over_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link MouseOverEvent} events. 8 | */ 9 | class MouseOverHandlerAdapter extends EventHandlerAdapter implements MouseOverHandler { 10 | 11 | MouseOverHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when MouseOverEvent is fired. 15 | * 16 | * @param event the {@link MouseOverEvent} that was fired 17 | */ 18 | void onMouseOver(MouseOverEvent event) { 19 | callback(event); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/event/adapter/mouse_up_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link MouseUpEvent} events. 8 | */ 9 | class MouseUpHandlerAdapter extends EventHandlerAdapter implements MouseUpHandler { 10 | 11 | MouseUpHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when MouseUpEvent is fired. 15 | * 16 | * @param event the {@link MouseUpEvent} that was fired 17 | */ 18 | void onMouseUp(MouseUpEvent event) { 19 | callback(event); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /lib/src/event/adapter/mouse_wheel_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link MouseWheelEvent} events. 8 | */ 9 | class MouseWheelHandlerAdapter extends EventHandlerAdapter implements MouseWheelHandler { 10 | 11 | MouseWheelHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when MouseWheelEvent is fired. 15 | * 16 | * @param event the {@link MouseWheelEvent} that was fired 17 | */ 18 | void onMouseWheel(MouseWheelEvent event) { 19 | callback(event); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /lib/src/event/adapter/native_preview_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link NativePreviewEvent} events. 8 | */ 9 | class NativePreviewHandlerAdapter extends EventHandlerAdapter implements NativePreviewHandler { 10 | 11 | NativePreviewHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when NativePreviewEvent is fired. 15 | * 16 | * @param event the {@link NativePreviewEvent} that was fired 17 | */ 18 | void onPreviewNativeEvent(NativePreviewEvent event) { 19 | callback(event); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/event/adapter/open_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Implemented by objects that handle {@link OpenEvent}. 8 | */ 9 | class OpenHandlerAdapter extends EventHandlerAdapter implements OpenHandler { 10 | 11 | OpenHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when {@link ValueChangeEvent} is fired. 15 | * 16 | * @param event the {@link ValueChangeEvent} that was fired 17 | */ 18 | void onOpen(OpenEvent event) { 19 | callback(event); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/event/adapter/scroll_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link ScrollEvent} events. 8 | */ 9 | class ScrollHandlerAdapter extends EventHandlerAdapter implements ScrollHandler { 10 | 11 | ScrollHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when ScrollEvent is fired. 15 | * 16 | * @param event the {@link ScrollEvent} that was fired 17 | */ 18 | void onScroll(ScrollEvent event) { 19 | callback(event); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/event/adapter/selection_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link ScrollEvent} events. 8 | */ 9 | class SelectionHandlerAdapter extends EventHandlerAdapter implements SelectionHandler { 10 | 11 | SelectionHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when {@link SelectionEvent} is fired. 15 | * 16 | * @param event the {@link SelectionEvent} that was fired 17 | */ 18 | void onSelection(SelectionEvent event) { 19 | callback(event); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/event/adapter/touch_cancel_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link TouchCancelEvent} events. 8 | */ 9 | class TouchCancelHandlerAdapter extends EventHandlerAdapter implements TouchCancelHandler { 10 | 11 | TouchCancelHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when TouchCancelEvent is fired. 15 | * 16 | * @param event the {@link TouchCancelEvent} that was fired 17 | */ 18 | void onTouchCancel(TouchCancelEvent event) { 19 | callback(event); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /lib/src/event/adapter/touch_end_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link TouchEndEvent} events. 8 | */ 9 | class TouchEndHandlerAdapter extends EventHandlerAdapter implements TouchEndHandler { 10 | 11 | TouchEndHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when TouchEndEvent is fired. 15 | * 16 | * @param event the {@link TouchEndEvent} that was fired 17 | */ 18 | void onTouchEnd(TouchEndEvent event) { 19 | callback(event); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /lib/src/event/adapter/touch_move_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link TouchMoveEvent} events. 8 | */ 9 | class TouchMoveHandlerAdapter extends EventHandlerAdapter implements TouchMoveHandler { 10 | 11 | TouchMoveHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when TouchMoveEvent is fired. 15 | * 16 | * @param event the {@link TouchMoveEvent} that was fired 17 | */ 18 | void onTouchMove(TouchMoveEvent event) { 19 | callback(event); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /lib/src/event/adapter/touch_start_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link TouchStartEvent} events. 8 | */ 9 | class TouchStartHandlerAdapter extends EventHandlerAdapter implements TouchStartHandler { 10 | 11 | TouchStartHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when TouchStartEvent is fired. 15 | * 16 | * @param event the {@link TouchStartEvent} that was fired 17 | */ 18 | void onTouchStart(TouchStartEvent event) { 19 | callback(event); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /lib/src/event/adapter/value_change_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Implemented by objects that handle {@link AttachEvent}. 8 | */ 9 | class ValueChangeHandlerAdapter extends EventHandlerAdapter implements ValueChangeHandler { 10 | 11 | ValueChangeHandlerAdapter(EventHandlerAdapterCallback callback) : super(callback); 12 | 13 | /** 14 | * Called when {@link ValueChangeEvent} is fired. 15 | * 16 | * @param event the {@link ValueChangeEvent} that was fired 17 | */ 18 | void onValueChange(ValueChangeEvent event) { 19 | callback(event); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/event/attach_event_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Implemented by objects that handle {@link AttachEvent}. 8 | */ 9 | abstract class AttachEventHandler extends EventHandler { 10 | void onAttachOrDetach(AttachEvent event); 11 | } -------------------------------------------------------------------------------- /lib/src/event/before_selection_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link BeforeSelectionEvent} events. 8 | * 9 | * @param the type about to be selected 10 | */ 11 | abstract class BeforeSelectionHandler extends EventHandler { 12 | 13 | /** 14 | * Called when {@link BeforeSelectionEvent} is fired. 15 | * 16 | * @param event the {@link BeforeSelectionEvent} that was fired 17 | */ 18 | void onBeforeSelection(BeforeSelectionEvent event); 19 | } 20 | -------------------------------------------------------------------------------- /lib/src/event/blur_event.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Represents a native blur event. 8 | */ 9 | class BlurEvent extends DomEvent { 10 | /** 11 | * Event type for focus events. Represents the meta-data associated with this 12 | * event. 13 | */ 14 | static final DomEventType TYPE = new DomEventType(BrowserEvents.BLUR, new BlurEvent()); 15 | 16 | /** 17 | * Protected constructor, use 18 | * {@link DomEvent#fireNativeEvent(com.google.gwt.dom.client.NativeEvent, com.google.gwt.event.shared.HasHandlers)} 19 | * to fire focus events. 20 | */ 21 | BlurEvent(); 22 | 23 | DomEventType getAssociatedType() { 24 | return TYPE; 25 | } 26 | 27 | void dispatch(BlurHandler handler) { 28 | handler.onBlur(this); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lib/src/event/blur_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link BlurEvent} events. 8 | */ 9 | abstract class BlurHandler extends EventHandler { 10 | 11 | /** 12 | * Called when BlurEvent is fired. 13 | * 14 | * @param event the {@link BlurEvent} that was fired 15 | */ 16 | void onBlur(BlurEvent event); 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/event/change_event.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Represents a native change event. 8 | */ 9 | class ChangeEvent extends DomEvent { 10 | 11 | /** 12 | * The event type. 13 | */ 14 | static DomEventType TYPE = new DomEventType(BrowserEvents.CHANGE, new ChangeEvent()); 15 | 16 | /** 17 | * Gets the event type associated with change events. 18 | * 19 | * @return the handler type 20 | */ 21 | DomEventType getAssociatedType() { 22 | return TYPE; 23 | } 24 | 25 | ChangeEvent(); 26 | 27 | void dispatch(ChangeHandler handler) { 28 | handler.onChange(this); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lib/src/event/change_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler for {@link ChangeEvent} events. 8 | */ 9 | abstract class ChangeHandler extends EventHandler { 10 | 11 | /** 12 | * Called when a change event is fired. 13 | * 14 | * @param event the {@link ChangeEvent} that was fired 15 | */ 16 | void onChange(ChangeEvent event); 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/event/click_event.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Represents a native click event. 8 | */ 9 | class ClickEvent extends MouseEvent { 10 | 11 | /** 12 | * The event type. 13 | */ 14 | static DomEventType TYPE = new DomEventType(BrowserEvents.CLICK, new ClickEvent()); 15 | 16 | DomEventType getAssociatedType() { 17 | return TYPE; 18 | } 19 | 20 | ClickEvent(); 21 | 22 | void dispatch(ClickHandler handler) { 23 | handler.onClick(this); 24 | } 25 | } -------------------------------------------------------------------------------- /lib/src/event/click_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler for {@link ClickEvent} events. 8 | */ 9 | abstract class ClickHandler extends EventHandler { 10 | 11 | /** 12 | * Called when a native click event is fired. 13 | * 14 | * @param event the {@link ClickEvent} that was fired 15 | */ 16 | void onClick(ClickEvent event); 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/event/close_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link CloseEvent} events. 8 | * 9 | * @param the type being closed 10 | */ 11 | abstract class CloseHandler extends EventHandler { 12 | 13 | /** 14 | * Called when {@link CloseEvent} is fired. 15 | * 16 | * @param event the {@link CloseEvent} that was fired 17 | */ 18 | void onClose(CloseEvent event); 19 | } 20 | -------------------------------------------------------------------------------- /lib/src/event/closing_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * HHandler for {@link Window.ClosingEvent} events. 8 | */ 9 | abstract class ClosingHandler extends EventHandler { 10 | 11 | /** 12 | * Fired just before the browser window closes or navigates to a different 13 | * site. No user-interface may be displayed during shutdown. 14 | * 15 | * @param event the event 16 | */ 17 | void onWindowClosing(ClosingEvent event); 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/event/double_click_event.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Represents a native double click event. 8 | */ 9 | class DoubleClickEvent extends MouseEvent { 10 | 11 | /** 12 | * The event type. 13 | */ 14 | static DomEventType TYPE = new DomEventType(BrowserEvents.DBLCLICK, new DoubleClickEvent()); 15 | 16 | DomEventType getAssociatedType() { 17 | return TYPE; 18 | } 19 | 20 | DoubleClickEvent(); 21 | 22 | void dispatch(DoubleClickHandler handler) { 23 | handler.onDoubleClick(this); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/src/event/double_click_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link DoubleClickEvent} events. 8 | */ 9 | abstract class DoubleClickHandler extends EventHandler { 10 | 11 | /** 12 | * Called when a {@link DoubleClickEvent} is fired. 13 | * 14 | * @param event the {@link DoubleClickEvent} that was fired 15 | */ 16 | void onDoubleClick(DoubleClickEvent event); 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/event/drag_end_event.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Represents a native drag end event. 8 | */ 9 | class DragEndEvent extends DragDropEventBase { 10 | 11 | /** 12 | * The event type. 13 | */ 14 | static DomEventType TYPE = new DomEventType(BrowserEvents.DRAGEND, new DragEndEvent()); 15 | 16 | DomEventType getAssociatedType() { 17 | return TYPE; 18 | } 19 | 20 | DragEndEvent(); 21 | 22 | void dispatch(DragEndHandler handler) { 23 | handler.onDragEnd(this); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/src/event/drag_end_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link DragEndEvent} events. 8 | */ 9 | abstract class DragEndHandler extends EventHandler { 10 | 11 | /** 12 | * Called when a {@link DragEndEvent} is fired. 13 | * 14 | * @param event the {@link DragEndEvent} that was fired 15 | */ 16 | void onDragEnd(DragEndEvent event); 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/event/drag_enter_event.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Represents a native drag enter event. 8 | */ 9 | class DragEnterEvent extends DragDropEventBase { 10 | 11 | /** 12 | * The event type. 13 | */ 14 | static DomEventType TYPE = new DomEventType(BrowserEvents.DRAGENTER, new DragEnterEvent()); 15 | 16 | DomEventType getAssociatedType() { 17 | return TYPE; 18 | } 19 | 20 | DragEnterEvent(); 21 | 22 | void dispatch(DragEnterHandler handler) { 23 | handler.onDragEnter(this); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/src/event/drag_enter_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link DragEnterEvent} events. 8 | */ 9 | abstract class DragEnterHandler extends EventHandler { 10 | 11 | /** 12 | * Called when a {@link DragEnterEvent} is fired. 13 | * 14 | * @param event the {@link DragEnterEvent} that was fired 15 | */ 16 | void onDragEnter(DragEnterEvent event); 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/event/drag_event.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Represents a native drag event. 8 | */ 9 | class DragEvent extends DragDropEventBase { 10 | 11 | /** 12 | * The event type. 13 | */ 14 | static DomEventType TYPE = new DomEventType(BrowserEvents.DRAG, new DragEvent()); 15 | 16 | DomEventType getAssociatedType() { 17 | return TYPE; 18 | } 19 | 20 | DragEvent(); 21 | 22 | void dispatch(DragHandler handler) { 23 | handler.onDrag(this); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/src/event/drag_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link DragEvent} events. 8 | */ 9 | abstract class DragHandler extends EventHandler { 10 | 11 | /** 12 | * Called when a {@link DragEvent} is fired. 13 | * 14 | * @param event the {@link DragEvent} that was fired 15 | */ 16 | void onDrag(DragEvent event); 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/event/drag_leave_event.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Represents a native drag leave event. 8 | */ 9 | class DragLeaveEvent extends DragDropEventBase { 10 | 11 | /** 12 | * The event type. 13 | */ 14 | static DomEventType TYPE = new DomEventType(BrowserEvents.DRAGLEAVE, new DragLeaveEvent()); 15 | 16 | DomEventType getAssociatedType() { 17 | return TYPE; 18 | } 19 | 20 | DragLeaveEvent(); 21 | 22 | void dispatch(DragLeaveHandler handler) { 23 | handler.onDragLeave(this); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/src/event/drag_leave_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link DragLeaveEvent} events. 8 | */ 9 | abstract class DragLeaveHandler extends EventHandler { 10 | 11 | /** 12 | * Called when a {@link DragLeaveEvent} is fired. 13 | * 14 | * @param event the {@link DragLeaveEvent} that was fired 15 | */ 16 | void onDragLeave(DragLeaveEvent event); 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/event/drag_over_event.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Represents a native drag over event. 8 | */ 9 | class DragOverEvent extends DragDropEventBase { 10 | 11 | /** 12 | * The event type. 13 | */ 14 | static DomEventType TYPE = new DomEventType(BrowserEvents.DRAGOVER, new DragOverEvent()); 15 | 16 | DomEventType getAssociatedType() { 17 | return TYPE; 18 | } 19 | 20 | DragOverEvent(); 21 | 22 | void dispatch(DragOverHandler handler) { 23 | handler.onDragOver(this); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/src/event/drag_over_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link DragOverEvent} events. 8 | */ 9 | abstract class DragOverHandler extends EventHandler { 10 | 11 | /** 12 | * Called when a {@link DragOverEvent} is fired. 13 | * 14 | * @param event the {@link DragOverEvent} that was fired 15 | */ 16 | void onDragOver(DragOverEvent event); 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/event/drag_start_event.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Represents a native drag start event. 8 | */ 9 | class DragStartEvent extends DragDropEventBase { 10 | 11 | /** 12 | * The event type. 13 | */ 14 | static DomEventType TYPE = new DomEventType(BrowserEvents.DRAGSTART, new DragStartEvent()); 15 | 16 | DomEventType getAssociatedType() { 17 | return TYPE; 18 | } 19 | 20 | DragStartEvent(); 21 | 22 | void dispatch(DragStartHandler handler) { 23 | handler.onDragStart(this); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /lib/src/event/drag_start_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link DragStartEvent} events. 8 | */ 9 | abstract class DragStartHandler extends EventHandler { 10 | 11 | /** 12 | * Called when a {@link DragStartEvent} is fired. 13 | * 14 | * @param event the {@link DragStartEvent} that was fired 15 | */ 16 | void onDragStart(DragStartEvent event); 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/event/drop_event.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Represents a native drop event. 8 | */ 9 | class DropEvent extends DragDropEventBase { 10 | 11 | /** 12 | * The event type. 13 | */ 14 | static DomEventType TYPE = new DomEventType(BrowserEvents.DROP, new DropEvent()); 15 | 16 | DomEventType getAssociatedType() { 17 | return TYPE; 18 | } 19 | 20 | DropEvent(); 21 | 22 | void dispatch(DropHandler handler) { 23 | handler.onDrop(this); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /lib/src/event/drop_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link DropEvent} events. 8 | */ 9 | abstract class DropHandler extends EventHandler { 10 | 11 | /** 12 | * Called when a {@link DropEvent} is fired. 13 | * 14 | * @param event the {@link DropEvent} that was fired 15 | */ 16 | void onDrop(DropEvent event); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/event/error_event.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Represents a native error event. 8 | */ 9 | class ErrorEvent extends DomEvent { 10 | 11 | /** 12 | * The event type. 13 | */ 14 | static DomEventType TYPE = new DomEventType(BrowserEvents.LOAD, new ErrorEvent()); 15 | 16 | DomEventType getAssociatedType() { 17 | return TYPE; 18 | } 19 | 20 | ErrorEvent(); 21 | 22 | void dispatch(ErrorHandler handler) { 23 | handler.onError(this); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/src/event/error_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link ErrorEvent} events. 8 | */ 9 | abstract class ErrorHandler extends EventHandler { 10 | 11 | /** 12 | * Called when ErrorEvent is fired. 13 | * 14 | * @param event the {@link ErrorEvent} that was fired 15 | */ 16 | void onError(ErrorEvent event); 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/event/event_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Marker interface for event handlers. All stock GWT Widget and dom event 8 | * handlers extend [EventHandler]. 9 | */ 10 | abstract class EventHandler { 11 | 12 | } 13 | -------------------------------------------------------------------------------- /lib/src/event/event_handler_adapter.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | typedef void EventHandlerAdapterCallback(DwtEvent event); 7 | 8 | class EventHandlerAdapter implements EventHandler { 9 | 10 | EventHandlerAdapterCallback callback; 11 | 12 | EventHandlerAdapter(this.callback); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /lib/src/event/event_listener.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Receives low-level browser events. The implementer registers for DOM events 8 | * using [DOM#setEventListener(Element, EventListener)]. 9 | * 10 | * Only subclasses of Widget should attempt to listen to browser events. 11 | */ 12 | abstract class EventListener { 13 | 14 | /** 15 | * Fired whenever a browser event is received. 16 | * 17 | * @param event the event received 18 | */ 19 | void onBrowserEvent(dart_html.Event event); 20 | } 21 | -------------------------------------------------------------------------------- /lib/src/event/focus_event.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Represents a native focus event. 8 | */ 9 | class FocusEvent extends DomEvent { 10 | 11 | /** 12 | * Event type for focus events. Represents the meta-data associated with this 13 | * event. 14 | */ 15 | static final DomEventType TYPE = new DomEventType(BrowserEvents.FOCUS, new FocusEvent()); 16 | 17 | /** 18 | * Protected constructor, use 19 | * {@link DomEvent#fireNativeEvent(com.google.gwt.dom.client.NativeEvent, com.google.gwt.event.shared.HasHandlers)} 20 | * to fire focus events. 21 | */ 22 | FocusEvent(); 23 | 24 | DomEventType getAssociatedType() { 25 | return TYPE; 26 | } 27 | 28 | void dispatch(FocusHandler handler) { 29 | handler.onFocus(this); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/src/event/focus_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link FocusEvent} events. 8 | */ 9 | abstract class FocusHandler extends EventHandler { 10 | 11 | /** 12 | * Called when FocusEvent is fired. 13 | * 14 | * @param event the {@link FocusEvent} that was fired 15 | */ 16 | void onFocus(FocusEvent event); 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/event/gesture_change_event.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Represents a native gesture change event. 8 | */ 9 | class GestureChangeEvent extends DomEvent { 10 | 11 | /** 12 | * The event type. 13 | */ 14 | static DomEventType TYPE = new DomEventType(BrowserEvents.GESTURECHANGE, new GestureChangeEvent()); 15 | 16 | DomEventType getAssociatedType() { 17 | return TYPE; 18 | } 19 | 20 | GestureChangeEvent(); 21 | 22 | void dispatch(GestureChangeHandler handler) { 23 | handler.onGestureChange(this); 24 | } 25 | 26 | double getRotation() { 27 | //return getNativeEvent().rotation; 28 | throw new Exception("Not implemented yet"); 29 | } 30 | 31 | double getScale() { 32 | //return getNativeEvent().scale; 33 | throw new Exception("Not implemented yet"); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib/src/event/gesture_change_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link GestureChangeEvent} events. 8 | */ 9 | abstract class GestureChangeHandler extends EventHandler { 10 | 11 | /** 12 | * Called when GestureChangeEvent is fired. 13 | * 14 | * @param event the {@link GestureChangeEvent} that was fired 15 | */ 16 | void onGestureChange(GestureChangeEvent event); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/event/gesture_end_event.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Represents a native gesture end event. 8 | */ 9 | class GestureEndEvent extends DomEvent { 10 | 11 | /** 12 | * The event type. 13 | */ 14 | static DomEventType TYPE = new DomEventType(BrowserEvents.GESTUREEND, new GestureEndEvent()); 15 | 16 | DomEventType getAssociatedType() { 17 | return TYPE; 18 | } 19 | 20 | GestureEndEvent(); 21 | 22 | void dispatch(GestureEndHandler handler) { 23 | handler.onGestureEnd(this); 24 | } 25 | 26 | double getRotation() { 27 | //return getNativeEvent().rotation; 28 | throw new Exception("Not implemented yet"); 29 | } 30 | 31 | double getScale() { 32 | //return getNativeEvent().scale; 33 | throw new Exception("Not implemented yet"); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib/src/event/gesture_end_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link GestureEndEvent} events. 8 | */ 9 | abstract class GestureEndHandler extends EventHandler { 10 | 11 | /** 12 | * Called when GestureEndEvent is fired. 13 | * 14 | * @param event the {@link GestureEndEvent} that was fired 15 | */ 16 | void onGestureEnd(GestureEndEvent event); 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/event/gesture_start_event.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Represents a native gesture start event. 8 | */ 9 | class GestureStartEvent extends DomEvent { 10 | 11 | /** 12 | * The event type. 13 | */ 14 | static DomEventType TYPE = new DomEventType(BrowserEvents.GESTURESTART, new GestureStartEvent()); 15 | 16 | DomEventType getAssociatedType() { 17 | return TYPE; 18 | } 19 | 20 | GestureStartEvent(); 21 | 22 | void dispatch(GestureStartHandler handler) { 23 | handler.onGestureStart(this); 24 | } 25 | 26 | double getRotation() { 27 | //return getNativeEvent().rotation; 28 | throw new Exception("Not implemented yet"); 29 | } 30 | 31 | double getScale() { 32 | //return getNativeEvent().scale; 33 | throw new Exception("Not implemented yet"); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib/src/event/gesture_start_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link GestureStartEvent} events. 8 | */ 9 | abstract class GestureStartHandler extends EventHandler { 10 | 11 | /** 12 | * Called when GestureStartEvent is fired. 13 | * 14 | * @param event the {@link GestureStartEvent} that was fired 15 | */ 16 | void onGestureStart(GestureStartEvent event); 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/event/handler_registration.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Registration objects returned when an event handler is bound (e.g. via 8 | * [EventBus#addHandler]), used to deregister. 9 | * 10 | * A tip: to make a handler deregister itself try something like the following: 11 | *
new MyHandler() {
12 |  *  HandlerRegistration reg = MyEvent.register(eventBus, this);
13 |  *
14 |  *  public void onMyThing(MyEvent event) {
15 |  *    {@literal /}* do your thing *{@literal /}
16 |  *    reg.removeHandler();
17 |  *  }
18 |  * };
19 |  * 
20 | */ 21 | abstract class HandlerRegistration { 22 | 23 | /** 24 | * Deregisters the handler associated with this registration object if the 25 | * handler is still attached to the event source. If the handler is no longer 26 | * attached to the event source, this is a no-op. 27 | */ 28 | void removeHandler(); 29 | } 30 | -------------------------------------------------------------------------------- /lib/src/event/has_all_drag_and_drop_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * This is a convenience interface that includes all drag and drop handlers 8 | * defined by the core GWT system. 9 | * 10 | *

11 | * Experimental API: This API is still under development 12 | * and is subject to change. 13 | * 14 | *

15 | */ 16 | abstract class HasAllDragAndDropHandlers implements HasDragEndHandlers, 17 | HasDragEnterHandlers, HasDragLeaveHandlers, HasDragHandlers, 18 | HasDragOverHandlers, HasDragStartHandlers, HasDropHandlers { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /lib/src/event/has_all_focus_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * This is a convenience interface that includes all focus handlers defined by 8 | * the core GWT system. 9 | * 10 | *

11 | * WARNING, PLEASE READ: As this interface is intended for developers who wish 12 | * to handle all focus events in GWT, in the unlikely event that a new focus 13 | * event is added, this interface will change. 14 | *

15 | */ 16 | abstract class HasAllFocusHandlers implements HasFocusHandlers, HasBlurHandlers { 17 | 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/event/has_all_gesture_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * This is a convenience interface that includes all gesture handlers defined by 8 | * the core GWT system. 9 | *

10 | * WARNING, PLEASE READ: As this interface is intended for developers who wish 11 | * to handle all gesture events in GWT, new gesture event handlers will be added 12 | * to it. Therefore, updates can cause breaking API changes. 13 | *

14 | */ 15 | abstract class HasAllGestureHandlers implements HasGestureStartHandlers, 16 | HasGestureChangeHandlers, HasGestureEndHandlers{ 17 | 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/event/has_all_key_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Convenience interface used to implement all key handlers at once. 8 | * 9 | *

10 | * WARNING, PLEASE READ: In the unlikely event that more key handler subtypes 11 | * are added to GWT, this interface will be expanded, so only implement this 12 | * interface if you wish to have your widget break if a new key event type is 13 | * introduced. 14 | *

15 | */ 16 | abstract class HasAllKeyHandlers implements HasKeyUpHandlers, 17 | HasKeyDownHandlers, HasKeyPressHandlers { 18 | 19 | } 20 | -------------------------------------------------------------------------------- /lib/src/event/has_all_mouse_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * This is a convenience interface that includes all mouse handlers defined by 8 | * the core GWT system. 9 | *

10 | * WARNING, PLEASE READ: As this interface is intended for developers who wish 11 | * to handle all mouse events in GWT, new mouse event handlers will be added to 12 | * it. Therefore, updates can cause breaking API changes. 13 | *

14 | */ 15 | abstract class HasAllMouseHandlers implements HasMouseDownHandlers, 16 | HasMouseUpHandlers, HasMouseOutHandlers, HasMouseOverHandlers, 17 | HasMouseMoveHandlers, HasMouseWheelHandlers{ 18 | 19 | } 20 | -------------------------------------------------------------------------------- /lib/src/event/has_all_touch_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * This is a convenience interface that includes all touch handlers defined by 8 | * the core GWT system. 9 | *

10 | * WARNING, PLEASE READ: As this interface is intended for developers who wish 11 | * to handle all touch events in GWT, new touch event handlers will be added to 12 | * it. Therefore, updates can cause breaking API changes. 13 | *

14 | */ 15 | abstract class HasAllTouchHandlers implements HasTouchStartHandlers, 16 | HasTouchMoveHandlers, HasTouchEndHandlers, HasTouchCancelHandlers { 17 | 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/event/has_animation.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A {@link Widget} that uses an animation should implement this class so users 8 | * can enable or disable animations. 9 | */ 10 | abstract class HasAnimation { 11 | 12 | /** 13 | * Returns true if animations are enabled, false if not. 14 | */ 15 | bool isAnimationEnabled(); 16 | 17 | /** 18 | * Enable or disable animations. 19 | * 20 | * @param enable true to enable, false to disable 21 | */ 22 | void setAnimationEnabled(bool enable); 23 | } 24 | -------------------------------------------------------------------------------- /lib/src/event/has_attach_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | abstract class HasAttachHandlers extends HasHandlers { 7 | /** 8 | * Adds an {@link AttachEvent} handler. 9 | * 10 | * @param handler the handler 11 | * @return the handler registration 12 | */ 13 | HandlerRegistration addAttachHandler(AttachEventHandler handler); 14 | 15 | /** 16 | * Returns whether or not the receiver is attached to the 17 | * {@link com.google.gwt.dom.client.Document Document}'s 18 | * {@link com.google.gwt.dom.client.BodyElement BodyElement}. 19 | * 20 | * @return true if attached, false otherwise 21 | */ 22 | bool isAttached(); 23 | } 24 | -------------------------------------------------------------------------------- /lib/src/event/has_before_selection_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface is a public source of 8 | * {@link BeforeSelectionEvent} events. 9 | * 10 | * @param the type about to be selected 11 | */ 12 | abstract class HasBeforeSelectionHandlers extends HasHandlers { 13 | 14 | /** 15 | * Adds a {@link BeforeSelectionEvent} handler. 16 | * 17 | * @param handler the handler 18 | * @return the registration for the event 19 | */ 20 | HandlerRegistration addBeforeSelectionHandler(BeforeSelectionHandler handler); 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/event/has_blur_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface provides registration for 8 | * {@link BlurHandler} instances. 9 | */ 10 | abstract class HasBlurHandlers extends HasHandlers { 11 | /** 12 | * Adds a {@link BlurEvent} handler. 13 | * 14 | * @param handler the blur handler 15 | * @return {@link HandlerRegistration} used to remove this handler 16 | */ 17 | HandlerRegistration addBlurHandler(BlurHandler handler); 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/event/has_change_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface provides registration for 8 | * {@link ChangeHandler} instances. 9 | */ 10 | abstract class HasChangeHandlers extends HasHandlers { 11 | 12 | /** 13 | * Adds a {@link ChangeEvent} handler. 14 | * 15 | * @param handler the change handler 16 | * @return {@link HandlerRegistration} used to remove this handler 17 | */ 18 | HandlerRegistration addChangeHandler(ChangeHandler handler); 19 | } 20 | -------------------------------------------------------------------------------- /lib/src/event/has_click_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface provides registration for 8 | * {@link ClickHandler} instances. 9 | */ 10 | abstract class HasClickHandlers implements HasHandlers { 11 | 12 | /** 13 | * Adds a {@link ClickEvent} handler. 14 | * 15 | * @param handler the click handler 16 | * @return {@link HandlerRegistration} used to remove this handler 17 | */ 18 | HandlerRegistration addClickHandler(ClickHandler handler); 19 | } 20 | -------------------------------------------------------------------------------- /lib/src/event/has_constrained_value.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Implemented by widgets that pick from a set of values. 8 | *

9 | * It is up to the implementation to decide (and document) how to behave when 10 | * {@link #setValue(Object)} is called with a value that is not in the 11 | * acceptable set. For example, throwing an {@link IllegalArgumentException}, or 12 | * quietly adding the value to the acceptable set, are both reasonable choices. 13 | * 14 | * @param the type of value 15 | */ 16 | abstract class HasConstrainedValue extends HasValue { 17 | 18 | /** 19 | * Set the acceptable values. 20 | * 21 | * @param values the acceptible values 22 | */ 23 | void setAcceptableValues(Iterable values); 24 | } -------------------------------------------------------------------------------- /lib/src/event/has_double_click_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface provides registration for 8 | * {@link DoubleClickHandler} instances. 9 | */ 10 | abstract class HasDoubleClickHandlers extends HasHandlers { 11 | /** 12 | * Adds a {@link DoubleClickEvent} handler. 13 | * 14 | * @param handler the double click handler 15 | * @return {@link HandlerRegistration} used to remove this handler 16 | */ 17 | HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler); 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/event/has_drag_end_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface provides registration for 8 | * {@link DragEndHandler} instances. 9 | * 10 | *

11 | * Experimental API: This API is still under development 12 | * and is subject to change. 13 | *

14 | */ 15 | abstract class HasDragEndHandlers extends HasHandlers { 16 | /** 17 | * Adds a {@link DragEndEvent} handler. 18 | * 19 | * @param handler the drag end handler 20 | * @return {@link HandlerRegistration} used to remove this handler 21 | */ 22 | HandlerRegistration addDragEndHandler(DragEndHandler handler); 23 | } 24 | -------------------------------------------------------------------------------- /lib/src/event/has_drag_enter_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface provides registration for 8 | * {@link DragEnterHandler} instances. 9 | * 10 | *

11 | * Experimental API: This API is still under development 12 | * and is subject to change. 13 | * 14 | *

15 | */ 16 | abstract class HasDragEnterHandlers extends HasHandlers { 17 | /** 18 | * Adds a {@link DragEnterEvent} handler. 19 | * 20 | * @param handler the drag end handler 21 | * @return {@link HandlerRegistration} used to remove this handler 22 | */ 23 | HandlerRegistration addDragEnterHandler(DragEnterHandler handler); 24 | } 25 | -------------------------------------------------------------------------------- /lib/src/event/has_drag_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface provides registration for 8 | * {@link DragLeaveHandler} instances. 9 | * 10 | *

11 | * Experimental API: This API is still under development 12 | * and is subject to change. 13 | * 14 | *

15 | */ 16 | abstract class HasDragHandlers extends HasHandlers { 17 | 18 | /** 19 | * Adds a {@link DragEvent} handler. 20 | * 21 | * @param handler the drag handler 22 | * @return {@link HandlerRegistration} used to remove this handler 23 | */ 24 | HandlerRegistration addDragHandler(DragHandler handler); 25 | } 26 | -------------------------------------------------------------------------------- /lib/src/event/has_drag_leave_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface provides registration for 8 | * {@link DragLeaveHandler} instances. 9 | * 10 | *

11 | * Experimental API: This API is still under development 12 | * and is subject to change. 13 | * 14 | *

15 | */ 16 | abstract class HasDragLeaveHandlers extends HasHandlers { 17 | /** 18 | * Adds a {@link DragLeaveEvent} handler. 19 | * 20 | * @param handler the drag leave handler 21 | * @return {@link HandlerRegistration} used to remove this handler 22 | */ 23 | HandlerRegistration addDragLeaveHandler(DragLeaveHandler handler); 24 | } 25 | -------------------------------------------------------------------------------- /lib/src/event/has_drag_over_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface provides registration for 8 | * {@link DragOverHandler} instances. 9 | * 10 | *

11 | * Experimental API: This API is still under development 12 | * and is subject to change. 13 | * 14 | *

15 | */ 16 | abstract class HasDragOverHandlers extends HasHandlers { 17 | /** 18 | * Adds a {@link DragOverEvent} handler. 19 | * 20 | * @param handler the drag over handler 21 | * @return {@link HandlerRegistration} used to remove this handler 22 | */ 23 | HandlerRegistration addDragOverHandler(DragOverHandler handler); 24 | } 25 | -------------------------------------------------------------------------------- /lib/src/event/has_drag_start_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface provides registration for 8 | * {@link DragStartHandler} instances. 9 | * 10 | *

11 | * Experimental API: This API is still under development 12 | * and is subject to change. 13 | *

14 | */ 15 | abstract class HasDragStartHandlers extends HasHandlers { 16 | /** 17 | * Adds a {@link DragStartEvent} handler. 18 | * 19 | * @param handler the drag start handler 20 | * @return {@link HandlerRegistration} used to remove this handler 21 | */ 22 | HandlerRegistration addDragStartHandler(DragStartHandler handler); 23 | } 24 | -------------------------------------------------------------------------------- /lib/src/event/has_drop_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface provides registration for 8 | * {@link DropHandler} instances. 9 | * 10 | *

11 | * Experimental API: This API is still under development 12 | * and is subject to change. 13 | * 14 | *

15 | */ 16 | abstract class HasDropHandlers extends HasHandlers { 17 | /** 18 | * Adds a {@link DropEvent} handler. 19 | * 20 | * @param handler the drop handler 21 | * @return {@link HandlerRegistration} used to remove this handler 22 | */ 23 | HandlerRegistration addDropHandler(DropHandler handler); 24 | } 25 | -------------------------------------------------------------------------------- /lib/src/event/has_enabled.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface can be put in an "enabled" 8 | * or "disabled" state. 9 | */ 10 | abstract class HasEnabled { 11 | 12 | /** 13 | * Returns true if the widget is enabled, false if not. 14 | */ 15 | bool get enabled; 16 | 17 | /** 18 | * Sets whether this widget is enabled. 19 | * 20 | * @param enabled true to enable the widget, false 21 | * to disable it 22 | */ 23 | void set enabled(bool value); 24 | } 25 | -------------------------------------------------------------------------------- /lib/src/event/has_error_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface provides registration for 8 | * {@link ErrorHandler} instances. 9 | */ 10 | abstract class HasErrorHandlers extends HasHandlers { 11 | /** 12 | * Adds an {@link ErrorEvent} handler. 13 | * 14 | * @param handler the error handler 15 | * @return {@link HandlerRegistration} used to remove this handler 16 | */ 17 | HandlerRegistration addErrorHandler(ErrorHandler handler); 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/event/has_focus_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface provides registration for 8 | * {@link FocusHandler} instances. 9 | */ 10 | abstract class HasFocusHandlers extends HasHandlers { 11 | 12 | /** 13 | * Adds a {@link FocusEvent} handler. 14 | * 15 | * @param handler the focus handler 16 | * @return {@link HandlerRegistration} used to remove this handler 17 | */ 18 | HandlerRegistration addFocusHandler(FocusHandler handler); 19 | } 20 | -------------------------------------------------------------------------------- /lib/src/event/has_gesture_change_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface provides registration for 8 | * {@link GestureChangeHandler} instances. 9 | */ 10 | abstract class HasGestureChangeHandlers extends HasHandlers { 11 | 12 | } 13 | -------------------------------------------------------------------------------- /lib/src/event/has_gesture_end_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface provides registration for 8 | * {@link GestureEndHandler} instances. 9 | */ 10 | abstract class HasGestureEndHandlers extends HasHandlers { 11 | 12 | } 13 | -------------------------------------------------------------------------------- /lib/src/event/has_gesture_start_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface provides registration for 8 | * {@link GestureStartHandler} instances. 9 | */ 10 | abstract class HasGestureStartHandlers extends HasHandlers { 11 | 12 | } 13 | -------------------------------------------------------------------------------- /lib/src/event/has_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * An object that implements this interface has a collection of event handlers 8 | * associated with it. 9 | */ 10 | abstract class HasHandlers { 11 | 12 | /** 13 | * Fires the given event to the handlers listening to the event's type. 14 | * 15 | * Any exceptions thrown by handlers will be bundled into a 16 | * [UmbrellaException] and then re-thrown after all handlers have 17 | * completed. An exception thrown by a handler will not prevent other handlers 18 | * from executing. 19 | * 20 | * @param event the event 21 | */ 22 | void fireEvent(DwtEvent event); 23 | } 24 | -------------------------------------------------------------------------------- /lib/src/event/has_key_down_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface provides registration for 8 | * {@link KeyDownHandler} instances. 9 | */ 10 | abstract class HasKeyDownHandlers extends HasHandlers { 11 | /** 12 | * Adds a {@link KeyDownEvent} handler. 13 | * 14 | * @param handler the key down handler 15 | * @return {@link HandlerRegistration} used to remove this handler 16 | */ 17 | HandlerRegistration addKeyDownHandler(KeyDownHandler handler); 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/event/has_key_press_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface provides registration for 8 | * {@link KeyPressHandler} instances. 9 | */ 10 | abstract class HasKeyPressHandlers extends HasHandlers { 11 | /** 12 | * Adds a {@link KeyPressEvent} handler. 13 | * 14 | * @param handler the key press handler 15 | * @return {@link HandlerRegistration} used to remove this handler 16 | */ 17 | HandlerRegistration addKeyPressHandler(KeyPressHandler handler); 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/event/has_key_up_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface provides registration for 8 | * {@link KeyUpHandler} instances. 9 | */ 10 | abstract class HasKeyUpHandlers extends HasHandlers { 11 | 12 | /** 13 | * Adds a {@link KeyUpEvent} handler. 14 | * 15 | * @param handler the key up handler 16 | * @return {@link HandlerRegistration} used to remove this handler 17 | */ 18 | HandlerRegistration addKeyUpHandler(KeyUpHandler handler); 19 | } 20 | -------------------------------------------------------------------------------- /lib/src/event/has_load_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface provides registration for 8 | * {@link LoadHandler} instances. 9 | */ 10 | abstract class HasLoadHandlers extends HasHandlers { 11 | /** 12 | * Adds a {@link LoadEvent} handler. 13 | * 14 | * @param handler the load handler 15 | * @return {@link HandlerRegistration} used to remove this handler 16 | */ 17 | HandlerRegistration addLoadHandler(LoadHandler handler); 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/event/has_mouse_down_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface provides registration for 8 | * {@link MouseDownHandler} instances. 9 | */ 10 | abstract class HasMouseDownHandlers extends HasHandlers { 11 | 12 | /** 13 | * Adds a {@link MouseDownEvent} handler. 14 | * 15 | * @param handler the mouse down handler 16 | * @return {@link HandlerRegistration} used to remove this handler 17 | */ 18 | HandlerRegistration addMouseDownHandler(MouseDownHandler handler); 19 | } 20 | -------------------------------------------------------------------------------- /lib/src/event/has_mouse_move_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface provides registration for 8 | * {@link MouseMoveHandler} instances. 9 | */ 10 | abstract class HasMouseMoveHandlers extends HasHandlers { 11 | /** 12 | * Adds a {@link MouseMoveEvent} handler. 13 | * 14 | * @param handler the mouse move handler 15 | * @return {@link HandlerRegistration} used to remove this handler 16 | */ 17 | HandlerRegistration addMouseMoveHandler(MouseMoveHandler handler); 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/event/has_mouse_out_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface provides registration for 8 | * {@link MouseOutHandler} instances. 9 | */ 10 | abstract class HasMouseOutHandlers extends HasHandlers { 11 | /** 12 | * Adds a {@link MouseOutEvent} handler. 13 | * 14 | * @param handler the mouse out handler 15 | * @return {@link HandlerRegistration} used to remove this handler 16 | */ 17 | HandlerRegistration addMouseOutHandler(MouseOutHandler handler); 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/event/has_mouse_over_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface provides registration for 8 | * {@link MouseOverHandler} instances. 9 | */ 10 | abstract class HasMouseOverHandlers extends HasHandlers { 11 | /** 12 | * Adds a {@link MouseOverEvent} handler. 13 | * 14 | * @param handler the mouse over handler 15 | * @return {@link HandlerRegistration} used to remove this handler 16 | */ 17 | HandlerRegistration addMouseOverHandler(MouseOverHandler handler); 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/event/has_mouse_up_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface provides registration for 8 | * {@link MouseUpHandler} instances. 9 | */ 10 | abstract class HasMouseUpHandlers extends HasHandlers { 11 | /** 12 | * Adds a {@link MouseUpEvent} handler. 13 | * 14 | * @param handler the mouse up handler 15 | * @return {@link HandlerRegistration} used to remove this handler 16 | */ 17 | HandlerRegistration addMouseUpHandler(MouseUpHandler handler); 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/event/has_mouse_wheel_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface provides registration for 8 | * {@link MouseWheelHandler} instances. 9 | */ 10 | abstract class HasMouseWheelHandlers extends HasHandlers { 11 | /** 12 | * Adds a {@link MouseWheelEvent} handler. 13 | * 14 | * @param handler the mouse wheel handler 15 | * @return {@link HandlerRegistration} used to remove this handler 16 | */ 17 | HandlerRegistration addMouseWheelHandler(MouseWheelHandler handler); 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/event/has_name.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface has a 'name' associated with it, 8 | * allowing it to be used with {@link FormPanel}. This property is the name 9 | * that will be associated with the widget when its form is submitted. 10 | */ 11 | abstract class HasName { 12 | 13 | /** 14 | * Sets the widget's name. 15 | * 16 | * @param name the widget's new name 17 | */ 18 | void set name(String value); 19 | 20 | /** 21 | * Gets the widget's name. 22 | * 23 | * @return the widget's name 24 | */ 25 | String get name; 26 | } 27 | -------------------------------------------------------------------------------- /lib/src/event/has_native_event.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * An object that implements this interface has a native event associated with 8 | * it. 9 | */ 10 | abstract class HasNativeEvent { 11 | /** 12 | * Gets the underlying native event. 13 | * 14 | * @return the native event 15 | */ 16 | dart_html.Event getNativeEvent(); 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/event/has_open_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface is a public source of 8 | * {@link OpenEvent} events. 9 | * 10 | * @param the type being opened 11 | */ 12 | abstract class HasOpenHandlers extends HasHandlers { 13 | /** 14 | * Adds an {@link OpenEvent} handler. 15 | * 16 | * @param handler the handler 17 | * @return the registration for the event 18 | */ 19 | HandlerRegistration addOpenHandler(OpenHandler handler); 20 | } 21 | -------------------------------------------------------------------------------- /lib/src/event/has_resize_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface is a public source of 8 | * {@link ResizeEvent} events. 9 | */ 10 | abstract class HasResizeHandlers extends HasHandlers { 11 | 12 | /** 13 | * Adds a {@link ResizeEvent} handler. 14 | * 15 | * @param handler the handler 16 | * @return the handler registration 17 | */ 18 | HandlerRegistration addResizeHandler(ResizeHandler handler); 19 | } 20 | -------------------------------------------------------------------------------- /lib/src/event/has_safe_html.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * An object that implements this interface contains text with HTML markup, 8 | * which can be set with the Cross-Site-Scripting-safe HTML markup encapsulated 9 | * in a {@link com.google.gwt.safehtml.shared.SafeHtml} object. 10 | */ 11 | abstract class HasSafeHtml { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /lib/src/event/has_scroll_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface provides registration for 8 | * {@link ScrollHandler} instances. 9 | */ 10 | abstract class HasScrollHandlers extends HasHandlers { 11 | 12 | /** 13 | * Adds a {@link ScrollEvent} handler. 14 | * 15 | * @param handler the scroll handler 16 | * @return {@link HandlerRegistration} used to remove this handler 17 | */ 18 | HandlerRegistration addScrollHandler(ScrollHandler handler); 19 | } 20 | -------------------------------------------------------------------------------- /lib/src/event/has_selection_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface is a public source of 8 | * {@link SelectionEvent} events. 9 | * 10 | * @param the type being selected 11 | */ 12 | abstract class HasSelectionHandlers extends HasHandlers { 13 | /** 14 | * Adds a {@link SelectionEvent} handler. 15 | * 16 | * @param handler the handler 17 | * @return the registration for the event 18 | */ 19 | HandlerRegistration addSelectionHandler(SelectionHandler handler); 20 | } 21 | -------------------------------------------------------------------------------- /lib/src/event/has_text.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * An object that implements this interface contains text, which can be set and 8 | * retrieved using these methods. 9 | * 10 | *

Use in UiBinder Templates

11 | *

12 | * The body of an XML element representing a widget that implements 13 | * HasText will be parsed as text and be used in a call to its 14 | * {@link #setText(String)} method. HasText elements must only 15 | * contain text. (This behavior is overridden for {@link HasHTML} 16 | * widgets.) 17 | * 18 | *

For example:

19 |  * <g:Label>Hello.</g:Label>
20 |  * 
21 | */ 22 | abstract class HasText { 23 | 24 | /** 25 | * Gets this object's text. 26 | * 27 | * @return the object's text 28 | */ 29 | String get text; 30 | 31 | /** 32 | * Sets this object's text. 33 | * 34 | * @param text the object's new text 35 | */ 36 | void set text(String value); 37 | } 38 | -------------------------------------------------------------------------------- /lib/src/event/has_touch_cancel_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface provides registration for 8 | * {@link TouchCancelHandler} instances. 9 | */ 10 | abstract class HasTouchCancelHandlers extends HasHandlers { 11 | /** 12 | * Adds a {@link TouchCancelEvent} handler. 13 | * 14 | * @param handler the touch cancel handler 15 | * @return {@link HandlerRegistration} used to remove this handler 16 | */ 17 | HandlerRegistration addTouchCancelHandler(TouchCancelHandler handler); 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/event/has_touch_end_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface provides registration for 8 | * {@link TouchEndHandler} instances. 9 | */ 10 | abstract class HasTouchEndHandlers extends HasHandlers { 11 | /** 12 | * Adds a {@link TouchEndEvent} handler. 13 | * 14 | * @param handler the touch end handler 15 | * @return {@link HandlerRegistration} used to remove this handler 16 | */ 17 | HandlerRegistration addTouchEndHandler(TouchEndHandler handler); 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/event/has_touch_move_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface provides registration for 8 | * {@link TouchMoveHandler} instances. 9 | */ 10 | abstract class HasTouchMoveHandlers extends HasHandlers { 11 | /** 12 | * Adds a {@link TouchMoveEvent} handler. 13 | * 14 | * @param handler the touch move handler 15 | * @return {@link HandlerRegistration} used to remove this handler 16 | */ 17 | HandlerRegistration addTouchMoveHandler(TouchMoveHandler handler); 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/event/has_touch_start_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface provides registration for 8 | * {@link TouchStartHandler} instances. 9 | */ 10 | abstract class HasTouchStartHandlers extends HasHandlers { 11 | /** 12 | * Adds a {@link TouchStartEvent} handler. 13 | * 14 | * @param handler the touch start handler 15 | * @return {@link HandlerRegistration} used to remove this handler 16 | */ 17 | HandlerRegistration addTouchStartHandler(TouchStartHandler handler); 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/event/has_value_change_handlers.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface is a public source of 8 | * {@link ValueChangeEvent} events. 9 | * 10 | * @param the value about to be changed 11 | */ 12 | abstract class HasValueChangeHandlers extends HasHandlers { 13 | 14 | /** 15 | * Adds a {@link ValueChangeEvent} handler. 16 | * 17 | * @param handler the handler 18 | * @return the registration for the event 19 | */ 20 | HandlerRegistration addValueChangeHandler(ValueChangeHandler handler); 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/event/has_visibility.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Implemented by objects that have the visibility trait. 8 | */ 9 | abstract class HasVisibility { 10 | 11 | /** 12 | * Determines whether or not this object is visible. Note that this does not 13 | * necessarily take into account whether or not the receiver's parent is 14 | * visible, or even if it is attached to the 15 | * Document. The default implementation of this trait in UIObject is 16 | * based on the value of a dom element's style object's display attribute. 17 | * 18 | * @return true if the object is visible 19 | */ 20 | bool get visible; 21 | 22 | /** 23 | * Sets whether this object is visible. 24 | * 25 | * @param visible true to show the object, false to 26 | * hide it 27 | */ 28 | void set visible(bool visible); 29 | } 30 | -------------------------------------------------------------------------------- /lib/src/event/has_word_wrap.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * A widget that implements this interface has a 'word-wrap' property that can 8 | * be manipulated using these methods. 9 | */ 10 | abstract class HasWordWrap { 11 | 12 | /** 13 | * Gets whether word-wrapping is enabled. 14 | * 15 | * @return true if word-wrapping is enabled. 16 | */ 17 | bool get wordWrap; 18 | 19 | /** 20 | * Sets whether word-wrapping is enabled. 21 | * 22 | * @param wrap true to enable word-wrapping. 23 | */ 24 | void set wordWrap(bool wrap); 25 | } 26 | -------------------------------------------------------------------------------- /lib/src/event/key_down_event.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Represents a native key down event. 8 | */ 9 | class KeyDownEvent extends KeyCodeEvent { 10 | 11 | /** 12 | * The event type. 13 | */ 14 | static DomEventType TYPE = new DomEventType(BrowserEvents.KEYDOWN, new KeyDownEvent()); 15 | 16 | DomEventType getAssociatedType() { 17 | return TYPE; 18 | } 19 | 20 | KeyDownEvent(); 21 | 22 | void dispatch(KeyDownHandler handler) { 23 | handler.onKeyDown(this); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/src/event/key_down_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link KeyDownEvent} events. 8 | */ 9 | abstract class KeyDownHandler extends EventHandler { 10 | 11 | /** 12 | * Called when {@link KeyDownEvent} is fired. 13 | * 14 | * @param event the {@link KeyDownEvent} that was fired 15 | */ 16 | void onKeyDown(KeyDownEvent event); 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/event/key_press_event.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Represents a native key press event. 8 | */ 9 | class KeyPressEvent extends KeyCodeEvent { 10 | 11 | /** 12 | * The event type. 13 | */ 14 | static DomEventType TYPE = new DomEventType(BrowserEvents.KEYPRESS, new KeyPressEvent()); 15 | 16 | DomEventType getAssociatedType() { 17 | return TYPE; 18 | } 19 | 20 | KeyPressEvent(); 21 | 22 | void dispatch(KeyPressHandler handler) { 23 | handler.onKeyPress(this); 24 | } 25 | 26 | /** 27 | * Gets the Unicode char code (code point) for this event. 28 | * 29 | * @return the Unicode char code 30 | */ 31 | int getUnicodeCharCode() { 32 | return getKeyboardEvent().charCode; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /lib/src/event/key_press_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link KeyPressEvent} events. 8 | */ 9 | abstract class KeyPressHandler extends EventHandler { 10 | 11 | /** 12 | * Called when KeyPressEvent is fired. 13 | * 14 | * @param event the {@link KeyPressEvent} that was fired 15 | */ 16 | void onKeyPress(KeyPressEvent event); 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/event/key_up_event.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Represents a native key up event. 8 | */ 9 | class KeyUpEvent extends KeyCodeEvent { 10 | 11 | /** 12 | * The event type. 13 | */ 14 | static DomEventType TYPE = new DomEventType(BrowserEvents.KEYUP, new KeyUpEvent()); 15 | 16 | DomEventType getAssociatedType() { 17 | return TYPE; 18 | } 19 | 20 | KeyUpEvent(); 21 | 22 | void dispatch(KeyUpHandler handler) { 23 | handler.onKeyUp(this); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/src/event/key_up_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link KeyUpEvent} events. 8 | */ 9 | abstract class KeyUpHandler extends EventHandler { 10 | 11 | /** 12 | * Called when KeyUpEvent is fired. 13 | * 14 | * @param event the {@link KeyUpEvent} that was fired 15 | */ 16 | void onKeyUp(KeyUpEvent event); 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/event/load_event.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Represents a native load event. 8 | */ 9 | class LoadEvent extends DomEvent { 10 | 11 | /** 12 | * The event type. 13 | */ 14 | static DomEventType TYPE = new DomEventType(BrowserEvents.LOAD, new LoadEvent()); 15 | 16 | DomEventType getAssociatedType() { 17 | return TYPE; 18 | } 19 | 20 | LoadEvent(); 21 | 22 | void dispatch(LoadHandler handler) { 23 | handler.onLoad(this); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/src/event/load_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link LoadEvent} events. 8 | */ 9 | abstract class LoadHandler extends EventHandler { 10 | 11 | /** 12 | * Called when LoadEvent is fired. 13 | * 14 | * @param event the {@link LoadEvent} that was fired 15 | */ 16 | void onLoad(LoadEvent event); 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/event/mouse_down_event.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Represents a native mouse down event. 8 | */ 9 | class MouseDownEvent extends MouseEvent { 10 | 11 | /** 12 | * The event type. 13 | */ 14 | static DomEventType TYPE = new DomEventType(BrowserEvents.MOUSEDOWN, new MouseDownEvent()); 15 | 16 | DomEventType getAssociatedType() { 17 | return TYPE; 18 | } 19 | 20 | MouseDownEvent(); 21 | 22 | void dispatch(MouseDownHandler handler) { 23 | handler.onMouseDown(this); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /lib/src/event/mouse_down_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link MouseDownEvent} events. 8 | */ 9 | abstract class MouseDownHandler extends EventHandler { 10 | 11 | /** 12 | * Called when MouseDown is fired. 13 | * 14 | * @param event the {@link MouseDownEvent} that was fired 15 | */ 16 | void onMouseDown(MouseDownEvent event); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/event/mouse_move_event.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Represents a native mouse move event. 8 | */ 9 | class MouseMoveEvent extends MouseEvent { 10 | 11 | /** 12 | * The event type. 13 | */ 14 | static DomEventType TYPE = new DomEventType(BrowserEvents.MOUSEMOVE, new MouseMoveEvent()); 15 | 16 | DomEventType getAssociatedType() { 17 | return TYPE; 18 | } 19 | 20 | MouseMoveEvent(); 21 | 22 | void dispatch(MouseMoveHandler handler) { 23 | handler.onMouseMove(this); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /lib/src/event/mouse_move_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link MouseMoveEvent} events. 8 | */ 9 | abstract class MouseMoveHandler extends EventHandler { 10 | 11 | /** 12 | * Called when MouseMoveEvent is fired. 13 | * 14 | * @param event the {@link MouseMoveEvent} that was fired 15 | */ 16 | void onMouseMove(MouseMoveEvent event); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/event/mouse_out_event.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Represents a native mouse out event. 8 | */ 9 | class MouseOutEvent extends MouseEvent { 10 | /** 11 | * The event type. 12 | */ 13 | static DomEventType TYPE = new DomEventType(BrowserEvents.MOUSEOUT, new MouseOutEvent()); 14 | 15 | DomEventType getAssociatedType() { 16 | return TYPE; 17 | } 18 | 19 | MouseOutEvent(); 20 | 21 | void dispatch(MouseOutHandler handler) { 22 | handler.onMouseOut(this); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/src/event/mouse_out_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link MouseOutEvent} events. 8 | */ 9 | abstract class MouseOutHandler extends EventHandler { 10 | 11 | /** 12 | * Called when MouseOutEvent is fired. 13 | * 14 | * @param event the {@link MouseOutEvent} that was fired 15 | */ 16 | void onMouseOut(MouseOutEvent event); 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/event/mouse_over_event.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Represents a native mouse over event. 8 | */ 9 | class MouseOverEvent extends MouseEvent { 10 | 11 | /** 12 | * The event type. 13 | */ 14 | static DomEventType TYPE = new DomEventType(BrowserEvents.MOUSEOVER, new MouseOverEvent()); 15 | 16 | DomEventType getAssociatedType() { 17 | return TYPE; 18 | } 19 | 20 | MouseOverEvent(); 21 | 22 | void dispatch(MouseOverHandler handler) { 23 | handler.onMouseOver(this); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/src/event/mouse_over_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link MouseOverEvent} events. 8 | */ 9 | abstract class MouseOverHandler extends EventHandler { 10 | 11 | /** 12 | * Called when MouseOverEvent is fired. 13 | * 14 | * @param event the {@link MouseOverEvent} that was fired 15 | */ 16 | void onMouseOver(MouseOverEvent event); 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/event/mouse_up_event.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Represents a native mouse up event. 8 | */ 9 | class MouseUpEvent extends MouseEvent { 10 | 11 | /** 12 | * The event type. 13 | */ 14 | static DomEventType TYPE = new DomEventType(BrowserEvents.MOUSEUP, new MouseUpEvent()); 15 | 16 | DomEventType getAssociatedType() { 17 | return TYPE; 18 | } 19 | 20 | MouseUpEvent(); 21 | 22 | void dispatch(MouseUpHandler handler) { 23 | handler.onMouseUp(this); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /lib/src/event/mouse_up_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link MouseUpEvent} events. 8 | */ 9 | abstract class MouseUpHandler extends EventHandler { 10 | 11 | /** 12 | * Called when MouseUpEvent is fired. 13 | * 14 | * @param event the {@link MouseUpEvent} that was fired 15 | */ 16 | void onMouseUp(MouseUpEvent event); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/event/mouse_wheel_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link MouseWheelEvent} events. 8 | */ 9 | abstract class MouseWheelHandler extends EventHandler { 10 | 11 | /** 12 | * Called when MouseWheelEvent is fired. 13 | * 14 | * @param event the {@link MouseWheelEvent} that was fired 15 | */ 16 | void onMouseWheel(MouseWheelEvent event); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/event/native_preview_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link NativePreviewEvent} events. 8 | */ 9 | abstract class NativePreviewHandler extends EventHandler { 10 | /** 11 | * Called when {@link NativePreviewEvent} is fired. 12 | * 13 | * @param event the {@link NativePreviewEvent} that was fired 14 | */ 15 | void onPreviewNativeEvent(NativePreviewEvent event); 16 | } 17 | -------------------------------------------------------------------------------- /lib/src/event/open_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link OpenEvent} events. 8 | * 9 | * @param the type being opened 10 | */ 11 | abstract class OpenHandler extends EventHandler { 12 | 13 | /** 14 | * Called when {@link OpenEvent} is fired. 15 | * 16 | * @param event the {@link OpenEvent} that was fired 17 | */ 18 | void onOpen(OpenEvent event); 19 | } 20 | -------------------------------------------------------------------------------- /lib/src/event/resize_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler for {@link ResizeEvent} events. 8 | */ 9 | abstract class ResizeHandler extends EventHandler { 10 | /** 11 | * Fired when the widget is resized. 12 | * 13 | * @param event the event 14 | */ 15 | void onResize(ResizeEvent event); 16 | } 17 | -------------------------------------------------------------------------------- /lib/src/event/scroll_event.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Represents a native scroll event. 8 | */ 9 | class ScrollEvent extends DomEvent { 10 | 11 | /** 12 | * The event type. 13 | */ 14 | static DomEventType TYPE = new DomEventType(BrowserEvents.SCROLL, new ScrollEvent()); 15 | 16 | DomEventType getAssociatedType() { 17 | return TYPE; 18 | } 19 | 20 | ScrollEvent(); 21 | 22 | void dispatch(ScrollHandler handler) { 23 | handler.onScroll(this); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/src/event/scroll_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link ScrollEvent} events. 8 | */ 9 | abstract class ScrollHandler extends EventHandler { 10 | 11 | /** 12 | * Called when ScrollEvent is fired. 13 | * 14 | * @param event the {@link ScrollEvent} that was fired 15 | */ 16 | void onScroll(ScrollEvent event); 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/event/selection_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link SelectionEvent} events. 8 | * 9 | * @param the type being selected 10 | */ 11 | abstract class SelectionHandler extends EventHandler { 12 | /** 13 | * Called when {@link SelectionEvent} is fired. 14 | * 15 | * @param event the {@link SelectionEvent} that was fired 16 | */ 17 | void onSelection(SelectionEvent event); 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/event/takes_value.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Implemented by objects that hold a value. 8 | * 9 | * @param value type 10 | */ 11 | abstract class TakesValue { 12 | 13 | /** 14 | * Sets the value. 15 | * Fires [ValueChangeEvent] when 16 | * fireEvents is true and the new value does not equal the existing value. 17 | * 18 | * @param value a value object of type V 19 | * @see #getValue() 20 | * @param fireEvents fire events if true and value is new 21 | */ 22 | void setValue(V val, [bool fireEvents = false]); 23 | 24 | /** 25 | * Returns the current value. 26 | * 27 | * @return the value as an object of type V 28 | * @see #setValue 29 | */ 30 | V getValue(); 31 | } 32 | -------------------------------------------------------------------------------- /lib/src/event/touch_cancel_event.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Represents a native touch start event. 8 | */ 9 | class TouchCancelEvent extends TouchEvent { 10 | 11 | /** 12 | * The event type. 13 | */ 14 | static DomEventType TYPE = new DomEventType(BrowserEvents.TOUCHCANCEL, new TouchCancelEvent()); 15 | 16 | DomEventType getAssociatedType() { 17 | return TYPE; 18 | } 19 | 20 | TouchCancelEvent(); 21 | 22 | void dispatch(TouchCancelHandler handler) { 23 | handler.onTouchCancel(this); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/src/event/touch_cancel_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link TouchCancelEvent} events. 8 | */ 9 | abstract class TouchCancelHandler extends EventHandler { 10 | 11 | /** 12 | * Called when TouchCancelEvent is fired. 13 | * 14 | * @param event the {@link TouchCancelEvent} that was fired 15 | */ 16 | void onTouchCancel(TouchCancelEvent event); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/event/touch_end_event.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Represents a native touch end event. 8 | */ 9 | class TouchEndEvent extends TouchEvent { 10 | 11 | /** 12 | * The event type. 13 | */ 14 | static DomEventType TYPE = new DomEventType(BrowserEvents.TOUCHEND, new TouchEndEvent()); 15 | 16 | DomEventType getAssociatedType() { 17 | return TYPE; 18 | } 19 | 20 | TouchEndEvent(); 21 | 22 | void dispatch(TouchEndHandler handler) { 23 | handler.onTouchEnd(this); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /lib/src/event/touch_end_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link TouchEndEvent} events. 8 | */ 9 | abstract class TouchEndHandler extends EventHandler { 10 | 11 | /** 12 | * Called when TouchEndEvent is fired. 13 | * 14 | * @param event the {@link TouchEndEvent} that was fired 15 | */ 16 | void onTouchEnd(TouchEndEvent event); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/event/touch_move_event.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Represents a native touch move event. 8 | */ 9 | class TouchMoveEvent extends TouchEvent { 10 | 11 | /** 12 | * The event type. 13 | */ 14 | static DomEventType TYPE = new DomEventType(BrowserEvents.TOUCHMOVE, new TouchMoveEvent()); 15 | 16 | DomEventType getAssociatedType() { 17 | return TYPE; 18 | } 19 | 20 | TouchMoveEvent(); 21 | 22 | void dispatch(TouchMoveHandler handler) { 23 | handler.onTouchMove(this); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /lib/src/event/touch_move_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link TouchMoveEvent} events. 8 | */ 9 | abstract class TouchMoveHandler extends EventHandler { 10 | 11 | /** 12 | * Called when TouchMoveEvent is fired. 13 | * 14 | * @param event the {@link TouchMoveEvent} that was fired 15 | */ 16 | void onTouchMove(TouchMoveEvent event); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/event/touch_start_event.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Represents a native touch start event. 8 | */ 9 | class TouchStartEvent extends TouchEvent { 10 | 11 | /** 12 | * The event type. 13 | */ 14 | static DomEventType TYPE = new DomEventType(BrowserEvents.TOUCHCANCEL, new TouchStartEvent()); 15 | 16 | DomEventType getAssociatedType() { 17 | return TYPE; 18 | } 19 | 20 | TouchStartEvent(); 21 | 22 | void dispatch(TouchStartHandler handler) { 23 | handler.onTouchStart(this); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /lib/src/event/touch_start_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Handler interface for {@link TouchStartEvent} events. 8 | */ 9 | abstract class TouchStartHandler extends EventHandler { 10 | 11 | /** 12 | * Called when TouchStartEvent is fired. 13 | * 14 | * @param event the {@link TouchStartEvent} that was fired 15 | */ 16 | void onTouchStart(TouchStartEvent event); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/event/value_change_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_event; 5 | 6 | /** 7 | * Implemented by objects that handle {@link AttachEvent}. 8 | */ 9 | abstract class ValueChangeHandler extends EventHandler { 10 | 11 | /** 12 | * Called when {@link ValueChangeEvent} is fired. 13 | * 14 | * @param event the {@link ValueChangeEvent} that was fired 15 | */ 16 | void onValueChange(ValueChangeEvent event); 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/http/header.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_http; 5 | 6 | /** 7 | * Class for describing an HTTP header. 8 | * 9 | *

Required Module

10 | * Modules that use this class should inherit 11 | * com.google.gwt.http.HTTP. 12 | * 13 | * {@gwt.include com/google/gwt/examples/http/InheritsExample.gwt.xml} 14 | */ 15 | abstract class Header { 16 | /** 17 | * Returns the name of the HTTP header. 18 | * 19 | * @return name of the HTTP header 20 | */ 21 | String getName(); 22 | 23 | /** 24 | * Returns the value of the HTTP header. 25 | * 26 | * @return value of the HTTP header 27 | */ 28 | String getValue(); 29 | } 30 | -------------------------------------------------------------------------------- /lib/src/i18n/bidi_policy.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_i18n; 5 | 6 | /** 7 | * Provides low-level functionality to determine whether to support bidi. 8 | */ 9 | class BidiPolicy { 10 | 11 | static BidiPolicyImpl impl = new BidiPolicyImpl(); 12 | 13 | /** 14 | * Returns true if bidi is enabled, false if disabled. 15 | */ 16 | static bool isBidiEnabled() { 17 | return impl.isBidiEnabled(); 18 | } 19 | } 20 | 21 | /** 22 | * Implementation class for {@link BidiPolicy}. 23 | */ 24 | class BidiPolicyImpl { 25 | bool isBidiEnabled() { 26 | return LocaleInfo.hasAnyRTL(); 27 | } 28 | } 29 | 30 | /** 31 | * Implementation class for {@link BidiPolicy} used when bidi is always on. 32 | */ 33 | class BidiPolicyImplOn extends BidiPolicyImpl { 34 | bool isBidiEnabled() { 35 | return true; 36 | } 37 | } -------------------------------------------------------------------------------- /lib/src/i18n/direction.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_i18n; 5 | 6 | /** 7 | * Possible return values for {@link HasDirection#getDirection()} and parameter values for 8 | * {@link HasDirection#setDirection(Direction)}.Widgets that implement this interface can 9 | * either have a direction that is right-to-left (RTL), left-to-right (LTR), or default 10 | * (which means that their directionality is inherited from their parent widget). 11 | */ 12 | class Direction extends Enum { 13 | 14 | const Direction(String type) : super(type); 15 | 16 | static const Direction RTL = const Direction("RTL"); 17 | static const Direction LTR = const Direction("LTR"); 18 | static const Direction DEFAULT = const Direction("DEFAULT"); 19 | } -------------------------------------------------------------------------------- /lib/src/i18n/has_alignment.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_i18n; 5 | 6 | /** 7 | * A widget that implements this interface has an intrinsic alignment which 8 | * can be manipulated using these methods and constants. 9 | */ 10 | abstract class HasAlignment implements HasHorizontalAlignment, HasVerticalAlignment { 11 | 12 | } 13 | -------------------------------------------------------------------------------- /lib/src/i18n/has_directional_html.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_i18n; 5 | 6 | /** 7 | * An object that implements this interface contains html that has a direction. 8 | */ 9 | abstract class HasDirectionalHtml implements HasDirectionalText, HasHtml { 10 | 11 | /** 12 | * Sets this object's html, also declaring its direction. 13 | * 14 | * @param html the object's new html 15 | * @param dir the html's direction 16 | */ 17 | void setHtml(String html, Direction dir); 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/i18n/has_directional_safe_html.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_i18n; 5 | 6 | /** 7 | * An object that implements this interface contains html that has a direction. 8 | */ 9 | abstract class HasDirectionalSafeHtml implements HasDirectionalText, HasSafeHtml { 10 | 11 | // /** 12 | // * Sets this object's html, also declaring its direction. 13 | // * 14 | // * @param html the object's new html 15 | // * @param dir the html's direction 16 | // */ 17 | // void setHtml(SafeHtml html, Direction dir); 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/i18n/has_directional_text.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_i18n; 5 | 6 | /** 7 | * An object that implements this interface contains text that has a direction. 8 | */ 9 | abstract class HasDirectionalText extends HasText { 10 | 11 | /** 12 | * Gets the direction of this object's text. 13 | * 14 | * @return the direction of this object's text 15 | */ 16 | Direction getTextDirection(); 17 | 18 | /** 19 | * Sets this object's text, also declaring its direction. 20 | * 21 | * @param text the object's new text 22 | * @param dir the text's direction 23 | */ 24 | void setText(String text, Direction dir); 25 | } 26 | -------------------------------------------------------------------------------- /lib/src/i18n/impl/date_time_format_info_impl.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_i18n; 5 | 6 | /** 7 | * {@link com.google.gwt.i18n.shared.DateTimeFormatInfo} implementation based on 8 | * Unicode CLDR data. 9 | */ 10 | class DateTimeFormatInfoImpl extends DefaultDateTimeFormatInfo implements Localizable { 11 | 12 | } 13 | -------------------------------------------------------------------------------- /lib/src/place/place.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_place; 5 | 6 | /** 7 | * Represents a bookmarkable location in an app. Implementations are expected to 8 | * provide correct {@link Object#equals(Object)} and {@link Object#hashCode()} 9 | * methods. 10 | */ 11 | abstract class Place { 12 | 13 | /** 14 | * The null place. 15 | */ 16 | static final Place NOWHERE = new _Place(); 17 | 18 | } 19 | 20 | class _Place implements Place { 21 | 22 | } -------------------------------------------------------------------------------- /lib/src/place/place_change_event_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_place; 5 | 6 | 7 | /** 8 | * Implemented by handlers of PlaceChangeEvent. 9 | */ 10 | abstract class PlaceChangeEventHandler extends EventHandler { 11 | /** 12 | * Called when a {@link PlaceChangeEvent} is fired. 13 | * 14 | * @param event the {@link PlaceChangeEvent} 15 | */ 16 | void onPlaceChange(PlaceChangeEvent event); 17 | } -------------------------------------------------------------------------------- /lib/src/place/place_change_request_event_handler.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_place; 5 | 6 | /** 7 | * Implemented by handlers of PlaceChangeRequestEvent. 8 | */ 9 | abstract class PlaceChangeRequestEventHandler extends EventHandler { 10 | /** 11 | * Called when a {@link PlaceChangeRequestEvent} is fired. 12 | * 13 | * @param event the {@link PlaceChangeRequestEvent} 14 | */ 15 | void onPlaceChangeRequest(PlaceChangeRequestEvent event); 16 | } 17 | -------------------------------------------------------------------------------- /lib/src/place/place_history_mapper.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_place; 5 | 6 | /** 7 | * Maps {@link Place}s to/from tokens, used to configure a 8 | * {@link PlaceHistoryHandler}. 9 | *

10 | * You can annotate subinterfaces of PlaceHistoryMapper with 11 | * {@link WithTokenizers} to have their implementation automatically generated 12 | * via a call to {@link com.google.gwt.core.shared.GWT#create(Class)}. 13 | */ 14 | abstract class PlaceHistoryMapper { 15 | 16 | /** 17 | * Returns the {@link Place} associated with the given token. 18 | * 19 | * @param token a String token 20 | * @return a {@link Place} instance 21 | */ 22 | Place getPlace(String token); 23 | 24 | /** 25 | * Returns the String token associated with the given {@link Place}. 26 | * 27 | * @param place a {@link Place} instance 28 | * @return a String token 29 | */ 30 | String getToken(Place place); 31 | } -------------------------------------------------------------------------------- /lib/src/place/place_history_mapper_with_factory.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_place; 5 | 6 | /** 7 | * A {@link PlaceHistoryMapper} that can get its {@link PlaceTokenizer} 8 | * instances from a factory. 9 | * 10 | * @param factory type 11 | */ 12 | abstract class PlaceHistoryMapperWithFactory extends PlaceHistoryMapper { 13 | 14 | /** 15 | * Sets the factory to be used to generate {@link PlaceTokenizer} instances. 16 | * 17 | * @param factory a factory of type F 18 | */ 19 | void setFactory(F factory); 20 | } -------------------------------------------------------------------------------- /lib/src/place/place_tokenizer.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_place; 5 | 6 | /** 7 | * Implemented by objects responsible for text serialization and deserialization 8 | * of Place objects. 9 | * 10 | * @param

a subtype of {@link Place} 11 | */ 12 | abstract class PlaceTokenizer

{ 13 | 14 | /** 15 | * Returns the {@link Place} associated with the given token. 16 | * 17 | * @param token a String token 18 | * @return a {@link Place} of type P 19 | */ 20 | P getPlace(String token); 21 | 22 | /** 23 | * Returns the token associated with the given {@link Place}. 24 | * 25 | * @param place a {@link Place} of type P 26 | * @return a String token 27 | */ 28 | String getToken(P place); 29 | } -------------------------------------------------------------------------------- /lib/src/resource/client_bundle.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_resource; 5 | 6 | /** 7 | * The use of this interface is similar to that of ImageBundle. Declare 8 | * no-argument functions that return subclasses of {@link ResourcePrototype}, 9 | * which are annotated with {@link ClientBundle.Source} annotations specifying 10 | * the classpath location of the resource to include in the output. At runtime, 11 | * the functions will return an object that can be used to access the data in 12 | * the original resource. 13 | */ 14 | abstract class ClientBundle { 15 | Source get source; 16 | } 17 | 18 | /** 19 | * Specifies the classpath location of the resource or resources associated 20 | * with the {@link ResourcePrototype}. 21 | */ 22 | abstract class Source { 23 | List value(); 24 | } 25 | -------------------------------------------------------------------------------- /lib/src/resource/impl/image_resource_prototype.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_resource; 5 | 6 | /** 7 | * This is part of an implementation of the ImageBundle optimization implemented 8 | * with ClientBundle. 9 | */ 10 | class ImageResourcePrototype implements ImageResource { 11 | 12 | final bool animated; 13 | final bool lossy; 14 | final String name; 15 | final SafeUri url; 16 | final int left; 17 | final int top; 18 | final int width; 19 | final int height; 20 | 21 | /** 22 | * Only called by generated code. 23 | */ 24 | ImageResourcePrototype(this.name, this.url, this.left, this.top, this.width, this.height, 25 | this.animated, this.lossy); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /lib/src/resource/resource_prototype.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_resource; 5 | 6 | /** 7 | * The base interface all bundle resource types must extend. 8 | */ 9 | abstract class ResourcePrototype { 10 | /** 11 | * Returns the name of the function within the ClientBundle used to create the 12 | * ResourcePrototype. 13 | * 14 | * @return the name of the function within the ClientBundle used to create the 15 | * ResourcePrototype 16 | */ 17 | String get name; 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/role/aria_attribute_type.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_role; 5 | 6 | /** 7 | * Interface that is and needs to be implemented by ALL non primitive attribute types 8 | */ 9 | abstract class AriaAttributeType { 10 | String getAriaValue(); 11 | } 12 | -------------------------------------------------------------------------------- /lib/src/role/aria_value_attribute.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_role; 5 | 6 | /** 7 | * ARIA specific type attribute. 8 | */ 9 | class AriaValueAttribute extends Attribute { 10 | 11 | AriaValueAttribute(String name, [String defaultValue = null]) : super(name, defaultValue); 12 | 13 | String getSingleValue(T value) { 14 | return value.getAriaValue(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/src/scheduler/impl/flusher.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_scheduler; 5 | 6 | /** 7 | * Calls {@link SchedulerImpl#flushPostEventPumpCommands()}. 8 | */ 9 | class Flusher implements RepeatingCommand { 10 | 11 | SchedulerImpl _schedulerImpl; 12 | 13 | Flusher(this._schedulerImpl); 14 | 15 | bool execute() { 16 | 17 | _schedulerImpl._flushRunning = true; 18 | _schedulerImpl.flushPostEventPumpCommands(); 19 | /* 20 | * No finally here, we want this to be clear only on a normal exit. An 21 | * abnormal exit would indicate that an exception isn't being caught 22 | * correctly or that a slow script warning canceled the timer. 23 | */ 24 | _schedulerImpl._flushRunning = false; 25 | return _schedulerImpl._shouldBeRunning = _schedulerImpl.isWorkQueued(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/src/scheduler/impl/rescuer.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_scheduler; 5 | 6 | /** 7 | * Keeps {@link Flusher} running. 8 | */ 9 | class Rescuer implements RepeatingCommand { 10 | 11 | SchedulerImpl _schedulerImpl; 12 | 13 | Rescuer(this._schedulerImpl); 14 | 15 | bool execute() { 16 | if ( _schedulerImpl._flushRunning) { 17 | /* 18 | * Since JS is single-threaded, if we're here, then than means that 19 | * FLUSHER.execute() started, but did not finish. Reschedule FLUSHER. 20 | */ 21 | _schedulerImpl.scheduleFixedDelay( _schedulerImpl.flusher, SchedulerImpl._FLUSHER_DELAY); 22 | } 23 | return _schedulerImpl._shouldBeRunning; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/src/text/abstract_renderer.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_text; 5 | 6 | /** 7 | * Abstract implementation of a renderer to make implementation of rendering 8 | * simpler. 9 | * 10 | * @param the type to render 11 | */ 12 | abstract class AbstractRenderer implements Renderer { 13 | 14 | /** 15 | * Renders {@code object} as plain text, appended directly to {@code 16 | * appendable}. Should never throw any exceptions except if {@code appendable} 17 | * throws an {@code IOException}. 18 | */ 19 | void renderTo(T object, Appendable appendable) { 20 | appendable.append(render(object)); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/src/text/appendable.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_text; 5 | 6 | /** 7 | * See the 9 | * official Java API doc for details. 10 | */ 11 | abstract class Appendable { 12 | 13 | // Appendable append(char c) throws IOException; 14 | // 15 | // Appendable append(CharSequence charSquence) throws IOException; 16 | // 17 | // Appendable append(CharSequence charSquence, int start, int end) throws IOException; 18 | 19 | Appendable append(String text); 20 | } 21 | -------------------------------------------------------------------------------- /lib/src/text/date_time_format_renderer.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_text; 5 | 6 | /** 7 | * Renders {@link Date} objects with a {@link DateTimeFormat}. 8 | */ 9 | class DateTimeFormatRenderer extends AbstractRenderer { 10 | 11 | DateTimeFormat format; 12 | TimeZone timeZone; 13 | 14 | /** 15 | * Create an instance with the given format and time zone. 16 | */ 17 | DateTimeFormatRenderer([DateTimeFormat format = null, TimeZone timeZone = null]) { 18 | if (format == null) { 19 | this.format = DateTimeFormat.getPredefinedFormat(PredefinedFormat.DATE_SHORT); 20 | } else { 21 | this.format = format; 22 | } 23 | this.timeZone = timeZone; 24 | } 25 | 26 | String render(DateTime object) { 27 | if (object == null) { 28 | return ""; 29 | } 30 | return format.format(object, timeZone); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/src/text/double_parser.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_text; 5 | 6 | /** 7 | * A localized parser based on {@link NumberFormat#getDecimalFormat}. 8 | */ 9 | class DoubleParser implements Parser { 10 | 11 | static DoubleParser _INSTANCE; 12 | 13 | /** 14 | * Returns the instance of the no-op renderer. 15 | */ 16 | factory DoubleParser.instance() { 17 | if (_INSTANCE == null) { 18 | _INSTANCE = new DoubleParser(); 19 | } 20 | return _INSTANCE; 21 | } 22 | 23 | DoubleParser(); 24 | 25 | double parse(String object) { 26 | if (object == null || object == "") { 27 | return null; 28 | } 29 | 30 | return double.parse(object); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/src/text/double_renderer.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_text; 5 | 6 | /** 7 | * A localized renderer based on {@link NumberFormat#getDecimalFormat}. 8 | */ 9 | class DoubleRenderer extends AbstractRenderer { 10 | 11 | static DoubleRenderer _INSTANCE; 12 | 13 | /** 14 | * Returns the instance. 15 | */ 16 | factory DoubleRenderer.instance() { 17 | if (_INSTANCE == null) { 18 | _INSTANCE = new DoubleRenderer(); 19 | } 20 | return _INSTANCE; 21 | } 22 | 23 | DoubleRenderer(); 24 | 25 | String render(double object) { 26 | if (object == null) { 27 | return ""; 28 | } 29 | 30 | return NumberFormat.getDecimalFormat().formatDouble(object); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/src/text/integer_parser.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_text; 5 | 6 | /** 7 | * A localized parser based on {@link NumberFormat#getDecimalFormat}. 8 | */ 9 | class IntegerParser implements Parser { 10 | 11 | static IntegerParser _INSTANCE; 12 | 13 | /** 14 | * Returns the instance of the no-op renderer. 15 | */ 16 | factory IntegerParser.instance() { 17 | if (_INSTANCE == null) { 18 | _INSTANCE = new IntegerParser(); 19 | } 20 | return _INSTANCE; 21 | } 22 | 23 | IntegerParser(); 24 | 25 | int parse(String object) { 26 | if (object == null || object == "") { 27 | return null; 28 | } 29 | 30 | return int.parse(object); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/src/text/integer_renderer.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_text; 5 | 6 | /** 7 | * A localized renderer based on {@link NumberFormat#getDecimalFormat}. 8 | */ 9 | class IntegerRenderer extends AbstractRenderer { 10 | 11 | static IntegerRenderer _INSTANCE; 12 | 13 | /** 14 | * Returns the instance. 15 | */ 16 | factory IntegerRenderer.instance() { 17 | if (_INSTANCE == null) { 18 | _INSTANCE = new IntegerRenderer(); 19 | } 20 | return _INSTANCE; 21 | } 22 | 23 | IntegerRenderer(); 24 | 25 | String render(int object) { 26 | if (object == null) { 27 | return ""; 28 | } 29 | 30 | return NumberFormat.getDecimalFormat().formatInt(object); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/src/text/number_format_renderer.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_text; 5 | 6 | /** 7 | * Renders {@link Number} objects with a {@link NumberFormat}. 8 | */ 9 | class NumberFormatRenderer extends AbstractRenderer { 10 | 11 | NumberFormat format; 12 | 13 | /** 14 | * Create an instance with the given [format] or 15 | * [NumberFormat#getDecimalFormat()] 16 | */ 17 | NumberFormatRenderer([NumberFormat format = null]) { 18 | if (format == null) { 19 | this.format = NumberFormat.getDecimalFormat(); 20 | } else { 21 | this.format = format; 22 | } 23 | } 24 | 25 | String render(num object) { 26 | if (object == null) { 27 | return ""; 28 | } 29 | return format.format(object); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/src/text/parser.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_text; 5 | 6 | /** 7 | * An object that can parse text and return a value. 8 | * 9 | * @param the type to parse 10 | */ 11 | abstract class Parser { 12 | 13 | T parse(String text); 14 | } 15 | -------------------------------------------------------------------------------- /lib/src/text/passthrough_parser.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_text; 5 | 6 | /** 7 | * A no-op String parser. 8 | */ 9 | class PassthroughParser implements Parser { 10 | 11 | static PassthroughParser _instance; 12 | 13 | /** 14 | * Returns the instance of the no-op renderer. 15 | */ 16 | factory PassthroughParser.instance() { 17 | if (_instance == null) { 18 | _instance = new PassthroughParser(); 19 | } 20 | return _instance; 21 | } 22 | 23 | PassthroughParser(); 24 | 25 | String parse(String text) { 26 | return text; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/src/text/passthrough_renderer.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_text; 5 | 6 | /** 7 | * A no-op String renderer. This is rarely or never the right 8 | * thing to use in production, but it's handy for tests. 9 | */ 10 | class PassthroughRenderer extends AbstractRenderer { 11 | 12 | static PassthroughRenderer _instance; 13 | 14 | /** 15 | * Returns the instance of the no-op renderer. 16 | */ 17 | factory PassthroughRenderer.instance() { 18 | if (_instance == null) { 19 | _instance = new PassthroughRenderer(); 20 | } 21 | return _instance; 22 | } 23 | 24 | PassthroughRenderer(); 25 | 26 | String render(String object) { 27 | return object; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/src/text/renderer.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_text; 5 | 6 | /** 7 | * An object that can render other objects of a particular type into plain-text 8 | * form. Allows decoupling that is useful for a dependency-injection 9 | * architecture. 10 | * 11 | * @param the type to render 12 | */ 13 | abstract class Renderer { 14 | 15 | /** 16 | * Renders {@code object} as plain text. Should never throw any exceptions! 17 | */ 18 | String render(T object); 19 | 20 | /** 21 | * Renders {@code object} as plain text, appended directly to {@code 22 | * appendable}. Should never throw any exceptions except if {@code appendable} 23 | * throws an {@code IOException}. 24 | */ 25 | void renderTo(T object, Appendable appendable); 26 | } 27 | -------------------------------------------------------------------------------- /lib/src/ui/accepts_one_widget.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_ui; 5 | 6 | /** 7 | * Implemented by displays that can be given accept an {@link IsWidget} 8 | * to show. 9 | */ 10 | abstract class AcceptsOneWidget { 11 | 12 | /** 13 | * Set the only widget of the receiver, replacing the previous 14 | * widget if there was one. 15 | * 16 | * @param w the widget, or null to remove the widget 17 | * 18 | * @see SimplePanel 19 | */ 20 | void setWidgetIsWidget(IsWidget w); 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/ui/has_one_widget.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_ui; 5 | 6 | /** 7 | * Implemented by panels that have only one widget. 8 | * 9 | * @see SimplePanel 10 | */ 11 | abstract class HasOneWidget extends AcceptsOneWidget { 12 | 13 | /** 14 | * Gets the panel's child widget. 15 | * 16 | * @return the child widget, or null if none is present 17 | */ 18 | Widget getWidget(); 19 | 20 | /** 21 | * Sets this panel's widget. Any existing child widget will be removed. 22 | * 23 | * @param w the panel's new widget, or null to clear the panel 24 | */ 25 | void setWidget(Widget w); 26 | } 27 | -------------------------------------------------------------------------------- /lib/src/ui/has_scrolling.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_ui; 5 | 6 | /** 7 | * Implemented by widgets that support scrolling. 8 | */ 9 | abstract class HasScrolling implements HasHorizontalScrolling, HasVerticalScrolling, HasScrollHandlers, IsWidget { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /lib/src/ui/is_tree_item.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_ui; 5 | 6 | /** 7 | * Extended by objects which have underlying {@link TreeItem}. 8 | * Provides access to that item, if it exists, without compromising the 9 | * ability to provide a mock object instance in JRE unit tests. 10 | */ 11 | abstract class IsTreeItem { 12 | 13 | /** 14 | * Returns the {@link TreeItem} aspect of the receiver. 15 | */ 16 | TreeItem asTreeItem(); 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/ui/is_widget.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_ui; 5 | 6 | /** 7 | * Extended by view interfaces that are likely to be implemented by Widgets. 8 | * Provides access to that widget, if it exists, without compromising the 9 | * ability to provide a mock view instance in JRE unit tests. 10 | */ 11 | abstract class IsWidget { 12 | 13 | /** 14 | * Returns the [Widget] aspect of the receiver. 15 | */ 16 | Widget asWidget(); 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/ui/provides_resize.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_ui; 5 | 6 | /** 7 | * This tag interface specifies that the implementing widget will call 8 | * {@link RequiresResize#onResize()} on its children whenever their size may 9 | * have changed. 10 | * 11 | *

12 | * With limited exceptions (such as {@link RootLayoutPanel}), widgets that 13 | * implement this interface will also implement {@link RequiresResize}. A typical 14 | * widget will implement {@link RequiresResize#onResize()} like this: 15 | * 16 | * 17 | * public void onResize() { 18 | * for (Widget child : getChildren()) { 19 | * if (child instanceof RequiresResize) { 20 | * ((RequiresResize) child).onResize(); 21 | * } 22 | * } 23 | * } 24 | * 25 | *

26 | */ 27 | abstract class ProvidesResize { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /lib/src/ui/requires_resize.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_ui; 5 | 6 | /** 7 | * This interface designates that its implementor needs to be informed whenever 8 | * its size is modified. 9 | * 10 | *

11 | * Widgets that implement this interface should only be added to those that 12 | * implement {@link ProvidesResize}. Failure to do so will usually result in 13 | * {@link #onResize()} not being called. 14 | *

15 | */ 16 | abstract class RequiresResize { 17 | 18 | /** 19 | * This method must be called whenever the implementor's size has been 20 | * modified. 21 | */ 22 | void onResize(); 23 | } 24 | -------------------------------------------------------------------------------- /lib/src/ui/resize_composite.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_ui; 5 | 6 | /** 7 | * A {@link Composite} implementation that implements {@link RequiresResize} and 8 | * automatically delegates that interface's methods to its wrapped widget, which 9 | * must itself implement {@link RequiresResize}. 10 | */ 11 | class ResizeComposite extends Composite implements RequiresResize { 12 | 13 | void initWidget(Widget widget) { 14 | assert (widget is RequiresResize); // : "LayoutComposite requires that its wrapped widget implement RequiresResize"; 15 | super.initWidget(widget); 16 | } 17 | 18 | void onResize() { 19 | (getWidget() as RequiresResize).onResize(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/ui/text_alignment.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_ui; 5 | 6 | /** 7 | * Alignment values for {@link ValueBoxBase#setAlignment}. 8 | */ 9 | class TextAlignment extends Enum { 10 | 11 | const TextAlignment(String type) : super (type); 12 | 13 | static const TextAlignment CENTER = const TextAlignment("center"); 14 | static const TextAlignment JUSTIFY = const TextAlignment("justify"); 15 | static const TextAlignment LEFT = const TextAlignment("left"); 16 | static const TextAlignment RIGHT = const TextAlignment("right"); 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/uibinder/creator.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of uibinder; 5 | 6 | class Creator { 7 | 8 | /** 9 | * Create main widget 10 | */ 11 | static dynamic create(u) { 12 | ClassMirror uClassMirror = reflectClass(u); 13 | return uClassMirror.newInstance(const Symbol(""), []).reflectee; 14 | } 15 | 16 | 17 | /** 18 | * Create new instance of widget by wrapping [element]. 19 | */ 20 | static InstanceMirror instantiateWidget(ClassMirror clazz, Element element) { 21 | return clazz.newInstance(const Symbol("wrap"), [element]); 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /lib/src/util/animation_type.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_util; 5 | 6 | /** 7 | * The type of animation to use when opening the popup. 8 | * 9 | *
    10 | *
  • CENTER - Expand from the center of the popup
  • 11 | *
  • ONE_WAY_CORNER - Expand from the top left corner, do not animate hiding 12 | *
  • 13 | *
14 | */ 15 | class AnimationType extends Enum { 16 | 17 | const AnimationType(int num) : super(num); 18 | 19 | static const AnimationType CENTER = const AnimationType(0); 20 | static const AnimationType ONE_WAY_CORNER = const AnimationType(1); 21 | static const AnimationType ROLL_DOWN = const AnimationType(2); 22 | } 23 | -------------------------------------------------------------------------------- /lib/src/util/enum.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_util; 5 | 6 | /** 7 | * Emulation of Java Enum class. 8 | * 9 | * Example: 10 | * 11 | * class Meter extends Enum { 12 | * 13 | * const Meter(int val) : super (val); 14 | * 15 | * static const Meter HIGH = const Meter(100); 16 | * static const Meter MIDDLE = const Meter(50); 17 | * static const Meter LOW = const Meter(10); 18 | * } 19 | * 20 | * and usage: 21 | * 22 | * assert (Meter.HIGH, 100); 23 | * assert (Meter.HIGH is Meter); 24 | */ 25 | abstract class Enum { 26 | 27 | final T _value; 28 | 29 | const Enum(this._value); 30 | 31 | T get value => _value; 32 | } -------------------------------------------------------------------------------- /lib/src/util/safe_hml_renderer.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_util; 5 | 6 | /** 7 | * An object that can render other objects of a particular type into safe HTML 8 | * form. Allows decoupling that is useful for a dependency-injection 9 | * architecture. 10 | * 11 | * @param the type to render 12 | */ 13 | abstract class SafeHtmlRenderer { 14 | 15 | /** 16 | * Renders {@code object} as safe HTML. 17 | */ 18 | SafeHtml renderAsSafeHtml(T object); 19 | 20 | /** 21 | * Renders {@code object} as safe HTML, appended directly to {@code builder}. 22 | */ 23 | void render(T object, SafeHtmlBuilder builder); 24 | } -------------------------------------------------------------------------------- /lib/text.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | /** 5 | * Dart Web Toolkit Text library. 6 | */ 7 | library dart_web_toolkit_text; 8 | 9 | import 'i18n.dart'; 10 | 11 | part 'src/text/passthrough_parser.dart'; 12 | part 'src/text/passthrough_renderer.dart'; 13 | 14 | part 'src/text/renderer.dart'; 15 | part 'src/text/parser.dart'; 16 | part 'src/text/abstract_renderer.dart'; 17 | part 'src/text/date_time_format_renderer.dart'; 18 | part 'src/text/appendable.dart'; 19 | part 'src/text/double_parser.dart'; 20 | part 'src/text/double_renderer.dart'; 21 | part 'src/text/integer_parser.dart'; 22 | part 'src/text/integer_renderer.dart'; 23 | part 'src/text/number_format_renderer.dart'; 24 | -------------------------------------------------------------------------------- /lib/uibinder.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | /** 5 | * Dart Web Toolkit UiBinder library. 6 | */ 7 | library uibinder; 8 | 9 | import 'dart:html'; 10 | import 'dart:mirrors'; 11 | import 'ui.dart'; 12 | 13 | part 'src/uibinder/binder.dart'; 14 | part 'src/uibinder/parser.dart'; 15 | part 'src/uibinder/processor.dart'; 16 | part 'src/uibinder/creator.dart'; 17 | 18 | /** 19 | * Marks fields in a UiBinder client that must be filled by the binder's 20 | * [UiBinder#createAndBindUi] method. 21 | */ 22 | const UiField = const _UiField(); 23 | 24 | class _UiField { 25 | const _UiField(); 26 | } -------------------------------------------------------------------------------- /lib/util.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | /** 5 | * Dart Web Toolkit Util library. 6 | */ 7 | library dart_web_toolkit_util; 8 | 9 | import 'dart:html' as dart_html; 10 | import 'dart:async' as dart_async; 11 | 12 | import 'event.dart' as event; 13 | 14 | part 'src/util/timer.dart'; 15 | part 'src/util/style.dart'; 16 | part 'src/util/remove_iterator.dart'; 17 | part 'src/util/enum.dart'; 18 | part 'src/util/safe_uri.dart'; 19 | part 'src/util/uri_utils.dart'; 20 | part 'src/util/safe_html.dart'; 21 | part 'src/util/safe_html_utils.dart'; 22 | part 'src/util/safe_html_string.dart'; 23 | part 'src/util/layout_constant.dart'; 24 | part 'src/util/animation_type.dart'; 25 | part 'src/util/safe_hml_renderer.dart'; 26 | part 'src/util/safe_html_builder.dart'; 27 | part 'src/util/safe_html_templates.dart'; 28 | 29 | part 'src/util/safe_styles.dart'; 30 | part 'src/util/safe_styles_string.dart'; 31 | part 'src/util/safe_styles_utils.dart'; 32 | part 'src/util/safe_styles_builder.dart'; -------------------------------------------------------------------------------- /lib/validation.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | /** 5 | * Dart Web Toolkit Validation library. 6 | */ 7 | library dart_web_toolkit_validation; 8 | 9 | import 'ui.dart'; 10 | import 'event.dart'; 11 | 12 | part 'src/validation/validator.dart'; 13 | part 'src/validation/widget_validator.dart'; 14 | 15 | part 'src/validation/string_validator.dart'; 16 | part 'src/validation/number_validator.dart'; 17 | part 'src/validation/reg_exp_validator.dart'; 18 | part 'src/validation/phone_number_validator.dart'; 19 | part 'src/validation/social_security_number_validator.dart'; -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See http://pub.dartlang.org/doc/glossary.html#lockfile 3 | packages: 4 | browser: 5 | description: browser 6 | source: hosted 7 | version: "0.10.0+2" 8 | matcher: 9 | description: matcher 10 | source: hosted 11 | version: "0.11.4" 12 | path: 13 | description: path 14 | source: hosted 15 | version: "1.0.0" 16 | stack_trace: 17 | description: stack_trace 18 | source: hosted 19 | version: "0.9.2" 20 | unittest: 21 | description: unittest 22 | source: hosted 23 | version: "0.11.5" 24 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: dart_web_toolkit 2 | version: 0.4.6 3 | author: Sergey Akopkokhyants 4 | description: Dart Web Toolkit (DWT) is a development toolkit for building and optimizing complex browser-based applications. 5 | homepage: http://www.dartwebtoolkit.com 6 | environment: 7 | sdk: '>=1.6.0 <2.0.0' 8 | dependencies: 9 | browser: '>=0.10.0+2 <0.11.0' 10 | dev_dependencies: 11 | unittest: '>=0.11.5 <2.0.0' 12 | -------------------------------------------------------------------------------- /test/dart_web_toolkit_test.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | library dart_web_toolkit_test; 5 | 6 | import 'dart:html' as dart_html; 7 | import 'package:unittest/unittest.dart'; 8 | 9 | import 'package:dart_web_toolkit/event.dart' as event; 10 | import 'package:dart_web_toolkit/ui.dart' as ui; 11 | 12 | part 'test_group.dart'; 13 | part 'src/solid_ui_object.dart'; 14 | part 'src/ui_object_test_group.dart'; 15 | part 'src/widget_test_group.dart'; 16 | 17 | void main() { 18 | 19 | final _tList = new List(); 20 | 21 | _tList.add(new UiObjectTestGroup()); 22 | _tList.add(new WidgetTestGroup()); 23 | 24 | _tList.forEach((TestGroup t){ 25 | group(t.testGroupName, (){ 26 | t.testList.forEach((String name, Function testFunc){ 27 | test(name, testFunc); 28 | }); 29 | }); 30 | }); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Dart Web Toolkit Test Suite 4 | 5 | 6 |
7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /test/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | ############### 6 | # Type Analysis 7 | ############### 8 | 9 | echo "Analyse code..." 10 | 11 | output=$(dartanalyzer lib/*.dart 2>&1) 12 | results=$? 13 | 14 | if [ "$results" -ne 0 ]; then 15 | exit 1 16 | else 17 | echo "Passed analysis." 18 | fi 19 | 20 | ############ 21 | # Unit Tests 22 | ############ 23 | 24 | #echo "Run tests..." 25 | 26 | #results=$(DumpRenderTree test/index.html 2>&1) 27 | 28 | #echo "------------------" 29 | #echo "$results" | grep FAILED 30 | #echo "------------------" 31 | 32 | #if grep -q "Exception: Some tests failed." <<<$results; then 33 | # exit 1 34 | #else 35 | # echo "Passed tests." 36 | #fi 37 | -------------------------------------------------------------------------------- /test/src/solid_ui_object.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_test; 5 | 6 | /** 7 | * Clear UiObject class implementation. 8 | */ 9 | class SolidUiObject extends ui.UiObject { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /test/test_group.dart: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2012 Sergey Akopkokhyants. All Rights Reserved. 2 | //Author: akserg 3 | 4 | part of dart_web_toolkit_test; 5 | 6 | /** 7 | * Abstract test group class made for help create group of tests. 8 | */ 9 | abstract class TestGroup { 10 | 11 | final Map testList; 12 | 13 | String testGroupName; 14 | 15 | /** 16 | * Create an instance of [TestGroup]. 17 | */ 18 | TestGroup() : 19 | testList = new Map() { 20 | 21 | registerTests(); 22 | } 23 | 24 | /** 25 | * Method to be implemented in extended classes to register tests. 26 | */ 27 | void registerTests(); 28 | } 29 | -------------------------------------------------------------------------------- /tool/d2d: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | yaml=pubspec.yaml 4 | if [ ! -f $yaml ] ; then 5 | echo $yaml not found 6 | exit 1 7 | fi 8 | ver=$(grep version: $yaml) 9 | ver=${ver#version: } 10 | 11 | outdir=docs 12 | dartdoc --out $outdir --exclude-lib unittest,metadata lib/*.dart 13 | if [ ! -f $outdir/index.html ] ; then 14 | echo $outdir/index.html not found. Failed? 15 | exit 1 16 | fi 17 | 18 | cp tool/dwt-small-logo.png $outdir/dart-logo-small.png 19 | cd $outdir 20 | echo Process HTML files at $(pwd) 21 | function doHtml { 22 | sedfl=$1 23 | if [ ! -f $sedfl ] ; then 24 | echo $sedfl not found 25 | exit 26 | fi 27 | for f in *; do 28 | if [ -d $f ] ; then 29 | ( 30 | echo Process $f 31 | cd $f 32 | doHtml ../$sedfl 33 | ) 34 | elif [ ${f%.html} != $f ] ; then 35 | sed -f $sedfl -e "s/{{{version}}}/$ver/" $f > dd.tmp 36 | mv -f dd.tmp $f 37 | fi 38 | done 39 | } 40 | 41 | doHtml ../tool/html.sed 42 | cd .. 43 | -------------------------------------------------------------------------------- /tool/dwt-small-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akserg/dart_web_toolkit/efc904a8075892a9d6c15ebcb66f831be56662dc/tool/dwt-small-logo.png -------------------------------------------------------------------------------- /tool/html.sed: -------------------------------------------------------------------------------- 1 | s|Dart Documentation / Dart Documentation|API Reference / Dart Web Toolkit| 2 | s|Dart Documentation|API Reference / Dart Web Toolkit| 3 | s|

Dart Documentation

|

Dart Web Toolkit API Reference

| 4 | s|Dart Documentation|API Reference {{{version}}}| 5 | s||\ 16 | | 17 | --------------------------------------------------------------------------------