001/* 002 * Copyright 2012 GWT-Bootstrap 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package com.github.gwtbootstrap.client.ui.event; 017 018import com.github.gwtbootstrap.client.ui.event.HiddenEvent; 019import com.github.gwtbootstrap.client.ui.event.HiddenHandler; 020import com.github.gwtbootstrap.client.ui.event.HideEvent; 021import com.github.gwtbootstrap.client.ui.event.HideHandler; 022import com.github.gwtbootstrap.client.ui.event.ShowEvent; 023import com.github.gwtbootstrap.client.ui.event.ShowHandler; 024import com.github.gwtbootstrap.client.ui.event.ShownEvent; 025import com.github.gwtbootstrap.client.ui.event.ShownHandler; 026import com.google.gwt.event.shared.HandlerRegistration; 027 028/** 029 * Interface for components that can trigger actions when they are shown or 030 * hidden. 031 * 032 * @since 2.0.4.0 033 * 034 * @author Dominik Mayer 035 * 036 */ 037public interface HasVisibleHandlers { 038 039 /** 040 * Adds a {@link HideEvent} handler. 041 * 042 * @param handler 043 * the hide handler 044 * 045 * @return {@link HandlerRegistration} used to remove this handler 046 */ 047 HandlerRegistration addHideHandler(HideHandler handler); 048 049 /** 050 * Adds a {@link HiddenEvent} handler. 051 * 052 * @param handler 053 * the hidden handler 054 * 055 * @return {@link HandlerRegistration} used to remove this handler 056 */ 057 HandlerRegistration addHiddenHandler(HiddenHandler handler); 058 059 /** 060 * Adds a {@link ShowEvent} handler. 061 * 062 * @param handler 063 * the show handler 064 * 065 * @return {@link HandlerRegistration} used to remove this handler 066 */ 067 HandlerRegistration addShowHandler(ShowHandler handler); 068 069 /** 070 * Adds a {@link ShownEvent} handler. 071 * 072 * @param handler 073 * the shown handler 074 * 075 * @return {@link HandlerRegistration} used to remove this handler 076 */ 077 HandlerRegistration addShownHandler(ShownHandler handler); 078}