All Downloads are FREE. Search and download functionalities are using the official Maven repository.

eu.future.earth.gwt.client.date.week.staend.ExtendedAbsolutePanel Maven / Gradle / Ivy

There is a newer version: 3.3
Show newest version
package eu.future.earth.gwt.client.date.week.staend;

import com.google.gwt.user.client.ui.AbsolutePanel;
import com.google.gwt.user.client.ui.Widget;

import eu.future.earth.gwt.client.date.week.BaseDayPanel;

public class ExtendedAbsolutePanel extends AbsolutePanel {

	private BaseDayPanel parent = null;

	public ExtendedAbsolutePanel(BaseDayPanel newParent) {
		super();
		parent = newParent;
	}

	public void addNormal(Widget w, int left, int top) {
		super.add(w, left, top);
	}

	
	public void add(Widget w, int left, int top) {
		super.add(w, left, top);
	}

	public boolean removeNormal(Widget w) {
		return super.remove(w);
	}

	@SuppressWarnings("unchecked")
	public boolean remove(Widget w) {
		boolean res = super.remove(w);
		if (parent instanceof DayPanel && w instanceof DayField) {
			final DayPanel real = (DayPanel) parent;
			final DayField realField = (DayField) w;
			real.removeEvent(realField.getValue(), false);
//			real.repaintEvents();
		}
		return res;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy