Spec-Zone .ru
спецификации, руководства, описания, API
|
001package javafx.scene.control; 002 003import javafx.event.Event; 004import javafx.event.EventTarget; 005import javafx.event.EventType; 006 007/** 008 * Event related to {@link TableView} and {@link TreeTableView} sorting. 009 */ 010public class SortEvent<C> extends Event { 011 012 /** 013 * Common supertype for all sort event types. 014 */ 015 public static final EventType<SortEvent> ANY = 016 new EventType<SortEvent> (Event.ANY, "SORT"); 017 018 @SuppressWarnings("unchecked") 019 public static <C> EventType<SortEvent<C>> sortEvent() { 020 return (EventType<SortEvent<C>>) SORT_EVENT; 021 } 022 023 @SuppressWarnings("unchecked") 024 private static final EventType<?> SORT_EVENT = new EventType(SortEvent.ANY, "SORT_EVENT"); 025 026// /** 027// * Construct a new {@code Event} with the specified event source, target 028// * and type. If the source or target is set to {@code null}, it is replaced 029// * by the {@code NULL_SOURCE_TARGET} value. 030// * 031// * @param source the event source which sent the event 032// * @param target the event source which sent the event 033// * @param type the event type 034// * @param target the target of the scroll to operation 035// */ 036 public SortEvent(C source, EventTarget target) { 037 super(source, target, sortEvent()); 038 039 } 040 041 @SuppressWarnings("unchecked") 042 @Override public C getSource() { 043 return (C) super.getSource(); 044 } 045}