svn changeset:7742/svn branch:6.0tags/6.7.0.beta1
@@ -4,7 +4,7 @@ | |||
package com.vaadin.demo.colorpicker.gwt.client; | |||
import com.vaadin.demo.colorpicker.gwt.client.ui.IColorPicker; | |||
import com.vaadin.demo.colorpicker.gwt.client.ui.VColorPicker; | |||
import com.vaadin.terminal.gwt.client.DefaultWidgetSet; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
@@ -15,7 +15,7 @@ public class ColorPickerWidgetSet extends DefaultWidgetSet { | |||
protected Class resolveWidgetType(UIDL uidl) { | |||
final String tag = uidl.getTag(); | |||
if ("colorpicker".equals(tag)) { | |||
return IColorPicker.class; | |||
return VColorPicker.class; | |||
} | |||
// Let the DefaultWidgetSet handle resolution of default widgets | |||
@@ -26,8 +26,8 @@ public class ColorPickerWidgetSet extends DefaultWidgetSet { | |||
@Override | |||
public Paintable createWidget(UIDL uidl) { | |||
final Class type = resolveWidgetType(uidl); | |||
if (IColorPicker.class == type) { | |||
return new IColorPicker(); | |||
if (VColorPicker.class == type) { | |||
return new VColorPicker(); | |||
} | |||
// Let the DefaultWidgetSet handle creation of default widgets |
@@ -8,7 +8,7 @@ import com.vaadin.terminal.gwt.client.ApplicationConnection; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
public class IColorPicker extends GwtColorPicker implements Paintable { | |||
public class VColorPicker extends GwtColorPicker implements Paintable { | |||
/** Set the CSS class name to allow styling. */ | |||
public static final String CLASSNAME = "example-colorpicker"; | |||
@@ -23,7 +23,7 @@ public class IColorPicker extends GwtColorPicker implements Paintable { | |||
* The constructor should first call super() to initialize the component and | |||
* then handle any initialization relevant to IT Mill Toolkit. | |||
*/ | |||
public IColorPicker() { | |||
public VColorPicker() { | |||
// The superclass has a lot of relevant initialization | |||
super(); | |||
@@ -4,7 +4,7 @@ | |||
package com.vaadin.demo.coverflow.gwt.client; | |||
import com.vaadin.demo.coverflow.gwt.client.ui.ICoverflow; | |||
import com.vaadin.demo.coverflow.gwt.client.ui.VCoverflow; | |||
import com.vaadin.terminal.gwt.client.DefaultWidgetSet; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
@@ -13,8 +13,8 @@ public class CoverflowWidgetSet extends DefaultWidgetSet { | |||
/** Creates a widget according to its class name. */ | |||
public Paintable createWidget(UIDL uidl) { | |||
final Class classType = resolveWidgetType(uidl); | |||
if (ICoverflow.class == classType) { | |||
return new ICoverflow(); | |||
if (VCoverflow.class == classType) { | |||
return new VCoverflow(); | |||
} | |||
// Let the DefaultWidgetSet handle creation of default widgets | |||
@@ -25,7 +25,7 @@ public class CoverflowWidgetSet extends DefaultWidgetSet { | |||
protected Class resolveWidgetType(UIDL uidl) { | |||
final String tag = uidl.getTag(); | |||
if ("cover".equals(tag)) { | |||
return ICoverflow.class; | |||
return VCoverflow.class; | |||
} | |||
// Let the DefaultWidgetSet handle resolution of default widgets |
@@ -15,7 +15,7 @@ import com.vaadin.terminal.gwt.client.ApplicationConnection; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
public class ICoverflow extends Composite implements Paintable { | |||
public class VCoverflow extends Composite implements Paintable { | |||
private String uidlId; | |||
protected ApplicationConnection client; | |||
private ArrayList coverList = new ArrayList(); | |||
@@ -33,7 +33,7 @@ public class ICoverflow extends Composite implements Paintable { | |||
/** | |||
* Constructor | |||
*/ | |||
public ICoverflow() { | |||
public VCoverflow() { | |||
flash = new HTML(); | |||
initWidget(flash); | |||
@@ -209,11 +209,11 @@ public class ICoverflow extends Composite implements Paintable { | |||
var coverflow = $wnd.itmill.coverflow; | |||
coverflow['getCovers_' + id] = function() { | |||
app.@com.vaadin.demo.coverflow.gwt.client.ui.ICoverflow::getCovers()(); | |||
app.@com.vaadin.demo.coverflow.gwt.client.ui.VCoverflow::getCovers()(); | |||
}; | |||
coverflow['setCurrent_' + id] = function(selected) { | |||
app.@com.vaadin.demo.coverflow.gwt.client.ui.ICoverflow::setCover(Ljava/lang/String;)(selected); | |||
app.@com.vaadin.demo.coverflow.gwt.client.ui.VCoverflow::setCover(Ljava/lang/String;)(selected); | |||
}; | |||
$wnd.itmill.coverflow = coverflow; |
@@ -4,8 +4,8 @@ | |||
package com.vaadin.demo.reservation.gwt.client; | |||
import com.vaadin.demo.reservation.gwt.client.ui.ICalendarField; | |||
import com.vaadin.demo.reservation.gwt.client.ui.IGoogleMap; | |||
import com.vaadin.demo.reservation.gwt.client.ui.VCalendarField; | |||
import com.vaadin.demo.reservation.gwt.client.ui.VGoogleMap; | |||
import com.vaadin.terminal.gwt.client.DefaultWidgetSet; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
@@ -14,10 +14,10 @@ public class ReservationWidgetSet extends DefaultWidgetSet { | |||
@Override | |||
public Paintable createWidget(UIDL uidl) { | |||
final Class type = resolveWidgetType(uidl); | |||
if (IGoogleMap.class == type) { | |||
return new IGoogleMap(); | |||
} else if (ICalendarField.class == type) { | |||
return new ICalendarField(); | |||
if (VGoogleMap.class == type) { | |||
return new VGoogleMap(); | |||
} else if (VCalendarField.class == type) { | |||
return new VCalendarField(); | |||
} | |||
return super.createWidget(uidl); | |||
@@ -27,9 +27,9 @@ public class ReservationWidgetSet extends DefaultWidgetSet { | |||
protected Class resolveWidgetType(UIDL uidl) { | |||
final String tag = uidl.getTag(); | |||
if ("googlemap".equals(tag)) { | |||
return IGoogleMap.class; | |||
return VGoogleMap.class; | |||
} else if ("calendarfield".equals(tag)) { | |||
return ICalendarField.class; | |||
return VCalendarField.class; | |||
} | |||
return super.resolveWidgetType(uidl); | |||
} |
@@ -21,12 +21,12 @@ import com.vaadin.terminal.gwt.client.ApplicationConnection; | |||
import com.vaadin.terminal.gwt.client.DateTimeService; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
import com.vaadin.terminal.gwt.client.ui.CalendarEntry; | |||
import com.vaadin.terminal.gwt.client.ui.ICalendarPanel; | |||
import com.vaadin.terminal.gwt.client.ui.IDateField; | |||
import com.vaadin.terminal.gwt.client.ui.VCalendarPanel; | |||
import com.vaadin.terminal.gwt.client.ui.VDateField; | |||
public class ICalendarField extends IDateField { | |||
public class VCalendarField extends VDateField { | |||
private final ICalendarPanel calPanel; | |||
private final VCalendarPanel calPanel; | |||
private SimplePanel hourPanel; | |||
@@ -38,13 +38,13 @@ public class ICalendarField extends IDateField { | |||
private int realResolution = RESOLUTION_DAY; | |||
private static final String CLASSNAME = IDateField.CLASSNAME | |||
private static final String CLASSNAME = VDateField.CLASSNAME | |||
+ "-entrycalendar"; | |||
public ICalendarField() { | |||
public VCalendarField() { | |||
super(); | |||
setStyleName(CLASSNAME); | |||
calPanel = new ICalendarPanel(this); | |||
calPanel = new VCalendarPanel(this); | |||
add(calPanel); | |||
entrySource = new EntrySource(); | |||
calPanel.setCalendarEntrySource(entrySource); | |||
@@ -214,7 +214,7 @@ public class ICalendarField extends IDateField { | |||
} | |||
private class EntrySource implements ICalendarPanel.CalendarEntrySource { | |||
private class EntrySource implements VCalendarPanel.CalendarEntrySource { | |||
private final HashMap dates = new HashMap(); | |||
@@ -17,13 +17,13 @@ import com.vaadin.terminal.gwt.client.ApplicationConnection; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
public class IGoogleMap extends Composite implements Paintable { | |||
public class VGoogleMap extends Composite implements Paintable { | |||
public static final String CLASSNAME = "i-googlemap"; | |||
private final MapWidget widget = new MapWidget(); | |||
public IGoogleMap() { | |||
public VGoogleMap() { | |||
initWidget(widget); | |||
setWidth("200px"); | |||
setHeight("200px"); |
@@ -1,8 +1,8 @@ | |||
package com.vaadin.demo.sampler.gwt.client; | |||
import com.vaadin.demo.sampler.gwt.client.ui.IActiveLink; | |||
import com.vaadin.demo.sampler.gwt.client.ui.ICodeLabel; | |||
import com.vaadin.demo.sampler.gwt.client.ui.IGoogleAnalytics; | |||
import com.vaadin.demo.sampler.gwt.client.ui.VActiveLink; | |||
import com.vaadin.demo.sampler.gwt.client.ui.VCodeLabel; | |||
import com.vaadin.demo.sampler.gwt.client.ui.VGoogleAnalytics; | |||
import com.vaadin.terminal.gwt.client.DefaultWidgetSet; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
@@ -12,12 +12,12 @@ public class SamplerWidgetSet extends DefaultWidgetSet { | |||
@Override | |||
public Paintable createWidget(UIDL uidl) { | |||
final Class classType = resolveWidgetType(uidl); | |||
if (IGoogleAnalytics.class == classType) { | |||
return new IGoogleAnalytics(); | |||
} else if (ICodeLabel.class == classType) { | |||
return new ICodeLabel(); | |||
} else if (IActiveLink.class == classType) { | |||
return new IActiveLink(); | |||
if (VGoogleAnalytics.class == classType) { | |||
return new VGoogleAnalytics(); | |||
} else if (VCodeLabel.class == classType) { | |||
return new VCodeLabel(); | |||
} else if (VActiveLink.class == classType) { | |||
return new VActiveLink(); | |||
} else { | |||
return super.createWidget(uidl); | |||
} | |||
@@ -27,11 +27,11 @@ public class SamplerWidgetSet extends DefaultWidgetSet { | |||
protected Class resolveWidgetType(UIDL uidl) { | |||
final String tag = uidl.getTag(); | |||
if ("googleanalytics".equals(tag)) { | |||
return IGoogleAnalytics.class; | |||
return VGoogleAnalytics.class; | |||
} else if ("codelabel".equals(tag)) { | |||
return ICodeLabel.class; | |||
return VCodeLabel.class; | |||
} else if ("activelink".equals(tag)) { | |||
return IActiveLink.class; | |||
return VActiveLink.class; | |||
} else { | |||
return super.resolveWidgetType(uidl); | |||
} |
@@ -6,15 +6,15 @@ import com.google.gwt.user.client.ui.MouseListener; | |||
import com.google.gwt.user.client.ui.Widget; | |||
import com.vaadin.terminal.gwt.client.ApplicationConnection; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
import com.vaadin.terminal.gwt.client.ui.ILink; | |||
import com.vaadin.terminal.gwt.client.ui.VLink; | |||
public class IActiveLink extends ILink { | |||
public class VActiveLink extends VLink { | |||
String id; | |||
ApplicationConnection client; | |||
boolean listening = false; | |||
public IActiveLink() { | |||
public VActiveLink() { | |||
addMouseListener(new MouseListener() { | |||
public void onMouseDown(Widget sender, int x, int y) { | |||
} | |||
@@ -48,10 +48,10 @@ public class IActiveLink extends ILink { | |||
boolean opened = (e.getCtrlKey() || e.getAltKey() || e.getShiftKey() | |||
|| e.getMetaKey() || e.getButton() == Event.BUTTON_MIDDLE); | |||
// Works as ILink if no-one is listening | |||
// Works as VLink if no-one is listening | |||
if (listening) { | |||
if (opened) { | |||
// ILink will open, notify server | |||
// VLink will open, notify server | |||
client.updateVariable(id, "opened", true, false); | |||
} else { | |||
e.preventDefault(); |
@@ -3,11 +3,11 @@ package com.vaadin.demo.sampler.gwt.client.ui; | |||
import com.google.gwt.dom.client.Element; | |||
import com.vaadin.terminal.gwt.client.ApplicationConnection; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
import com.vaadin.terminal.gwt.client.ui.ILabel; | |||
import com.vaadin.terminal.gwt.client.ui.VLabel; | |||
public class ICodeLabel extends ILabel { | |||
public class VCodeLabel extends VLabel { | |||
public ICodeLabel() { | |||
public VCodeLabel() { | |||
super(); | |||
} | |||
@@ -7,9 +7,9 @@ import com.vaadin.terminal.gwt.client.BrowserInfo; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
public class IGoogleAnalytics extends Widget implements Paintable { | |||
public class VGoogleAnalytics extends Widget implements Paintable { | |||
public IGoogleAnalytics() { | |||
public VGoogleAnalytics() { | |||
setElement(Document.get().createDivElement()); | |||
if (BrowserInfo.get().isIE6()) { | |||
getElement().getStyle().setProperty("overflow", "hidden"); |
@@ -38,10 +38,10 @@ import com.google.gwt.user.client.ui.Widget; | |||
import com.vaadin.terminal.gwt.client.RenderInformation.FloatSize; | |||
import com.vaadin.terminal.gwt.client.RenderInformation.Size; | |||
import com.vaadin.terminal.gwt.client.ui.Field; | |||
import com.vaadin.terminal.gwt.client.ui.IContextMenu; | |||
import com.vaadin.terminal.gwt.client.ui.INotification; | |||
import com.vaadin.terminal.gwt.client.ui.IView; | |||
import com.vaadin.terminal.gwt.client.ui.INotification.HideEvent; | |||
import com.vaadin.terminal.gwt.client.ui.VContextMenu; | |||
import com.vaadin.terminal.gwt.client.ui.VNotification; | |||
import com.vaadin.terminal.gwt.client.ui.VView; | |||
import com.vaadin.terminal.gwt.client.ui.VNotification.HideEvent; | |||
/** | |||
* Entry point classes define <code>onModuleLoad()</code>. | |||
@@ -78,14 +78,14 @@ public class ApplicationConnection { | |||
private final WidgetSet widgetSet; | |||
private IContextMenu contextMenu = null; | |||
private VContextMenu contextMenu = null; | |||
private Timer loadTimer; | |||
private Timer loadTimer2; | |||
private Timer loadTimer3; | |||
private Element loadElement; | |||
private final IView view; | |||
private final VView view; | |||
private boolean applicationRunning = false; | |||
@@ -120,7 +120,7 @@ public class ApplicationConnection { | |||
configuration = cnf; | |||
windowName = configuration.getInitialWindowName(); | |||
if (isDebugMode()) { | |||
console = new IDebugConsole(this, cnf, !isQuietDebugMode()); | |||
console = new VDebugConsole(this, cnf, !isQuietDebugMode()); | |||
} else { | |||
console = new NullConsole(); | |||
} | |||
@@ -135,7 +135,7 @@ public class ApplicationConnection { | |||
initializeClientHooks(); | |||
view = new IView(cnf.getRootPanelId()); | |||
view = new VView(cnf.getRootPanelId()); | |||
showLoadingIndicator(); | |||
} | |||
@@ -386,12 +386,12 @@ public class ApplicationConnection { | |||
+ "</p>"; | |||
} | |||
if (html.length() > 0) { | |||
INotification n = new INotification(1000 * 60 * 45); | |||
VNotification n = new VNotification(1000 * 60 * 45); | |||
n.addEventListener(new NotificationRedirect(configuration | |||
.getCommunicationErrorUrl())); | |||
n | |||
.show(html, INotification.CENTERED_TOP, | |||
INotification.STYLE_SYSTEM); | |||
.show(html, VNotification.CENTERED_TOP, | |||
VNotification.STYLE_SYSTEM); | |||
} else { | |||
redirect(configuration.getCommunicationErrorUrl()); | |||
} | |||
@@ -694,10 +694,10 @@ public class ApplicationConnection { | |||
if (html.length() != 0) { | |||
/* 45 min */ | |||
INotification n = new INotification(1000 * 60 * 45); | |||
VNotification n = new VNotification(1000 * 60 * 45); | |||
n.addEventListener(new NotificationRedirect(url)); | |||
n.show(html, INotification.CENTERED_TOP, | |||
INotification.STYLE_SYSTEM); | |||
n.show(html, VNotification.CENTERED_TOP, | |||
VNotification.STYLE_SYSTEM); | |||
} else { | |||
redirect(url); | |||
} | |||
@@ -1461,11 +1461,11 @@ public class ApplicationConnection { | |||
/** | |||
* Singleton method to get instance of app's context menu. | |||
* | |||
* @return IContextMenu object | |||
* @return VContextMenu object | |||
*/ | |||
public IContextMenu getContextMenu() { | |||
public VContextMenu getContextMenu() { | |||
if (contextMenu == null) { | |||
contextMenu = new IContextMenu(); | |||
contextMenu = new VContextMenu(); | |||
DOM.setElementProperty(contextMenu.getElement(), "id", | |||
"PID_TOOLKIT_CM"); | |||
} | |||
@@ -1506,7 +1506,7 @@ public class ApplicationConnection { | |||
* messages, such as session expired. | |||
* | |||
*/ | |||
private class NotificationRedirect implements INotification.EventListener { | |||
private class NotificationRedirect implements VNotification.EventListener { | |||
String url; | |||
NotificationRedirect(String url) { | |||
@@ -1540,7 +1540,7 @@ public class ApplicationConnection { | |||
} | |||
} | |||
private final ITooltip tooltip = new ITooltip(this); | |||
private final VTooltip tooltip = new VTooltip(this); | |||
/** | |||
* Component may want to delegate Tooltip handling to client. Layouts add | |||
@@ -1626,7 +1626,7 @@ public class ApplicationConnection { | |||
makeUidlRequest("", true, false, true); | |||
} | |||
public IView getView() { | |||
public VView getView() { | |||
return view; | |||
} | |||
@@ -7,8 +7,8 @@ import com.google.gwt.user.client.DOM; | |||
import com.google.gwt.user.client.Element; | |||
import com.google.gwt.user.client.ui.HasWidgets; | |||
import com.google.gwt.user.client.ui.Widget; | |||
import com.vaadin.terminal.gwt.client.ui.IView; | |||
import com.vaadin.terminal.gwt.client.ui.IWindow; | |||
import com.vaadin.terminal.gwt.client.ui.VView; | |||
import com.vaadin.terminal.gwt.client.ui.VWindow; | |||
import com.vaadin.terminal.gwt.client.ui.SubPartAware; | |||
/** | |||
@@ -71,8 +71,8 @@ public class ComponentLocator { | |||
String subPartName = client.getContextMenu().getSubPartName( | |||
targetElement); | |||
if (subPartName != null) { | |||
// IContextMenu, singleton attached directly to rootpanel | |||
return "/IContextMenu[0]" + SUBPART_SEPARATOR + subPartName; | |||
// VContextMenu, singleton attached directly to rootpanel | |||
return "/VContextMenu[0]" + SUBPART_SEPARATOR + subPartName; | |||
} | |||
return null; | |||
@@ -226,14 +226,14 @@ public class ComponentLocator { | |||
return pid; | |||
} | |||
if (w instanceof IView) { | |||
if (w instanceof VView) { | |||
return ""; | |||
} else if (w instanceof IWindow) { | |||
IWindow win = (IWindow) w; | |||
ArrayList<IWindow> subWindowList = client.getView() | |||
} else if (w instanceof VWindow) { | |||
VWindow win = (VWindow) w; | |||
ArrayList<VWindow> subWindowList = client.getView() | |||
.getSubWindowList(); | |||
int indexOfSubWindow = subWindowList.indexOf(win); | |||
return PARENTCHILD_SEPARATOR + "IWindow[" + indexOfSubWindow + "]"; | |||
return PARENTCHILD_SEPARATOR + "VWindow[" + indexOfSubWindow + "]"; | |||
} | |||
Widget parent = w.getParent(); | |||
@@ -283,9 +283,9 @@ public class ComponentLocator { | |||
Iterator<? extends Widget> i; | |||
String widgetClassName = split[0]; | |||
if (widgetClassName.equals("IWindow")) { | |||
if (widgetClassName.equals("VWindow")) { | |||
i = client.getView().getSubWindowList().iterator(); | |||
} else if (widgetClassName.equals("IContextMenu")) { | |||
} else if (widgetClassName.equals("VContextMenu")) { | |||
return client.getContextMenu(); | |||
} else { | |||
i = parent.iterator(); |
@@ -5,48 +5,48 @@ | |||
package com.vaadin.terminal.gwt.client; | |||
import com.google.gwt.user.client.ui.Widget; | |||
import com.vaadin.terminal.gwt.client.ui.IAbsoluteLayout; | |||
import com.vaadin.terminal.gwt.client.ui.IAccordion; | |||
import com.vaadin.terminal.gwt.client.ui.IButton; | |||
import com.vaadin.terminal.gwt.client.ui.ICheckBox; | |||
import com.vaadin.terminal.gwt.client.ui.ICustomComponent; | |||
import com.vaadin.terminal.gwt.client.ui.ICustomLayout; | |||
import com.vaadin.terminal.gwt.client.ui.IDateFieldCalendar; | |||
import com.vaadin.terminal.gwt.client.ui.IEmbedded; | |||
import com.vaadin.terminal.gwt.client.ui.IFilterSelect; | |||
import com.vaadin.terminal.gwt.client.ui.IForm; | |||
import com.vaadin.terminal.gwt.client.ui.IFormLayout; | |||
import com.vaadin.terminal.gwt.client.ui.IGridLayout; | |||
import com.vaadin.terminal.gwt.client.ui.IHorizontalLayout; | |||
import com.vaadin.terminal.gwt.client.ui.ILabel; | |||
import com.vaadin.terminal.gwt.client.ui.ILink; | |||
import com.vaadin.terminal.gwt.client.ui.IListSelect; | |||
import com.vaadin.terminal.gwt.client.ui.IMenuBar; | |||
import com.vaadin.terminal.gwt.client.ui.INativeSelect; | |||
import com.vaadin.terminal.gwt.client.ui.IOptionGroup; | |||
import com.vaadin.terminal.gwt.client.ui.IOrderedLayout; | |||
import com.vaadin.terminal.gwt.client.ui.IPanel; | |||
import com.vaadin.terminal.gwt.client.ui.IPasswordField; | |||
import com.vaadin.terminal.gwt.client.ui.IPopupCalendar; | |||
import com.vaadin.terminal.gwt.client.ui.IPopupView; | |||
import com.vaadin.terminal.gwt.client.ui.IProgressIndicator; | |||
import com.vaadin.terminal.gwt.client.ui.IScrollTable; | |||
import com.vaadin.terminal.gwt.client.ui.ISlider; | |||
import com.vaadin.terminal.gwt.client.ui.ISplitPanelHorizontal; | |||
import com.vaadin.terminal.gwt.client.ui.ISplitPanelVertical; | |||
import com.vaadin.terminal.gwt.client.ui.ITablePaging; | |||
import com.vaadin.terminal.gwt.client.ui.ITabsheet; | |||
import com.vaadin.terminal.gwt.client.ui.ITextArea; | |||
import com.vaadin.terminal.gwt.client.ui.ITextField; | |||
import com.vaadin.terminal.gwt.client.ui.ITextualDate; | |||
import com.vaadin.terminal.gwt.client.ui.ITree; | |||
import com.vaadin.terminal.gwt.client.ui.ITwinColSelect; | |||
import com.vaadin.terminal.gwt.client.ui.IUnknownComponent; | |||
import com.vaadin.terminal.gwt.client.ui.IUpload; | |||
import com.vaadin.terminal.gwt.client.ui.IUriFragmentUtility; | |||
import com.vaadin.terminal.gwt.client.ui.IVerticalLayout; | |||
import com.vaadin.terminal.gwt.client.ui.IWindow; | |||
import com.vaadin.terminal.gwt.client.ui.richtextarea.IRichTextArea; | |||
import com.vaadin.terminal.gwt.client.ui.VAbsoluteLayout; | |||
import com.vaadin.terminal.gwt.client.ui.VAccordion; | |||
import com.vaadin.terminal.gwt.client.ui.VButton; | |||
import com.vaadin.terminal.gwt.client.ui.VCheckBox; | |||
import com.vaadin.terminal.gwt.client.ui.VCustomComponent; | |||
import com.vaadin.terminal.gwt.client.ui.VCustomLayout; | |||
import com.vaadin.terminal.gwt.client.ui.VDateFieldCalendar; | |||
import com.vaadin.terminal.gwt.client.ui.VEmbedded; | |||
import com.vaadin.terminal.gwt.client.ui.VFilterSelect; | |||
import com.vaadin.terminal.gwt.client.ui.VForm; | |||
import com.vaadin.terminal.gwt.client.ui.VFormLayout; | |||
import com.vaadin.terminal.gwt.client.ui.VGridLayout; | |||
import com.vaadin.terminal.gwt.client.ui.VHorizontalLayout; | |||
import com.vaadin.terminal.gwt.client.ui.VLabel; | |||
import com.vaadin.terminal.gwt.client.ui.VLink; | |||
import com.vaadin.terminal.gwt.client.ui.VListSelect; | |||
import com.vaadin.terminal.gwt.client.ui.VMenuBar; | |||
import com.vaadin.terminal.gwt.client.ui.VNativeSelect; | |||
import com.vaadin.terminal.gwt.client.ui.VOptionGroup; | |||
import com.vaadin.terminal.gwt.client.ui.VOrderedLayout; | |||
import com.vaadin.terminal.gwt.client.ui.VPanel; | |||
import com.vaadin.terminal.gwt.client.ui.VPasswordField; | |||
import com.vaadin.terminal.gwt.client.ui.VPopupCalendar; | |||
import com.vaadin.terminal.gwt.client.ui.VPopupView; | |||
import com.vaadin.terminal.gwt.client.ui.VProgressIndicator; | |||
import com.vaadin.terminal.gwt.client.ui.VScrollTable; | |||
import com.vaadin.terminal.gwt.client.ui.VSlider; | |||
import com.vaadin.terminal.gwt.client.ui.VSplitPanelHorizontal; | |||
import com.vaadin.terminal.gwt.client.ui.VSplitPanelVertical; | |||
import com.vaadin.terminal.gwt.client.ui.VTablePaging; | |||
import com.vaadin.terminal.gwt.client.ui.VTabsheet; | |||
import com.vaadin.terminal.gwt.client.ui.VTextArea; | |||
import com.vaadin.terminal.gwt.client.ui.VTextField; | |||
import com.vaadin.terminal.gwt.client.ui.VTextualDate; | |||
import com.vaadin.terminal.gwt.client.ui.VTree; | |||
import com.vaadin.terminal.gwt.client.ui.VTwinColSelect; | |||
import com.vaadin.terminal.gwt.client.ui.VUnknownComponent; | |||
import com.vaadin.terminal.gwt.client.ui.VUpload; | |||
import com.vaadin.terminal.gwt.client.ui.VUriFragmentUtility; | |||
import com.vaadin.terminal.gwt.client.ui.VVerticalLayout; | |||
import com.vaadin.terminal.gwt.client.ui.VWindow; | |||
import com.vaadin.terminal.gwt.client.ui.richtextarea.VRichTextArea; | |||
public class DefaultWidgetSet implements WidgetSet { | |||
@@ -60,91 +60,91 @@ public class DefaultWidgetSet implements WidgetSet { | |||
public Paintable createWidget(UIDL uidl) { | |||
final Class classType = resolveWidgetType(uidl); | |||
if (ICheckBox.class == classType) { | |||
return new ICheckBox(); | |||
} else if (IButton.class == classType) { | |||
return new IButton(); | |||
} else if (IWindow.class == classType) { | |||
return new IWindow(); | |||
} else if (IOrderedLayout.class == classType) { | |||
return new IOrderedLayout(); | |||
} else if (IVerticalLayout.class == classType) { | |||
return new IVerticalLayout(); | |||
} else if (IHorizontalLayout.class == classType) { | |||
return new IHorizontalLayout(); | |||
} else if (ILabel.class == classType) { | |||
return new ILabel(); | |||
} else if (ILink.class == classType) { | |||
return new ILink(); | |||
} else if (IGridLayout.class == classType) { | |||
return new IGridLayout(); | |||
} else if (ITree.class == classType) { | |||
return new ITree(); | |||
} else if (IOptionGroup.class == classType) { | |||
return new IOptionGroup(); | |||
} else if (ITwinColSelect.class == classType) { | |||
return new ITwinColSelect(); | |||
} else if (INativeSelect.class == classType) { | |||
return new INativeSelect(); | |||
} else if (IListSelect.class == classType) { | |||
return new IListSelect(); | |||
} else if (IPanel.class == classType) { | |||
return new IPanel(); | |||
} else if (ITabsheet.class == classType) { | |||
return new ITabsheet(); | |||
} else if (IEmbedded.class == classType) { | |||
return new IEmbedded(); | |||
} else if (ICustomLayout.class == classType) { | |||
return new ICustomLayout(); | |||
} else if (ICustomComponent.class == classType) { | |||
return new ICustomComponent(); | |||
} else if (ITextArea.class == classType) { | |||
return new ITextArea(); | |||
} else if (IPasswordField.class == classType) { | |||
return new IPasswordField(); | |||
} else if (ITextField.class == classType) { | |||
return new ITextField(); | |||
} else if (ITablePaging.class == classType) { | |||
return new ITablePaging(); | |||
} else if (IScrollTable.class == classType) { | |||
return new IScrollTable(); | |||
} else if (IDateFieldCalendar.class == classType) { | |||
return new IDateFieldCalendar(); | |||
} else if (ITextualDate.class == classType) { | |||
return new ITextualDate(); | |||
} else if (IPopupCalendar.class == classType) { | |||
return new IPopupCalendar(); | |||
} else if (ISlider.class == classType) { | |||
return new ISlider(); | |||
} else if (IForm.class == classType) { | |||
return new IForm(); | |||
} else if (IFormLayout.class == classType) { | |||
return new IFormLayout(); | |||
} else if (IUpload.class == classType) { | |||
return new IUpload(); | |||
} else if (ISplitPanelHorizontal.class == classType) { | |||
return new ISplitPanelHorizontal(); | |||
} else if (ISplitPanelVertical.class == classType) { | |||
return new ISplitPanelVertical(); | |||
} else if (IFilterSelect.class == classType) { | |||
return new IFilterSelect(); | |||
} else if (IProgressIndicator.class == classType) { | |||
return new IProgressIndicator(); | |||
} else if (IRichTextArea.class == classType) { | |||
return new IRichTextArea(); | |||
} else if (IAccordion.class == classType) { | |||
return new IAccordion(); | |||
} else if (IMenuBar.class == classType) { | |||
return new IMenuBar(); | |||
} else if (IPopupView.class == classType) { | |||
return new IPopupView(); | |||
} else if (IUriFragmentUtility.class == classType) { | |||
return new IUriFragmentUtility(); | |||
} else if (IAbsoluteLayout.class == classType) { | |||
return new IAbsoluteLayout(); | |||
if (VCheckBox.class == classType) { | |||
return new VCheckBox(); | |||
} else if (VButton.class == classType) { | |||
return new VButton(); | |||
} else if (VWindow.class == classType) { | |||
return new VWindow(); | |||
} else if (VOrderedLayout.class == classType) { | |||
return new VOrderedLayout(); | |||
} else if (VVerticalLayout.class == classType) { | |||
return new VVerticalLayout(); | |||
} else if (VHorizontalLayout.class == classType) { | |||
return new VHorizontalLayout(); | |||
} else if (VLabel.class == classType) { | |||
return new VLabel(); | |||
} else if (VLink.class == classType) { | |||
return new VLink(); | |||
} else if (VGridLayout.class == classType) { | |||
return new VGridLayout(); | |||
} else if (VTree.class == classType) { | |||
return new VTree(); | |||
} else if (VOptionGroup.class == classType) { | |||
return new VOptionGroup(); | |||
} else if (VTwinColSelect.class == classType) { | |||
return new VTwinColSelect(); | |||
} else if (VNativeSelect.class == classType) { | |||
return new VNativeSelect(); | |||
} else if (VListSelect.class == classType) { | |||
return new VListSelect(); | |||
} else if (VPanel.class == classType) { | |||
return new VPanel(); | |||
} else if (VTabsheet.class == classType) { | |||
return new VTabsheet(); | |||
} else if (VEmbedded.class == classType) { | |||
return new VEmbedded(); | |||
} else if (VCustomLayout.class == classType) { | |||
return new VCustomLayout(); | |||
} else if (VCustomComponent.class == classType) { | |||
return new VCustomComponent(); | |||
} else if (VTextArea.class == classType) { | |||
return new VTextArea(); | |||
} else if (VPasswordField.class == classType) { | |||
return new VPasswordField(); | |||
} else if (VTextField.class == classType) { | |||
return new VTextField(); | |||
} else if (VTablePaging.class == classType) { | |||
return new VTablePaging(); | |||
} else if (VScrollTable.class == classType) { | |||
return new VScrollTable(); | |||
} else if (VDateFieldCalendar.class == classType) { | |||
return new VDateFieldCalendar(); | |||
} else if (VTextualDate.class == classType) { | |||
return new VTextualDate(); | |||
} else if (VPopupCalendar.class == classType) { | |||
return new VPopupCalendar(); | |||
} else if (VSlider.class == classType) { | |||
return new VSlider(); | |||
} else if (VForm.class == classType) { | |||
return new VForm(); | |||
} else if (VFormLayout.class == classType) { | |||
return new VFormLayout(); | |||
} else if (VUpload.class == classType) { | |||
return new VUpload(); | |||
} else if (VSplitPanelHorizontal.class == classType) { | |||
return new VSplitPanelHorizontal(); | |||
} else if (VSplitPanelVertical.class == classType) { | |||
return new VSplitPanelVertical(); | |||
} else if (VFilterSelect.class == classType) { | |||
return new VFilterSelect(); | |||
} else if (VProgressIndicator.class == classType) { | |||
return new VProgressIndicator(); | |||
} else if (VRichTextArea.class == classType) { | |||
return new VRichTextArea(); | |||
} else if (VAccordion.class == classType) { | |||
return new VAccordion(); | |||
} else if (VMenuBar.class == classType) { | |||
return new VMenuBar(); | |||
} else if (VPopupView.class == classType) { | |||
return new VPopupView(); | |||
} else if (VUriFragmentUtility.class == classType) { | |||
return new VUriFragmentUtility(); | |||
} else if (VAbsoluteLayout.class == classType) { | |||
return new VAbsoluteLayout(); | |||
} | |||
return new IUnknownComponent(); | |||
return new VUnknownComponent(); | |||
} | |||
@@ -152,111 +152,111 @@ public class DefaultWidgetSet implements WidgetSet { | |||
final String tag = uidl.getTag(); | |||
if ("button".equals(tag)) { | |||
if ("switch".equals(uidl.getStringAttribute("type"))) { | |||
return ICheckBox.class; | |||
return VCheckBox.class; | |||
} else { | |||
return IButton.class; | |||
return VButton.class; | |||
} | |||
} else if ("window".equals(tag)) { | |||
return IWindow.class; | |||
return VWindow.class; | |||
} else if ("orderedlayout".equals(tag)) { | |||
return IOrderedLayout.class; | |||
return VOrderedLayout.class; | |||
} else if ("verticallayout".equals(tag)) { | |||
return IVerticalLayout.class; | |||
return VVerticalLayout.class; | |||
} else if ("horizontallayout".equals(tag)) { | |||
return IHorizontalLayout.class; | |||
return VHorizontalLayout.class; | |||
} else if ("label".equals(tag)) { | |||
return ILabel.class; | |||
return VLabel.class; | |||
} else if ("link".equals(tag)) { | |||
return ILink.class; | |||
return VLink.class; | |||
} else if ("gridlayout".equals(tag)) { | |||
return IGridLayout.class; | |||
return VGridLayout.class; | |||
} else if ("tree".equals(tag)) { | |||
return ITree.class; | |||
return VTree.class; | |||
} else if ("select".equals(tag)) { | |||
if (uidl.hasAttribute("type")) { | |||
final String type = uidl.getStringAttribute("type"); | |||
if (type.equals("twincol")) { | |||
return ITwinColSelect.class; | |||
return VTwinColSelect.class; | |||
} | |||
if (type.equals("optiongroup")) { | |||
return IOptionGroup.class; | |||
return VOptionGroup.class; | |||
} | |||
if (type.equals("native")) { | |||
return INativeSelect.class; | |||
return VNativeSelect.class; | |||
} | |||
if (type.equals("list")) { | |||
return IListSelect.class; | |||
return VListSelect.class; | |||
} | |||
} else { | |||
if (uidl.hasAttribute("selectmode") | |||
&& uidl.getStringAttribute("selectmode") | |||
.equals("multi")) { | |||
return IListSelect.class; | |||
return VListSelect.class; | |||
} else { | |||
return IFilterSelect.class; | |||
return VFilterSelect.class; | |||
} | |||
} | |||
} else if ("panel".equals(tag)) { | |||
return IPanel.class; | |||
return VPanel.class; | |||
} else if ("tabsheet".equals(tag)) { | |||
return ITabsheet.class; | |||
return VTabsheet.class; | |||
} else if ("accordion".equals(tag)) { | |||
return IAccordion.class; | |||
return VAccordion.class; | |||
} else if ("embedded".equals(tag)) { | |||
return IEmbedded.class; | |||
return VEmbedded.class; | |||
} else if ("customlayout".equals(tag)) { | |||
return ICustomLayout.class; | |||
return VCustomLayout.class; | |||
} else if ("customcomponent".equals(tag)) { | |||
return ICustomComponent.class; | |||
return VCustomComponent.class; | |||
} else if ("textfield".equals(tag)) { | |||
if (uidl.getBooleanAttribute("richtext")) { | |||
return IRichTextArea.class; | |||
return VRichTextArea.class; | |||
} else if (uidl.hasAttribute("multiline")) { | |||
return ITextArea.class; | |||
return VTextArea.class; | |||
} else if (uidl.getBooleanAttribute("secret")) { | |||
return IPasswordField.class; | |||
return VPasswordField.class; | |||
} else { | |||
return ITextField.class; | |||
return VTextField.class; | |||
} | |||
} else if ("table".equals(tag)) { | |||
return IScrollTable.class; | |||
return VScrollTable.class; | |||
} else if ("pagingtable".equals(tag)) { | |||
return ITablePaging.class; | |||
return VTablePaging.class; | |||
} else if ("datefield".equals(tag)) { | |||
if (uidl.hasAttribute("type")) { | |||
if ("inline".equals(uidl.getStringAttribute("type"))) { | |||
return IDateFieldCalendar.class; | |||
return VDateFieldCalendar.class; | |||
} else if ("popup".equals(uidl.getStringAttribute("type"))) { | |||
return IPopupCalendar.class; | |||
return VPopupCalendar.class; | |||
} | |||
} | |||
// popup calendar is the default | |||
return IPopupCalendar.class; | |||
return VPopupCalendar.class; | |||
} else if ("slider".equals(tag)) { | |||
return ISlider.class; | |||
return VSlider.class; | |||
} else if ("form".equals(tag)) { | |||
return IForm.class; | |||
return VForm.class; | |||
} else if ("formlayout".equals(tag)) { | |||
return IFormLayout.class; | |||
return VFormLayout.class; | |||
} else if ("upload".equals(tag)) { | |||
return IUpload.class; | |||
return VUpload.class; | |||
} else if ("hsplitpanel".equals(tag)) { | |||
return ISplitPanelHorizontal.class; | |||
return VSplitPanelHorizontal.class; | |||
} else if ("vsplitpanel".equals(tag)) { | |||
return ISplitPanelVertical.class; | |||
return VSplitPanelVertical.class; | |||
} else if ("progressindicator".equals(tag)) { | |||
return IProgressIndicator.class; | |||
return VProgressIndicator.class; | |||
} else if ("menubar".equals(tag)) { | |||
return IMenuBar.class; | |||
return VMenuBar.class; | |||
} else if ("popupview".equals(tag)) { | |||
return IPopupView.class; | |||
return VPopupView.class; | |||
} else if ("urifragment".equals(tag)) { | |||
return IUriFragmentUtility.class; | |||
} else if (IAbsoluteLayout.TAGNAME.equals(tag)) { | |||
return IAbsoluteLayout.class; | |||
return VUriFragmentUtility.class; | |||
} else if (VAbsoluteLayout.TAGNAME.equals(tag)) { | |||
return VAbsoluteLayout.class; | |||
} | |||
return IUnknownComponent.class; | |||
return VUnknownComponent.class; | |||
} | |||
/** |
@@ -238,12 +238,12 @@ public class UIDL { | |||
return s; | |||
} | |||
public IUIDLBrowser print_r() { | |||
return new IUIDLBrowser(); | |||
public VUIDLBrowser print_r() { | |||
return new VUIDLBrowser(); | |||
} | |||
private class IUIDLBrowser extends Tree { | |||
public IUIDLBrowser() { | |||
private class VUIDLBrowser extends Tree { | |||
public VUIDLBrowser() { | |||
DOM.setStyleAttribute(getElement(), "position", ""); | |||
@@ -255,7 +255,7 @@ public class UIDL { | |||
public void onTreeItemStateChanged(TreeItem item) { | |||
if (item == root) { | |||
removeItem(root); | |||
IUIDLBrowser.this.removeTreeListener(this); | |||
VUIDLBrowser.this.removeTreeListener(this); | |||
addItem(dir()); | |||
final Iterator it = treeItemIterator(); | |||
while (it.hasNext()) { |
@@ -10,7 +10,7 @@ import com.google.gwt.user.client.Event; | |||
import com.google.gwt.user.client.ui.HTML; | |||
import com.vaadin.terminal.gwt.client.ui.Icon; | |||
public class ICaption extends HTML { | |||
public class VCaption extends HTML { | |||
public static final String CLASSNAME = "i-caption"; | |||
@@ -47,12 +47,12 @@ public class ICaption extends HTML { | |||
* null | |||
* @param client | |||
*/ | |||
public ICaption(Paintable component, ApplicationConnection client) { | |||
public VCaption(Paintable component, ApplicationConnection client) { | |||
super(); | |||
this.client = client; | |||
owner = component; | |||
setStyleName(CLASSNAME); | |||
sinkEvents(ITooltip.TOOLTIP_EVENTS); | |||
sinkEvents(VTooltip.TOOLTIP_EVENTS); | |||
} | |||
@@ -242,7 +242,7 @@ public class ICaption extends HTML { | |||
/* | |||
* The size of the icon might affect the size of the component so we | |||
* must report the size change to the parent TODO consider moving | |||
* the responsibility of reacting to ONLOAD from ICaption to layouts | |||
* the responsibility of reacting to ONLOAD from VCaption to layouts | |||
*/ | |||
if (owner != null) { | |||
Util.notifyParentOfSizeChange(owner, true); | |||
@@ -250,7 +250,7 @@ public class ICaption extends HTML { | |||
ApplicationConnection | |||
.getConsole() | |||
.log( | |||
"Warning: Icon load event was not propagated because ICaption owner is unknown."); | |||
"Warning: Icon load event was not propagated because VCaption owner is unknown."); | |||
} | |||
} | |||
} |
@@ -7,14 +7,14 @@ package com.vaadin.terminal.gwt.client; | |||
import com.google.gwt.user.client.ui.FlowPanel; | |||
import com.google.gwt.user.client.ui.Widget; | |||
public class ICaptionWrapper extends FlowPanel { | |||
public class VCaptionWrapper extends FlowPanel { | |||
public static final String CLASSNAME = "i-captionwrapper"; | |||
ICaption caption; | |||
VCaption caption; | |||
Paintable widget; | |||
public ICaptionWrapper(Paintable toBeWrapped, ApplicationConnection client) { | |||
caption = new ICaption(toBeWrapped, client); | |||
public VCaptionWrapper(Paintable toBeWrapped, ApplicationConnection client) { | |||
caption = new VCaption(toBeWrapped, client); | |||
add(caption); | |||
widget = toBeWrapped; | |||
add((Widget) widget); |
@@ -28,9 +28,9 @@ import com.google.gwt.user.client.ui.Tree; | |||
import com.google.gwt.user.client.ui.TreeItem; | |||
import com.google.gwt.user.client.ui.VerticalPanel; | |||
import com.google.gwt.user.client.ui.Widget; | |||
import com.vaadin.terminal.gwt.client.ui.IToolkitOverlay; | |||
import com.vaadin.terminal.gwt.client.ui.VToolkitOverlay; | |||
public final class IDebugConsole extends IToolkitOverlay implements Console { | |||
public final class VDebugConsole extends VToolkitOverlay implements Console { | |||
/** | |||
* Builds number. For example 0-custom_tag in 5.0.0-custom_tag. | |||
@@ -74,7 +74,7 @@ public final class IDebugConsole extends IToolkitOverlay implements Console { | |||
private static final String help = "Drag=move, shift-drag=resize, doubleclick=min/max." | |||
+ "Use debug=quiet to log only to browser console."; | |||
public IDebugConsole(ApplicationConnection client, | |||
public VDebugConsole(ApplicationConnection client, | |||
ApplicationConfiguration cnf, boolean showWindow) { | |||
super(false, false); | |||
@@ -152,7 +152,7 @@ public final class IDebugConsole extends IToolkitOverlay implements Console { | |||
forceLayout.addClickListener(new ClickListener() { | |||
public void onClick(Widget sender) { | |||
IDebugConsole.this.client.forceLayout(); | |||
VDebugConsole.this.client.forceLayout(); | |||
} | |||
}); | |||
@@ -202,8 +202,8 @@ public final class IDebugConsole extends IToolkitOverlay implements Console { | |||
DOM.setCapture(getElement()); | |||
startX = DOM.eventGetScreenX(event); | |||
startY = DOM.eventGetScreenY(event); | |||
initialW = IDebugConsole.this.getOffsetWidth(); | |||
initialH = IDebugConsole.this.getOffsetHeight(); | |||
initialW = VDebugConsole.this.getOffsetWidth(); | |||
initialH = VDebugConsole.this.getOffsetHeight(); | |||
DOM.eventCancelBubble(event, true); | |||
DOM.eventPreventDefault(event); | |||
DOM.addEventPreview(dragpreview); | |||
@@ -231,7 +231,7 @@ public final class IDebugConsole extends IToolkitOverlay implements Console { | |||
if (h < 40) { | |||
h = 40; | |||
} | |||
IDebugConsole.this.setPixelSize(w, h); | |||
VDebugConsole.this.setPixelSize(w, h); | |||
DOM.eventCancelBubble(event, true); | |||
DOM.eventPreventDefault(event); | |||
} else if (moving) { | |||
@@ -245,7 +245,7 @@ public final class IDebugConsole extends IToolkitOverlay implements Console { | |||
if (top < 0) { | |||
top = 0; | |||
} | |||
IDebugConsole.this.setPopupPosition(left, top); | |||
VDebugConsole.this.setPopupPosition(left, top); | |||
DOM.eventCancelBubble(event, true); | |||
DOM.eventPreventDefault(event); | |||
} |
@@ -10,12 +10,12 @@ import com.google.gwt.user.client.DOM; | |||
import com.google.gwt.user.client.Element; | |||
import com.google.gwt.user.client.ui.FlowPanel; | |||
import com.google.gwt.user.client.ui.HTML; | |||
import com.vaadin.terminal.gwt.client.ui.IToolkitOverlay; | |||
import com.vaadin.terminal.gwt.client.ui.VToolkitOverlay; | |||
public class IErrorMessage extends FlowPanel { | |||
public class VErrorMessage extends FlowPanel { | |||
public static final String CLASSNAME = "i-errormessage"; | |||
public IErrorMessage() { | |||
public VErrorMessage() { | |||
super(); | |||
setStyleName(CLASSNAME); | |||
} | |||
@@ -34,7 +34,7 @@ public class IErrorMessage extends FlowPanel { | |||
final UIDL.XML xml = (UIDL.XML) child; | |||
add(new HTML(xml.getXMLAsString())); | |||
} else { | |||
final IErrorMessage childError = new IErrorMessage(); | |||
final VErrorMessage childError = new VErrorMessage(); | |||
add(childError); | |||
childError.updateFromUIDL((UIDL) child); | |||
} | |||
@@ -48,9 +48,9 @@ public class IErrorMessage extends FlowPanel { | |||
* @param indicatorElement | |||
*/ | |||
public void showAt(Element indicatorElement) { | |||
IToolkitOverlay errorContainer = (IToolkitOverlay) getParent(); | |||
VToolkitOverlay errorContainer = (VToolkitOverlay) getParent(); | |||
if (errorContainer == null) { | |||
errorContainer = new IToolkitOverlay(); | |||
errorContainer = new VToolkitOverlay(); | |||
errorContainer.setWidget(this); | |||
} | |||
errorContainer.setPopupPosition(DOM.getAbsoluteLeft(indicatorElement) | |||
@@ -65,7 +65,7 @@ public class IErrorMessage extends FlowPanel { | |||
} | |||
public void hide() { | |||
final IToolkitOverlay errorContainer = (IToolkitOverlay) getParent(); | |||
final VToolkitOverlay errorContainer = (VToolkitOverlay) getParent(); | |||
if (errorContainer != null) { | |||
errorContainer.hide(); | |||
} |
@@ -9,12 +9,12 @@ import com.google.gwt.user.client.Event; | |||
import com.google.gwt.user.client.Timer; | |||
import com.google.gwt.user.client.Window; | |||
import com.google.gwt.user.client.ui.FlowPanel; | |||
import com.vaadin.terminal.gwt.client.ui.IToolkitOverlay; | |||
import com.vaadin.terminal.gwt.client.ui.VToolkitOverlay; | |||
/** | |||
* TODO open for extension | |||
*/ | |||
public class ITooltip extends IToolkitOverlay { | |||
public class VTooltip extends VToolkitOverlay { | |||
private static final String CLASSNAME = "i-tooltip"; | |||
private static final int MARGIN = 4; | |||
public static final int TOOLTIP_EVENTS = Event.ONKEYDOWN | |||
@@ -25,7 +25,7 @@ public class ITooltip extends IToolkitOverlay { | |||
private static final int CLOSE_TIMEOUT = 300; | |||
private static final int OPEN_DELAY = 750; | |||
private static final int QUICK_OPEN_DELAY = 100; | |||
IErrorMessage em = new IErrorMessage(); | |||
VErrorMessage em = new VErrorMessage(); | |||
Element description = DOM.createDiv(); | |||
private Paintable tooltipOwner; | |||
private boolean closing = false; | |||
@@ -34,7 +34,7 @@ public class ITooltip extends IToolkitOverlay { | |||
// Open next tooltip faster. Disabled after 2 sec of showTooltip-silence. | |||
private boolean justClosed = false; | |||
public ITooltip(ApplicationConnection client) { | |||
public VTooltip(ApplicationConnection client) { | |||
super(false, false, true); | |||
ac = client; | |||
setStyleName(CLASSNAME); | |||
@@ -189,7 +189,7 @@ public class ITooltip extends IToolkitOverlay { | |||
public void handleTooltipEvent(Event event, Paintable owner) { | |||
final int type = DOM.eventGetType(event); | |||
if ((ITooltip.TOOLTIP_EVENTS & type) == type) { | |||
if ((VTooltip.TOOLTIP_EVENTS & type) == type) { | |||
if (type == Event.ONMOUSEOVER) { | |||
showTooltip(owner, event); | |||
} else if (type == Event.ONMOUSEMOVE) { |
@@ -1,12 +0,0 @@ | |||
/* | |||
@ITMillApache2LicenseForJavaFiles@ | |||
*/ | |||
package com.vaadin.terminal.gwt.client.ui; | |||
public class ISplitPanelHorizontal extends ISplitPanel { | |||
public ISplitPanelHorizontal() { | |||
super(ISplitPanel.ORIENTATION_HORIZONTAL); | |||
} | |||
} |
@@ -1,12 +0,0 @@ | |||
/* | |||
@ITMillApache2LicenseForJavaFiles@ | |||
*/ | |||
package com.vaadin.terminal.gwt.client.ui; | |||
public class ISplitPanelVertical extends ISplitPanel { | |||
public ISplitPanelVertical() { | |||
super(ISplitPanel.ORIENTATION_VERTICAL); | |||
} | |||
} |
@@ -376,7 +376,7 @@ public class MenuBar extends Widget implements PopupListener { | |||
// Create a new popup for this item, and position it next to | |||
// the item (below if this is a horizontal menu bar, to the | |||
// right if it's a vertical bar). | |||
popup = new IToolkitOverlay(true) { | |||
popup = new VToolkitOverlay(true) { | |||
{ | |||
setWidget(item.getSubMenu()); | |||
item.getSubMenu().onShow(); |
@@ -5,7 +5,7 @@ | |||
package com.vaadin.terminal.gwt.client.ui; | |||
/** | |||
* This class is used for "row actions" in ITree and ITable | |||
* This class is used for "row actions" in VTree and ITable | |||
*/ | |||
public class TreeAction extends Action { | |||
@@ -18,12 +18,12 @@ import com.google.gwt.user.client.ui.Widget; | |||
import com.vaadin.terminal.gwt.client.ApplicationConnection; | |||
import com.vaadin.terminal.gwt.client.BrowserInfo; | |||
import com.vaadin.terminal.gwt.client.Container; | |||
import com.vaadin.terminal.gwt.client.ICaption; | |||
import com.vaadin.terminal.gwt.client.VCaption; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.RenderSpace; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
public class IAbsoluteLayout extends ComplexPanel implements Container { | |||
public class VAbsoluteLayout extends ComplexPanel implements Container { | |||
/** Tag name for widget creation */ | |||
public static final String TAGNAME = "absolutelayout"; | |||
@@ -47,7 +47,7 @@ public class IAbsoluteLayout extends ComplexPanel implements Container { | |||
private boolean rendering; | |||
public IAbsoluteLayout() { | |||
public VAbsoluteLayout() { | |||
setElement(Document.get().createDivElement()); | |||
setStyleName(CLASSNAME); | |||
marginElement = Document.get().createDivElement(); | |||
@@ -231,7 +231,7 @@ public class IAbsoluteLayout extends ComplexPanel implements Container { | |||
private String zIndex; | |||
private Paintable paintable; | |||
private ICaption caption; | |||
private VCaption caption; | |||
public AbsoluteWrapper(Paintable paintable) { | |||
this.paintable = paintable; | |||
@@ -240,11 +240,11 @@ public class IAbsoluteLayout extends ComplexPanel implements Container { | |||
public void updateCaption(UIDL uidl) { | |||
boolean captionIsNeeded = ICaption.isNeeded(uidl); | |||
boolean captionIsNeeded = VCaption.isNeeded(uidl); | |||
if (captionIsNeeded) { | |||
if (caption == null) { | |||
caption = new ICaption(paintable, client); | |||
IAbsoluteLayout.this.add(caption); | |||
caption = new VCaption(paintable, client); | |||
VAbsoluteLayout.this.add(caption); | |||
} | |||
caption.updateCaption(uidl); | |||
updateCaptionPosition(); |
@@ -14,14 +14,14 @@ import com.google.gwt.user.client.ui.Widget; | |||
import com.vaadin.terminal.gwt.client.ApplicationConnection; | |||
import com.vaadin.terminal.gwt.client.BrowserInfo; | |||
import com.vaadin.terminal.gwt.client.ContainerResizedListener; | |||
import com.vaadin.terminal.gwt.client.ICaption; | |||
import com.vaadin.terminal.gwt.client.VCaption; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.RenderInformation; | |||
import com.vaadin.terminal.gwt.client.RenderSpace; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
import com.vaadin.terminal.gwt.client.Util; | |||
public class IAccordion extends ITabsheetBase implements | |||
public class VAccordion extends VTabsheetBase implements | |||
ContainerResizedListener { | |||
public static final String CLASSNAME = "i-accordion"; | |||
@@ -44,7 +44,7 @@ public class IAccordion extends ITabsheetBase implements | |||
private RenderInformation renderInformation = new RenderInformation(); | |||
public IAccordion() { | |||
public VAccordion() { | |||
super(CLASSNAME); | |||
// IE6 needs this to calculate offsetHeight correctly | |||
if (BrowserInfo.get().isIE6()) { | |||
@@ -425,14 +425,14 @@ public class IAccordion extends ITabsheetBase implements | |||
return captionNode.getOffsetHeight(); | |||
} | |||
private ICaption caption; | |||
private VCaption caption; | |||
private boolean open = false; | |||
private Element content = DOM.createDiv(); | |||
private Element captionNode = DOM.createDiv(); | |||
public StackItem(UIDL tabUidl) { | |||
setElement(DOM.createDiv()); | |||
caption = new ICaption(null, client); | |||
caption = new VCaption(null, client); | |||
caption.addClickListener(this); | |||
if (BrowserInfo.get().isIE6()) { | |||
DOM.setEventListener(captionNode, this); |
@@ -12,12 +12,12 @@ import com.google.gwt.user.client.ui.ClickListener; | |||
import com.google.gwt.user.client.ui.Widget; | |||
import com.vaadin.terminal.gwt.client.ApplicationConnection; | |||
import com.vaadin.terminal.gwt.client.BrowserInfo; | |||
import com.vaadin.terminal.gwt.client.ITooltip; | |||
import com.vaadin.terminal.gwt.client.VTooltip; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
import com.vaadin.terminal.gwt.client.Util; | |||
public class IButton extends Button implements Paintable { | |||
public class VButton extends Button implements Paintable { | |||
private String width = null; | |||
@@ -43,7 +43,7 @@ public class IButton extends Button implements Paintable { | |||
*/ | |||
private boolean clickPending; | |||
public IButton() { | |||
public VButton() { | |||
setStyleName(CLASSNAME); | |||
DOM.appendChild(getElement(), captionElement); | |||
@@ -57,12 +57,12 @@ public class IButton extends Button implements Paintable { | |||
* TODO isolate workaround. Safari don't always seem to fire | |||
* onblur previously focused component before button is clicked. | |||
*/ | |||
IButton.this.setFocus(true); | |||
VButton.this.setFocus(true); | |||
client.updateVariable(id, "state", true, true); | |||
clickPending = false; | |||
} | |||
}); | |||
sinkEvents(ITooltip.TOOLTIP_EVENTS); | |||
sinkEvents(VTooltip.TOOLTIP_EVENTS); | |||
sinkEvents(Event.ONMOUSEDOWN); | |||
sinkEvents(Event.ONMOUSEUP); | |||
} |
@@ -21,19 +21,19 @@ import com.google.gwt.user.client.ui.Widget; | |||
import com.vaadin.terminal.gwt.client.DateTimeService; | |||
import com.vaadin.terminal.gwt.client.LocaleService; | |||
public class ICalendarPanel extends FlexTable implements MouseListener { | |||
public class VCalendarPanel extends FlexTable implements MouseListener { | |||
private final IDateField datefield; | |||
private final VDateField datefield; | |||
private IEventButton prevYear; | |||
private VEventButton prevYear; | |||
private IEventButton nextYear; | |||
private VEventButton nextYear; | |||
private IEventButton prevMonth; | |||
private VEventButton prevMonth; | |||
private IEventButton nextMonth; | |||
private VEventButton nextMonth; | |||
private ITime time; | |||
private VTime time; | |||
private Date minDate = null; | |||
@@ -42,30 +42,30 @@ public class ICalendarPanel extends FlexTable implements MouseListener { | |||
private CalendarEntrySource entrySource; | |||
/* Needed to identify resolution changes */ | |||
private int resolution = IDateField.RESOLUTION_YEAR; | |||
private int resolution = VDateField.RESOLUTION_YEAR; | |||
/* Needed to identify locale changes */ | |||
private String locale = LocaleService.getDefaultLocale(); | |||
public ICalendarPanel(IDateField parent) { | |||
public VCalendarPanel(VDateField parent) { | |||
datefield = parent; | |||
setStyleName(IDateField.CLASSNAME + "-calendarpanel"); | |||
setStyleName(VDateField.CLASSNAME + "-calendarpanel"); | |||
// buildCalendar(true); | |||
addTableListener(new DateClickListener(this)); | |||
} | |||
public ICalendarPanel(IDateField parent, Date min, Date max) { | |||
public VCalendarPanel(VDateField parent, Date min, Date max) { | |||
datefield = parent; | |||
setStyleName(IDateField.CLASSNAME + "-calendarpanel"); | |||
setStyleName(VDateField.CLASSNAME + "-calendarpanel"); | |||
// buildCalendar(true); | |||
addTableListener(new DateClickListener(this)); | |||
} | |||
private void buildCalendar(boolean forceRedraw) { | |||
final boolean needsMonth = datefield.getCurrentResolution() > IDateField.RESOLUTION_YEAR; | |||
boolean needsBody = datefield.getCurrentResolution() >= IDateField.RESOLUTION_DAY; | |||
final boolean needsTime = datefield.getCurrentResolution() >= IDateField.RESOLUTION_HOUR; | |||
final boolean needsMonth = datefield.getCurrentResolution() > VDateField.RESOLUTION_YEAR; | |||
boolean needsBody = datefield.getCurrentResolution() >= VDateField.RESOLUTION_DAY; | |||
final boolean needsTime = datefield.getCurrentResolution() >= VDateField.RESOLUTION_HOUR; | |||
forceRedraw = prevYear == null ? true : forceRedraw; | |||
buildCalendarHeader(forceRedraw, needsMonth); | |||
clearCalendarBody(!needsBody); | |||
@@ -97,10 +97,10 @@ public class ICalendarPanel extends FlexTable implements MouseListener { | |||
private void buildCalendarHeader(boolean forceRedraw, boolean needsMonth) { | |||
if (forceRedraw) { | |||
if (prevMonth == null) { // Only do once | |||
prevYear = new IEventButton(); | |||
prevYear = new VEventButton(); | |||
prevYear.setHTML("«"); | |||
prevYear.setStyleName("i-button-prevyear"); | |||
nextYear = new IEventButton(); | |||
nextYear = new VEventButton(); | |||
nextYear.setHTML("»"); | |||
nextYear.setStyleName("i-button-nextyear"); | |||
prevYear.addMouseListener(this); | |||
@@ -109,10 +109,10 @@ public class ICalendarPanel extends FlexTable implements MouseListener { | |||
setWidget(0, 4, nextYear); | |||
if (needsMonth) { | |||
prevMonth = new IEventButton(); | |||
prevMonth = new VEventButton(); | |||
prevMonth.setHTML("‹"); | |||
prevMonth.setStyleName("i-button-prevmonth"); | |||
nextMonth = new IEventButton(); | |||
nextMonth = new VEventButton(); | |||
nextMonth.setHTML("›"); | |||
nextMonth.setStyleName("i-button-nextmonth"); | |||
prevMonth.addMouseListener(this); | |||
@@ -123,7 +123,7 @@ public class ICalendarPanel extends FlexTable implements MouseListener { | |||
getFlexCellFormatter().setColSpan(0, 2, 3); | |||
getRowFormatter().addStyleName(0, | |||
IDateField.CLASSNAME + "-calendarpanel-header"); | |||
VDateField.CLASSNAME + "-calendarpanel-header"); | |||
} else if (!needsMonth) { | |||
// Remove month traverse buttons | |||
prevMonth.removeMouseListener(this); | |||
@@ -142,7 +142,7 @@ public class ICalendarPanel extends FlexTable implements MouseListener { | |||
if (day > 6) { | |||
day = 0; | |||
} | |||
if (datefield.getCurrentResolution() > IDateField.RESOLUTION_MONTH) { | |||
if (datefield.getCurrentResolution() > VDateField.RESOLUTION_MONTH) { | |||
setHTML(1, i, "<strong>" | |||
+ datefield.getDateTimeService().getShortDay(day) | |||
+ "</strong>"); | |||
@@ -155,7 +155,7 @@ public class ICalendarPanel extends FlexTable implements MouseListener { | |||
final String monthName = needsMonth ? datefield.getDateTimeService() | |||
.getMonth(datefield.getShowingDate().getMonth()) : ""; | |||
final int year = datefield.getShowingDate().getYear() + 1900; | |||
setHTML(0, 2, "<span class=\"" + IDateField.CLASSNAME | |||
setHTML(0, 2, "<span class=\"" + VDateField.CLASSNAME | |||
+ "-calendarpanel-month\">" + monthName + " " + year | |||
+ "</span>"); | |||
} | |||
@@ -184,7 +184,7 @@ public class ICalendarPanel extends FlexTable implements MouseListener { | |||
if (entrySource != null) { | |||
curr.setDate(dayCount); | |||
final List entries = entrySource.getEntries(curr, | |||
IDateField.RESOLUTION_DAY); | |||
VDateField.RESOLUTION_DAY); | |||
if (entries != null) { | |||
for (final Iterator it = entries.iterator(); it | |||
.hasNext();) { | |||
@@ -195,7 +195,7 @@ public class ICalendarPanel extends FlexTable implements MouseListener { | |||
} | |||
} | |||
} | |||
final String baseclass = IDateField.CLASSNAME | |||
final String baseclass = VDateField.CLASSNAME | |||
+ "-calendarpanel-day"; | |||
String cssClass = baseclass; | |||
if (!isEnabledDate(curr)) { | |||
@@ -229,7 +229,7 @@ public class ICalendarPanel extends FlexTable implements MouseListener { | |||
private void buildTime(boolean forceRedraw) { | |||
if (time == null) { | |||
time = new ITime(datefield); | |||
time = new VTime(datefield); | |||
setText(8, 0, ""); // Add new row | |||
getFlexCellFormatter().setColSpan(8, 0, 7); | |||
setWidget(8, 0, time); | |||
@@ -246,8 +246,8 @@ public class ICalendarPanel extends FlexTable implements MouseListener { | |||
// Locale and resolution changes force a complete redraw | |||
buildCalendar(locale != datefield.getCurrentLocale() | |||
|| resolution != datefield.getCurrentResolution()); | |||
if (datefield instanceof ITextualDate) { | |||
((ITextualDate) datefield).buildDate(); | |||
if (datefield instanceof VTextualDate) { | |||
((VTextualDate) datefield).buildDate(); | |||
} | |||
locale = datefield.getCurrentLocale(); | |||
resolution = datefield.getCurrentResolution(); | |||
@@ -306,11 +306,11 @@ public class ICalendarPanel extends FlexTable implements MouseListener { | |||
updateCalendar(); | |||
} | |||
} else { | |||
if (datefield.getCurrentResolution() == IDateField.RESOLUTION_YEAR | |||
|| datefield.getCurrentResolution() == IDateField.RESOLUTION_MONTH) { | |||
if (datefield.getCurrentResolution() == VDateField.RESOLUTION_YEAR | |||
|| datefield.getCurrentResolution() == VDateField.RESOLUTION_MONTH) { | |||
// Due to current UI, update variable if res=year/month | |||
datefield.setCurrentDate(new Date(showingDate.getTime())); | |||
if (datefield.getCurrentResolution() == IDateField.RESOLUTION_MONTH) { | |||
if (datefield.getCurrentResolution() == VDateField.RESOLUTION_MONTH) { | |||
datefield.getClient().updateVariable(datefield.getId(), | |||
"month", datefield.getCurrentDate().getMonth() + 1, | |||
false); | |||
@@ -332,7 +332,7 @@ public class ICalendarPanel extends FlexTable implements MouseListener { | |||
// Timer is first used for a 500ms delay after mousedown. After that has | |||
// elapsed, another timer is triggered to go off every 150ms. Both | |||
// timers are cancelled on mouseup or mouseout. | |||
if (sender instanceof IEventButton) { | |||
if (sender instanceof VEventButton) { | |||
processClickEvent(sender, false); | |||
timer = new Timer() { | |||
@Override | |||
@@ -369,11 +369,11 @@ public class ICalendarPanel extends FlexTable implements MouseListener { | |||
processClickEvent(sender, true); | |||
} | |||
private class IEventButton extends IButton implements SourcesMouseEvents { | |||
private class VEventButton extends VButton implements SourcesMouseEvents { | |||
private MouseListenerCollection mouseListeners; | |||
public IEventButton() { | |||
public VEventButton() { | |||
super(); | |||
sinkEvents(Event.FOCUSEVENTS | Event.KEYEVENTS | Event.ONCLICK | |||
| Event.MOUSEEVENTS); | |||
@@ -411,9 +411,9 @@ public class ICalendarPanel extends FlexTable implements MouseListener { | |||
private class DateClickListener implements TableListener { | |||
private final ICalendarPanel cal; | |||
private final VCalendarPanel cal; | |||
public DateClickListener(ICalendarPanel panel) { | |||
public DateClickListener(VCalendarPanel panel) { | |||
cal = panel; | |||
} | |||
@@ -460,9 +460,9 @@ public class ICalendarPanel extends FlexTable implements MouseListener { | |||
cal.datefield.getCurrentDate().getYear() + 1900, | |||
cal.datefield.isImmediate()); | |||
if (datefield instanceof ITextualDate | |||
&& resolution < IDateField.RESOLUTION_HOUR) { | |||
((IToolkitOverlay) getParent()).hide(); | |||
if (datefield instanceof VTextualDate | |||
&& resolution < VDateField.RESOLUTION_HOUR) { | |||
((VToolkitOverlay) getParent()).hide(); | |||
} else { | |||
updateCalendar(); | |||
} |
@@ -10,12 +10,12 @@ import com.google.gwt.user.client.Event; | |||
import com.google.gwt.user.client.ui.ClickListener; | |||
import com.google.gwt.user.client.ui.Widget; | |||
import com.vaadin.terminal.gwt.client.ApplicationConnection; | |||
import com.vaadin.terminal.gwt.client.ITooltip; | |||
import com.vaadin.terminal.gwt.client.VTooltip; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
import com.vaadin.terminal.gwt.client.Util; | |||
public class ICheckBox extends com.google.gwt.user.client.ui.CheckBox implements | |||
public class VCheckBox extends com.google.gwt.user.client.ui.CheckBox implements | |||
Paintable, Field { | |||
public static final String CLASSNAME = "i-checkbox"; | |||
@@ -32,7 +32,7 @@ public class ICheckBox extends com.google.gwt.user.client.ui.CheckBox implements | |||
private boolean isBlockMode = false; | |||
public ICheckBox() { | |||
public VCheckBox() { | |||
setStyleName(CLASSNAME); | |||
addClickListener(new ClickListener() { | |||
@@ -44,11 +44,11 @@ public class ICheckBox extends com.google.gwt.user.client.ui.CheckBox implements | |||
} | |||
}); | |||
sinkEvents(ITooltip.TOOLTIP_EVENTS); | |||
sinkEvents(VTooltip.TOOLTIP_EVENTS); | |||
Element el = DOM.getFirstChild(getElement()); | |||
while (el != null) { | |||
DOM.sinkEvents(el, | |||
(DOM.getEventsSunk(el) | ITooltip.TOOLTIP_EVENTS)); | |||
(DOM.getEventsSunk(el) | VTooltip.TOOLTIP_EVENTS)); | |||
el = DOM.getNextSibling(el); | |||
} | |||
} | |||
@@ -70,7 +70,7 @@ public class ICheckBox extends com.google.gwt.user.client.ui.CheckBox implements | |||
DOM.setElementProperty(errorIndicatorElement, "className", | |||
"i-errorindicator"); | |||
DOM.appendChild(getElement(), errorIndicatorElement); | |||
DOM.sinkEvents(errorIndicatorElement, ITooltip.TOOLTIP_EVENTS | |||
DOM.sinkEvents(errorIndicatorElement, VTooltip.TOOLTIP_EVENTS | |||
| Event.ONCLICK); | |||
} | |||
} else if (errorIndicatorElement != null) { | |||
@@ -85,7 +85,7 @@ public class ICheckBox extends com.google.gwt.user.client.ui.CheckBox implements | |||
if (icon == null) { | |||
icon = new Icon(client); | |||
DOM.insertChild(getElement(), icon.getElement(), 1); | |||
icon.sinkEvents(ITooltip.TOOLTIP_EVENTS); | |||
icon.sinkEvents(VTooltip.TOOLTIP_EVENTS); | |||
icon.sinkEvents(Event.ONCLICK); | |||
} | |||
icon.setUri(uidl.getStringAttribute("icon")); |
@@ -13,7 +13,7 @@ import com.google.gwt.user.client.ui.MenuBar; | |||
import com.google.gwt.user.client.ui.MenuItem; | |||
import com.google.gwt.user.client.ui.PopupPanel; | |||
public class IContextMenu extends IToolkitOverlay implements SubPartAware { | |||
public class VContextMenu extends VToolkitOverlay implements SubPartAware { | |||
private ActionOwner actionOwner; | |||
@@ -30,7 +30,7 @@ public class IContextMenu extends IToolkitOverlay implements SubPartAware { | |||
* @param cli | |||
* to be set as an owner of menu | |||
*/ | |||
public IContextMenu() { | |||
public VContextMenu() { | |||
super(true, false, true); | |||
setWidget(menu); | |||
setStyleName("i-contextmenu"); | |||
@@ -66,8 +66,8 @@ public class IContextMenu extends IToolkitOverlay implements SubPartAware { | |||
// mac FF gets bad width due GWT popups overflow hacks, | |||
// re-determine width | |||
offsetWidth = menu.getOffsetWidth(); | |||
int left = IContextMenu.this.left; | |||
int top = IContextMenu.this.top; | |||
int left = VContextMenu.this.left; | |||
int top = VContextMenu.this.top; | |||
if (offsetWidth + left > Window.getClientWidth()) { | |||
left = left - offsetWidth; | |||
if (left < 0) { |
@@ -17,7 +17,7 @@ import com.vaadin.terminal.gwt.client.RenderSpace; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
import com.vaadin.terminal.gwt.client.Util; | |||
public class ICustomComponent extends SimplePanel implements Container { | |||
public class VCustomComponent extends SimplePanel implements Container { | |||
private static final String CLASSNAME = "i-customcomponent"; | |||
private String height; | |||
@@ -26,7 +26,7 @@ public class ICustomComponent extends SimplePanel implements Container { | |||
private String width; | |||
private RenderSpace renderSpace = new RenderSpace(); | |||
public ICustomComponent() { | |||
public VCustomComponent() { | |||
super(); | |||
setStyleName(CLASSNAME); | |||
} | |||
@@ -59,7 +59,7 @@ public class ICustomComponent extends SimplePanel implements Container { | |||
// FIXME deferred relative size update needed to fix some | |||
// scrollbar issues in sampler. This must be the wrong way | |||
// to do it. Might be that some other component is broken. | |||
client.handleComponentRelativeSize(ICustomComponent.this); | |||
client.handleComponentRelativeSize(VCustomComponent.this); | |||
} | |||
}); |
@@ -20,8 +20,8 @@ import com.vaadin.terminal.gwt.client.ApplicationConnection; | |||
import com.vaadin.terminal.gwt.client.BrowserInfo; | |||
import com.vaadin.terminal.gwt.client.Container; | |||
import com.vaadin.terminal.gwt.client.ContainerResizedListener; | |||
import com.vaadin.terminal.gwt.client.ICaption; | |||
import com.vaadin.terminal.gwt.client.ICaptionWrapper; | |||
import com.vaadin.terminal.gwt.client.VCaption; | |||
import com.vaadin.terminal.gwt.client.VCaptionWrapper; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.RenderSpace; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
@@ -34,7 +34,7 @@ import com.vaadin.terminal.gwt.client.RenderInformation.FloatSize; | |||
* @author IT Mill | |||
* | |||
*/ | |||
public class ICustomLayout extends ComplexPanel implements Paintable, | |||
public class VCustomLayout extends ComplexPanel implements Paintable, | |||
Container, ContainerResizedListener { | |||
public static final String CLASSNAME = "i-customlayout"; | |||
@@ -70,7 +70,7 @@ public class ICustomLayout extends ComplexPanel implements Paintable, | |||
private HashMap<String, FloatSize> locationToExtraSize = new HashMap<String, FloatSize>(); | |||
public ICustomLayout() { | |||
public VCustomLayout() { | |||
setElement(DOM.createDiv()); | |||
// Clear any unwanted styling | |||
DOM.setStyleAttribute(getElement(), "border", "none"); | |||
@@ -384,13 +384,13 @@ public class ICustomLayout extends ComplexPanel implements Paintable, | |||
/** Update caption for given widget */ | |||
public void updateCaption(Paintable component, UIDL uidl) { | |||
ICaptionWrapper wrapper = (ICaptionWrapper) widgetToCaptionWrapper | |||
VCaptionWrapper wrapper = (VCaptionWrapper) widgetToCaptionWrapper | |||
.get(component); | |||
if (ICaption.isNeeded(uidl)) { | |||
if (VCaption.isNeeded(uidl)) { | |||
if (wrapper == null) { | |||
final String loc = getLocation((Widget) component); | |||
super.remove((Widget) component); | |||
wrapper = new ICaptionWrapper(component, client); | |||
wrapper = new VCaptionWrapper(component, client); | |||
super.add(wrapper, (Element) locationToElement.get(loc)); | |||
widgetToCaptionWrapper.put(component, wrapper); | |||
} | |||
@@ -426,7 +426,7 @@ public class ICustomLayout extends ComplexPanel implements Paintable, | |||
if (location != null) { | |||
locationToWidget.remove(location); | |||
} | |||
final ICaptionWrapper cw = (ICaptionWrapper) widgetToCaptionWrapper | |||
final VCaptionWrapper cw = (VCaptionWrapper) widgetToCaptionWrapper | |||
.get(w); | |||
if (cw != null) { | |||
widgetToCaptionWrapper.remove(w); | |||
@@ -479,7 +479,7 @@ public class ICustomLayout extends ComplexPanel implements Paintable, | |||
/*-{ | |||
var self = this; | |||
element.notifyChildrenOfSizeChange = function() { | |||
self.@com.vaadin.terminal.gwt.client.ui.ICustomLayout::notifyChildrenOfSizeChange()(); | |||
self.@com.vaadin.terminal.gwt.client.ui.VCustomLayout::notifyChildrenOfSizeChange()(); | |||
}; | |||
}-*/; | |||
@@ -11,12 +11,12 @@ import com.google.gwt.user.client.ui.FlowPanel; | |||
import com.vaadin.terminal.gwt.client.ApplicationConnection; | |||
import com.vaadin.terminal.gwt.client.ClientExceptionHandler; | |||
import com.vaadin.terminal.gwt.client.DateTimeService; | |||
import com.vaadin.terminal.gwt.client.ITooltip; | |||
import com.vaadin.terminal.gwt.client.VTooltip; | |||
import com.vaadin.terminal.gwt.client.LocaleNotLoadedException; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
public class IDateField extends FlowPanel implements Paintable, Field { | |||
public class VDateField extends FlowPanel implements Paintable, Field { | |||
public static final String CLASSNAME = "i-datefield"; | |||
@@ -48,10 +48,10 @@ public class IDateField extends FlowPanel implements Paintable, Field { | |||
protected DateTimeService dts; | |||
public IDateField() { | |||
public VDateField() { | |||
setStyleName(CLASSNAME); | |||
dts = new DateTimeService(); | |||
sinkEvents(ITooltip.TOOLTIP_EVENTS); | |||
sinkEvents(VTooltip.TOOLTIP_EVENTS); | |||
} | |||
@Override |
@@ -7,13 +7,13 @@ package com.vaadin.terminal.gwt.client.ui; | |||
import com.vaadin.terminal.gwt.client.ApplicationConnection; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
public class IDateFieldCalendar extends IDateField { | |||
public class VDateFieldCalendar extends VDateField { | |||
private final ICalendarPanel date; | |||
private final VCalendarPanel date; | |||
public IDateFieldCalendar() { | |||
public VDateFieldCalendar() { | |||
super(); | |||
date = new ICalendarPanel(this); | |||
date = new VCalendarPanel(this); | |||
add(date); | |||
} | |||
@@ -20,7 +20,7 @@ import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
import com.vaadin.terminal.gwt.client.Util; | |||
public class IEmbedded extends HTML implements Paintable { | |||
public class VEmbedded extends HTML implements Paintable { | |||
private static String CLASSNAME = "i-embedded"; | |||
private String height; | |||
@@ -29,7 +29,7 @@ public class IEmbedded extends HTML implements Paintable { | |||
private ApplicationConnection client; | |||
public IEmbedded() { | |||
public VEmbedded() { | |||
setStyleName(CLASSNAME); | |||
} | |||
@@ -32,7 +32,7 @@ import com.google.gwt.user.client.ui.SuggestOracle.Suggestion; | |||
import com.vaadin.terminal.gwt.client.ApplicationConnection; | |||
import com.vaadin.terminal.gwt.client.BrowserInfo; | |||
import com.vaadin.terminal.gwt.client.Focusable; | |||
import com.vaadin.terminal.gwt.client.ITooltip; | |||
import com.vaadin.terminal.gwt.client.VTooltip; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
import com.vaadin.terminal.gwt.client.Util; | |||
@@ -41,7 +41,7 @@ import com.vaadin.terminal.gwt.client.Util; | |||
* | |||
* TODO needs major refactoring (to be extensible etc) | |||
*/ | |||
public class IFilterSelect extends Composite implements Paintable, Field, | |||
public class VFilterSelect extends Composite implements Paintable, Field, | |||
KeyboardListener, ClickListener, FocusListener, Focusable { | |||
public class FilterSelectSuggestion implements Suggestion, Command { | |||
@@ -87,7 +87,7 @@ public class IFilterSelect extends Composite implements Paintable, Field, | |||
} | |||
} | |||
public class SuggestionPopup extends IToolkitOverlay implements | |||
public class SuggestionPopup extends VToolkitOverlay implements | |||
PositionCallback, PopupListener { | |||
private static final String Z_INDEX = "30000"; | |||
@@ -136,7 +136,7 @@ public class IFilterSelect extends Composite implements Paintable, Field, | |||
"TOOLKIT_COMBOBOX_OPTIONLIST"); | |||
menu.setSuggestions(currentSuggestions); | |||
final int x = IFilterSelect.this.getAbsoluteLeft(); | |||
final int x = VFilterSelect.this.getAbsoluteLeft(); | |||
topPosition = tb.getAbsoluteTop(); | |||
topPosition += tb.getOffsetHeight(); | |||
setPopupPosition(x, topPosition); | |||
@@ -324,7 +324,7 @@ public class IFilterSelect extends Composite implements Paintable, Field, | |||
+ Window.getScrollTop()) { | |||
// popup on top of input instead | |||
top = getPopupTop() - offsetHeight | |||
- IFilterSelect.this.getOffsetHeight(); | |||
- VFilterSelect.this.getOffsetHeight(); | |||
if (top < 0) { | |||
top = 0; | |||
} | |||
@@ -344,8 +344,8 @@ public class IFilterSelect extends Composite implements Paintable, Field, | |||
.getElement()), "offsetWidth"); | |||
if (offsetWidth + getPopupLeft() > Window.getClientWidth() | |||
+ Window.getScrollLeft()) { | |||
left = IFilterSelect.this.getAbsoluteLeft() | |||
+ IFilterSelect.this.getOffsetWidth() | |||
left = VFilterSelect.this.getAbsoluteLeft() | |||
+ VFilterSelect.this.getOffsetWidth() | |||
+ Window.getScrollLeft() - offsetWidth; | |||
if (left < 0) { | |||
left = 0; | |||
@@ -514,7 +514,7 @@ public class IFilterSelect extends Composite implements Paintable, Field, | |||
public void onBrowserEvent(Event event) { | |||
super.onBrowserEvent(event); | |||
if (client != null) { | |||
client.handleTooltipEvent(event, IFilterSelect.this); | |||
client.handleTooltipEvent(event, VFilterSelect.this); | |||
} | |||
} | |||
}; | |||
@@ -570,7 +570,7 @@ public class IFilterSelect extends Composite implements Paintable, Field, | |||
private String lastNewItemString; | |||
private boolean focused = false; | |||
public IFilterSelect() { | |||
public VFilterSelect() { | |||
selectedItemIcon.setVisible(false); | |||
selectedItemIcon.setStyleName("i-icon"); | |||
selectedItemIcon.addLoadListener(new LoadListener() { | |||
@@ -584,7 +584,7 @@ public class IFilterSelect extends Composite implements Paintable, Field, | |||
}); | |||
panel.add(selectedItemIcon); | |||
tb.sinkEvents(ITooltip.TOOLTIP_EVENTS); | |||
tb.sinkEvents(VTooltip.TOOLTIP_EVENTS); | |||
panel.add(tb); | |||
panel.add(popupOpener); | |||
initWidget(panel); |
@@ -13,14 +13,14 @@ import com.google.gwt.user.client.ui.Widget; | |||
import com.vaadin.terminal.gwt.client.ApplicationConnection; | |||
import com.vaadin.terminal.gwt.client.BrowserInfo; | |||
import com.vaadin.terminal.gwt.client.Container; | |||
import com.vaadin.terminal.gwt.client.IErrorMessage; | |||
import com.vaadin.terminal.gwt.client.VErrorMessage; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.RenderInformation; | |||
import com.vaadin.terminal.gwt.client.RenderSpace; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
import com.vaadin.terminal.gwt.client.Util; | |||
public class IForm extends ComplexPanel implements Container { | |||
public class VForm extends ComplexPanel implements Container { | |||
private String height = ""; | |||
@@ -34,7 +34,7 @@ public class IForm extends ComplexPanel implements Container { | |||
private Element errorIndicatorElement = DOM.createDiv(); | |||
private Element desc = DOM.createDiv(); | |||
private Icon icon; | |||
private IErrorMessage errorMessage = new IErrorMessage(); | |||
private VErrorMessage errorMessage = new VErrorMessage(); | |||
private Element fieldContainer = DOM.createDiv(); | |||
@@ -54,7 +54,7 @@ public class IForm extends ComplexPanel implements Container { | |||
private boolean rendering = false; | |||
public IForm() { | |||
public VForm() { | |||
setElement(DOM.createDiv()); | |||
DOM.appendChild(getElement(), fieldSet); | |||
setStyleName(CLASSNAME); |
@@ -17,7 +17,7 @@ import com.google.gwt.user.client.ui.SimplePanel; | |||
import com.google.gwt.user.client.ui.Widget; | |||
import com.vaadin.terminal.gwt.client.ApplicationConnection; | |||
import com.vaadin.terminal.gwt.client.Container; | |||
import com.vaadin.terminal.gwt.client.ITooltip; | |||
import com.vaadin.terminal.gwt.client.VTooltip; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.RenderSpace; | |||
import com.vaadin.terminal.gwt.client.StyleConstants; | |||
@@ -27,26 +27,26 @@ import com.vaadin.terminal.gwt.client.Util; | |||
/** | |||
* Two col Layout that places caption on left col and field on right col | |||
*/ | |||
public class IFormLayout extends SimplePanel implements Container { | |||
public class VFormLayout extends SimplePanel implements Container { | |||
private final static String CLASSNAME = "i-formlayout"; | |||
private ApplicationConnection client; | |||
private IFormLayoutTable table; | |||
private VFormLayoutTable table; | |||
private String width = ""; | |||
private String height = ""; | |||
private boolean rendering = false; | |||
public IFormLayout() { | |||
public VFormLayout() { | |||
super(); | |||
setStylePrimaryName(CLASSNAME); | |||
table = new IFormLayoutTable(); | |||
table = new VFormLayoutTable(); | |||
setWidget(table); | |||
} | |||
public class IFormLayoutTable extends FlexTable { | |||
public class VFormLayoutTable extends FlexTable { | |||
private static final int COLUMN_CAPTION = 0; | |||
private static final int COLUMN_ERRORFLAG = 1; | |||
@@ -55,13 +55,13 @@ public class IFormLayout extends SimplePanel implements Container { | |||
private HashMap<Paintable, Caption> componentToCaption = new HashMap<Paintable, Caption>(); | |||
private HashMap<Paintable, ErrorFlag> componentToError = new HashMap<Paintable, ErrorFlag>(); | |||
public IFormLayoutTable() { | |||
public VFormLayoutTable() { | |||
DOM.setElementProperty(getElement(), "cellPadding", "0"); | |||
DOM.setElementProperty(getElement(), "cellSpacing", "0"); | |||
} | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
final IMarginInfo margins = new IMarginInfo(uidl | |||
final VMarginInfo margins = new VMarginInfo(uidl | |||
.getIntAttribute("margins")); | |||
Element margin = getElement(); | |||
@@ -272,7 +272,7 @@ public class IFormLayout extends SimplePanel implements Container { | |||
this.client = client; | |||
owner = component; | |||
setStyleName(CLASSNAME); | |||
sinkEvents(ITooltip.TOOLTIP_EVENTS); | |||
sinkEvents(VTooltip.TOOLTIP_EVENTS); | |||
} | |||
public void updateCaption(UIDL uidl) { | |||
@@ -374,14 +374,14 @@ public class IFormLayout extends SimplePanel implements Container { | |||
} | |||
private class ErrorFlag extends HTML { | |||
private static final String CLASSNAME = IFormLayout.CLASSNAME | |||
private static final String CLASSNAME = VFormLayout.CLASSNAME | |||
+ "-error-indicator"; | |||
Element errorIndicatorElement; | |||
private Paintable owner; | |||
public ErrorFlag() { | |||
setStyleName(CLASSNAME); | |||
sinkEvents(ITooltip.TOOLTIP_EVENTS); | |||
sinkEvents(VTooltip.TOOLTIP_EVENTS); | |||
} | |||
public void updateFromUIDL(UIDL uidl, Paintable component) { |
@@ -28,7 +28,7 @@ import com.vaadin.terminal.gwt.client.Util; | |||
import com.vaadin.terminal.gwt.client.ui.layout.CellBasedLayout; | |||
import com.vaadin.terminal.gwt.client.ui.layout.ChildComponentContainer; | |||
public class IGridLayout extends SimplePanel implements Paintable, Container { | |||
public class VGridLayout extends SimplePanel implements Paintable, Container { | |||
public static final String CLASSNAME = "i-gridlayout"; | |||
@@ -66,7 +66,7 @@ public class IGridLayout extends SimplePanel implements Paintable, Container { | |||
private boolean sizeChangedDuringRendering = false; | |||
public IGridLayout() { | |||
public VGridLayout() { | |||
super(); | |||
getElement().appendChild(margin); | |||
setStyleName(CLASSNAME); | |||
@@ -598,7 +598,7 @@ public class IGridLayout extends SimplePanel implements Paintable, Container { | |||
} | |||
private void handleMargins(UIDL uidl) { | |||
final IMarginInfo margins = new IMarginInfo(uidl | |||
final VMarginInfo margins = new VMarginInfo(uidl | |||
.getIntAttribute("margins")); | |||
String styles = CLASSNAME + "-margin"; |
@@ -1,10 +1,10 @@ | |||
package com.vaadin.terminal.gwt.client.ui; | |||
public class IHorizontalLayout extends IOrderedLayout { | |||
public class VHorizontalLayout extends VOrderedLayout { | |||
public static final String CLASSNAME = "i-horizontallayout"; | |||
public IHorizontalLayout() { | |||
public VHorizontalLayout() { | |||
super(CLASSNAME, ORIENTATION_HORIZONTAL); | |||
} | |||
@@ -12,12 +12,12 @@ import com.google.gwt.user.client.DOM; | |||
import com.google.gwt.user.client.Event; | |||
import com.google.gwt.user.client.ui.HTML; | |||
import com.vaadin.terminal.gwt.client.ApplicationConnection; | |||
import com.vaadin.terminal.gwt.client.ITooltip; | |||
import com.vaadin.terminal.gwt.client.VTooltip; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
import com.vaadin.terminal.gwt.client.Util; | |||
public class ILabel extends HTML implements Paintable { | |||
public class VLabel extends HTML implements Paintable { | |||
public static final String CLASSNAME = "i-label"; | |||
private static final String CLASSNAME_UNDEFINED_WIDTH = "i-label-undef-w"; | |||
@@ -26,16 +26,16 @@ public class ILabel extends HTML implements Paintable { | |||
private int verticalPaddingBorder = 0; | |||
private int horizontalPaddingBorder = 0; | |||
public ILabel() { | |||
public VLabel() { | |||
super(); | |||
setStyleName(CLASSNAME); | |||
sinkEvents(ITooltip.TOOLTIP_EVENTS); | |||
sinkEvents(VTooltip.TOOLTIP_EVENTS); | |||
} | |||
public ILabel(String text) { | |||
public VLabel(String text) { | |||
super(text); | |||
setStyleName(CLASSNAME); | |||
sinkEvents(ITooltip.TOOLTIP_EVENTS); | |||
sinkEvents(VTooltip.TOOLTIP_EVENTS); | |||
} | |||
@Override |
@@ -12,12 +12,12 @@ import com.google.gwt.user.client.ui.ClickListener; | |||
import com.google.gwt.user.client.ui.HTML; | |||
import com.google.gwt.user.client.ui.Widget; | |||
import com.vaadin.terminal.gwt.client.ApplicationConnection; | |||
import com.vaadin.terminal.gwt.client.ITooltip; | |||
import com.vaadin.terminal.gwt.client.VTooltip; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
import com.vaadin.terminal.gwt.client.Util; | |||
public class ILink extends HTML implements Paintable, ClickListener { | |||
public class VLink extends HTML implements Paintable, ClickListener { | |||
public static final String CLASSNAME = "i-link"; | |||
@@ -49,12 +49,12 @@ public class ILink extends HTML implements Paintable, ClickListener { | |||
private ApplicationConnection client; | |||
public ILink() { | |||
public VLink() { | |||
super(); | |||
getElement().appendChild(anchor); | |||
anchor.appendChild(captionElement); | |||
addClickListener(this); | |||
sinkEvents(ITooltip.TOOLTIP_EVENTS); | |||
sinkEvents(VTooltip.TOOLTIP_EVENTS); | |||
setStyleName(CLASSNAME); | |||
} | |||
@@ -11,11 +11,11 @@ import com.google.gwt.user.client.Event; | |||
import com.google.gwt.user.client.ui.ListBox; | |||
import com.google.gwt.user.client.ui.Widget; | |||
import com.vaadin.terminal.gwt.client.ApplicationConnection; | |||
import com.vaadin.terminal.gwt.client.ITooltip; | |||
import com.vaadin.terminal.gwt.client.VTooltip; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
public class IListSelect extends IOptionGroupBase { | |||
public class VListSelect extends VOptionGroupBase { | |||
public static final String CLASSNAME = "i-select"; | |||
@@ -25,7 +25,7 @@ public class IListSelect extends IOptionGroupBase { | |||
private int lastSelectedIndex = -1; | |||
public IListSelect() { | |||
public VListSelect() { | |||
super(new TooltipListBox(true), CLASSNAME); | |||
select = (TooltipListBox) optionsContainer; | |||
select.setSelect(this); | |||
@@ -120,7 +120,7 @@ class TooltipListBox extends ListBox { | |||
TooltipListBox(boolean isMultiselect) { | |||
super(isMultiselect); | |||
sinkEvents(ITooltip.TOOLTIP_EVENTS); | |||
sinkEvents(VTooltip.TOOLTIP_EVENTS); | |||
} | |||
public void setClient(ApplicationConnection client) { |
@@ -7,7 +7,7 @@ package com.vaadin.terminal.gwt.client.ui; | |||
import java.io.Serializable; | |||
@SuppressWarnings("serial") | |||
public class IMarginInfo implements Serializable { | |||
public class VMarginInfo implements Serializable { | |||
private static final int TOP = 1; | |||
private static final int RIGHT = 2; | |||
@@ -16,11 +16,11 @@ public class IMarginInfo implements Serializable { | |||
private int bitMask; | |||
public IMarginInfo(int bitMask) { | |||
public VMarginInfo(int bitMask) { | |||
this.bitMask = bitMask; | |||
} | |||
public IMarginInfo(boolean top, boolean right, boolean bottom, boolean left) { | |||
public VMarginInfo(boolean top, boolean right, boolean bottom, boolean left) { | |||
setMargins(top, right, bottom, left); | |||
} | |||
@@ -32,7 +32,7 @@ public class IMarginInfo implements Serializable { | |||
bitMask += left ? LEFT : 0; | |||
} | |||
public void setMargins(IMarginInfo marginInfo) { | |||
public void setMargins(VMarginInfo marginInfo) { | |||
bitMask = marginInfo.bitMask; | |||
} | |||
@@ -66,11 +66,11 @@ public class IMarginInfo implements Serializable { | |||
@Override | |||
public boolean equals(Object obj) { | |||
if (!(obj instanceof IMarginInfo)) { | |||
if (!(obj instanceof VMarginInfo)) { | |||
return false; | |||
} | |||
return ((IMarginInfo) obj).bitMask == bitMask; | |||
return ((VMarginInfo) obj).bitMask == bitMask; | |||
} | |||
} |
@@ -19,7 +19,7 @@ import com.vaadin.terminal.gwt.client.ApplicationConnection; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
public class IMenuBar extends Widget implements Paintable, PopupListener { | |||
public class VMenuBar extends Widget implements Paintable, PopupListener { | |||
/** Set the CSS class name to allow styling. */ | |||
public static final String CLASSNAME = "i-menubar"; | |||
@@ -28,7 +28,7 @@ public class IMenuBar extends Widget implements Paintable, PopupListener { | |||
protected String uidlId; | |||
protected ApplicationConnection client; | |||
protected final IMenuBar hostReference = this; | |||
protected final VMenuBar hostReference = this; | |||
protected String submenuIcon = null; | |||
protected boolean collapseItems = true; | |||
protected CustomMenuItem moreItem = null; | |||
@@ -41,17 +41,17 @@ public class IMenuBar extends Widget implements Paintable, PopupListener { | |||
protected boolean subMenu; | |||
protected ArrayList<CustomMenuItem> items; | |||
protected Element containerElement; | |||
protected IToolkitOverlay popup; | |||
protected IMenuBar visibleChildMenu; | |||
protected IMenuBar parentMenu; | |||
protected VToolkitOverlay popup; | |||
protected VMenuBar visibleChildMenu; | |||
protected VMenuBar parentMenu; | |||
protected CustomMenuItem selected; | |||
public IMenuBar() { | |||
public VMenuBar() { | |||
// Create an empty horizontal menubar | |||
this(false); | |||
} | |||
public IMenuBar(boolean subMenu) { | |||
public VMenuBar(boolean subMenu) { | |||
super(); | |||
setElement(DOM.createDiv()); | |||
@@ -130,8 +130,8 @@ public class IMenuBar extends Widget implements Paintable, PopupListener { | |||
UIDL uidlItems = uidl.getChildUIDL(1); | |||
Iterator<UIDL> itr = uidlItems.getChildIterator(); | |||
Stack<Iterator<UIDL>> iteratorStack = new Stack<Iterator<UIDL>>(); | |||
Stack<IMenuBar> menuStack = new Stack<IMenuBar>(); | |||
IMenuBar currentMenu = this; | |||
Stack<VMenuBar> menuStack = new Stack<VMenuBar>(); | |||
VMenuBar currentMenu = this; | |||
while (itr.hasNext()) { | |||
UIDL item = (UIDL) itr.next(); | |||
@@ -178,13 +178,13 @@ public class IMenuBar extends Widget implements Paintable, PopupListener { | |||
menuStack.push(currentMenu); | |||
iteratorStack.push(itr); | |||
itr = item.getChildIterator(); | |||
currentMenu = new IMenuBar(true); | |||
currentMenu = new VMenuBar(true); | |||
currentItem.setSubMenu(currentMenu); | |||
} | |||
while (!itr.hasNext() && !iteratorStack.empty()) { | |||
itr = iteratorStack.pop(); | |||
currentMenu = (IMenuBar) menuStack.pop(); | |||
currentMenu = (VMenuBar) menuStack.pop(); | |||
} | |||
}// while | |||
@@ -202,7 +202,7 @@ public class IMenuBar extends Widget implements Paintable, PopupListener { | |||
if (topLevelWidth > getOffsetWidth()) { | |||
ArrayList<CustomMenuItem> toBeCollapsed = new ArrayList<CustomMenuItem>(); | |||
IMenuBar collapsed = new IMenuBar(true); | |||
VMenuBar collapsed = new VMenuBar(true); | |||
for (int j = i - 2; j < getItems().size(); j++) { | |||
toBeCollapsed.add(getItems().get(j)); | |||
} | |||
@@ -435,7 +435,7 @@ public class IMenuBar extends Widget implements Paintable, PopupListener { | |||
* @param item | |||
*/ | |||
public void showChildMenu(CustomMenuItem item) { | |||
popup = new IToolkitOverlay(true, false, true); | |||
popup = new VToolkitOverlay(true, false, true); | |||
popup.setWidget(item.getSubMenu()); | |||
popup.addPopupListener(this); | |||
@@ -509,7 +509,7 @@ public class IMenuBar extends Widget implements Paintable, PopupListener { | |||
* | |||
* @return | |||
*/ | |||
public IMenuBar getParentMenu() { | |||
public VMenuBar getParentMenu() { | |||
return parentMenu; | |||
} | |||
@@ -518,7 +518,7 @@ public class IMenuBar extends Widget implements Paintable, PopupListener { | |||
* | |||
* @param parent | |||
*/ | |||
public void setParentMenu(IMenuBar parent) { | |||
public void setParentMenu(VMenuBar parent) { | |||
parentMenu = parent; | |||
} | |||
@@ -573,8 +573,8 @@ public class IMenuBar extends Widget implements Paintable, PopupListener { | |||
protected String html = null; | |||
protected Command command = null; | |||
protected IMenuBar subMenu = null; | |||
protected IMenuBar parentMenu = null; | |||
protected VMenuBar subMenu = null; | |||
protected VMenuBar parentMenu = null; | |||
public CustomMenuItem(String html, Command cmd) { | |||
setElement(DOM.createTD()); | |||
@@ -598,19 +598,19 @@ public class IMenuBar extends Widget implements Paintable, PopupListener { | |||
* setters and getters for the fields | |||
*/ | |||
public void setSubMenu(IMenuBar subMenu) { | |||
public void setSubMenu(VMenuBar subMenu) { | |||
this.subMenu = subMenu; | |||
} | |||
public IMenuBar getSubMenu() { | |||
public VMenuBar getSubMenu() { | |||
return subMenu; | |||
} | |||
public void setParentMenu(IMenuBar parentMenu) { | |||
public void setParentMenu(VMenuBar parentMenu) { | |||
this.parentMenu = parentMenu; | |||
} | |||
public IMenuBar getParentMenu() { | |||
public VMenuBar getParentMenu() { | |||
return parentMenu; | |||
} | |||
@@ -641,4 +641,4 @@ public class IMenuBar extends Widget implements Paintable, PopupListener { | |||
} | |||
} | |||
}// class IMenuBar | |||
}// class VMenuBar |
@@ -12,13 +12,13 @@ import com.vaadin.terminal.gwt.client.BrowserInfo; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
import com.vaadin.terminal.gwt.client.Util; | |||
public class INativeSelect extends IOptionGroupBase implements Field { | |||
public class VNativeSelect extends VOptionGroupBase implements Field { | |||
public static final String CLASSNAME = "i-select"; | |||
protected TooltipListBox select; | |||
public INativeSelect() { | |||
public VNativeSelect() { | |||
super(new TooltipListBox(false), CLASSNAME); | |||
select = (TooltipListBox) optionsContainer; | |||
select.setSelect(this); |
@@ -17,7 +17,7 @@ import com.google.gwt.user.client.ui.HTML; | |||
import com.google.gwt.user.client.ui.Widget; | |||
import com.vaadin.terminal.gwt.client.BrowserInfo; | |||
public class INotification extends IToolkitOverlay { | |||
public class VNotification extends VToolkitOverlay { | |||
public static final int CENTERED = 1; | |||
public static final int CENTERED_TOP = 2; | |||
@@ -50,18 +50,18 @@ public class INotification extends IToolkitOverlay { | |||
private ArrayList<EventListener> listeners; | |||
public INotification() { | |||
public VNotification() { | |||
setStylePrimaryName(STYLENAME); | |||
sinkEvents(Event.ONCLICK); | |||
DOM.setStyleAttribute(getElement(), "zIndex", "" + Z_INDEX_BASE); | |||
} | |||
public INotification(int delayMsec) { | |||
public VNotification(int delayMsec) { | |||
this(); | |||
this.delayMsec = delayMsec; | |||
} | |||
public INotification(int delayMsec, int fadeMsec, int startOpacity) { | |||
public VNotification(int delayMsec, int fadeMsec, int startOpacity) { | |||
this(delayMsec); | |||
this.fadeMsec = fadeMsec; | |||
this.startOpacity = startOpacity; |
@@ -15,7 +15,7 @@ import com.google.gwt.user.client.ui.RadioButton; | |||
import com.google.gwt.user.client.ui.Widget; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
public class IOptionGroup extends IOptionGroupBase { | |||
public class VOptionGroup extends VOptionGroupBase { | |||
public static final String CLASSNAME = "i-select-optiongroup"; | |||
@@ -23,7 +23,7 @@ public class IOptionGroup extends IOptionGroupBase { | |||
private final Map optionsToKeys; | |||
public IOptionGroup() { | |||
public VOptionGroup() { | |||
super(CLASSNAME); | |||
panel = (Panel) optionsContainer; | |||
optionsToKeys = new HashMap(); | |||
@@ -39,7 +39,7 @@ public class IOptionGroup extends IOptionGroupBase { | |||
final UIDL opUidl = (UIDL) it.next(); | |||
CheckBox op; | |||
if (isMultiselect()) { | |||
op = new ICheckBox(); | |||
op = new VCheckBox(); | |||
op.setText(opUidl.getStringAttribute("caption")); | |||
} else { | |||
op = new RadioButton(id, opUidl.getStringAttribute("caption")); | |||
@@ -83,7 +83,7 @@ public class IOptionGroup extends IOptionGroupBase { | |||
protected void setTabIndex(int tabIndex) { | |||
for (Iterator iterator = panel.iterator(); iterator.hasNext();) { | |||
if (isMultiselect()) { | |||
ICheckBox cb = (ICheckBox) iterator.next(); | |||
VCheckBox cb = (VCheckBox) iterator.next(); | |||
cb.setTabIndex(tabIndex); | |||
} else { | |||
RadioButton rb = (RadioButton) iterator.next(); |
@@ -18,7 +18,7 @@ import com.vaadin.terminal.gwt.client.Focusable; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
abstract class IOptionGroupBase extends Composite implements Paintable, Field, | |||
abstract class VOptionGroupBase extends Composite implements Paintable, Field, | |||
ClickListener, ChangeListener, KeyboardListener, Focusable { | |||
public static final String CLASSNAME_OPTION = "i-select-option"; | |||
@@ -56,11 +56,11 @@ abstract class IOptionGroupBase extends Composite implements Paintable, Field, | |||
*/ | |||
private final Panel container; | |||
private ITextField newItemField; | |||
private VTextField newItemField; | |||
private IButton newItemButton; | |||
private VButton newItemButton; | |||
public IOptionGroupBase(String classname) { | |||
public VOptionGroupBase(String classname) { | |||
container = new FlowPanel(); | |||
initWidget(container); | |||
optionsContainer = container; | |||
@@ -73,7 +73,7 @@ abstract class IOptionGroupBase extends Composite implements Paintable, Field, | |||
* Call this if you wish to specify your own container for the option | |||
* elements (e.g. SELECT) | |||
*/ | |||
public IOptionGroupBase(Widget w, String classname) { | |||
public VOptionGroupBase(Widget w, String classname) { | |||
this(classname); | |||
optionsContainer = w; | |||
container.add(optionsContainer); | |||
@@ -151,11 +151,11 @@ abstract class IOptionGroupBase extends Composite implements Paintable, Field, | |||
if (uidl.getBooleanAttribute("allownewitem")) { | |||
if (newItemField == null) { | |||
newItemButton = new IButton(); | |||
newItemButton = new VButton(); | |||
newItemButton.setText("+"); | |||
newItemButton.setWidth("1.5em"); | |||
newItemButton.addClickListener(this); | |||
newItemField = new ITextField(); | |||
newItemField = new VTextField(); | |||
newItemField.addKeyboardListener(this); | |||
// newItemField.setColumns(16); | |||
if (getColumns() > 0) { |
@@ -16,7 +16,7 @@ import com.vaadin.terminal.gwt.client.RenderInformation.Size; | |||
import com.vaadin.terminal.gwt.client.ui.layout.CellBasedLayout; | |||
import com.vaadin.terminal.gwt.client.ui.layout.ChildComponentContainer; | |||
public class IOrderedLayout extends CellBasedLayout { | |||
public class VOrderedLayout extends CellBasedLayout { | |||
public static final String CLASSNAME = "i-orderedlayout"; | |||
@@ -36,12 +36,12 @@ public class IOrderedLayout extends CellBasedLayout { | |||
private boolean sizeHasChangedDuringRendering = false; | |||
public IOrderedLayout() { | |||
public VOrderedLayout() { | |||
this(CLASSNAME, ORIENTATION_VERTICAL); | |||
allowOrientationUpdate = true; | |||
} | |||
protected IOrderedLayout(String className, int orientation) { | |||
protected VOrderedLayout(String className, int orientation) { | |||
setStyleName(className); | |||
this.orientation = orientation; | |||
@@ -22,7 +22,7 @@ import com.vaadin.terminal.gwt.client.RenderSpace; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
import com.vaadin.terminal.gwt.client.Util; | |||
public class IPanel extends SimplePanel implements Container { | |||
public class VPanel extends SimplePanel implements Container { | |||
public static final String CLASSNAME = "i-panel"; | |||
@@ -72,7 +72,7 @@ public class IPanel extends SimplePanel implements Container { | |||
private String previousStyleName; | |||
public IPanel() { | |||
public VPanel() { | |||
super(); | |||
DivElement captionWrap = Document.get().createDivElement(); | |||
captionWrap.appendChild(captionNode); | |||
@@ -252,7 +252,7 @@ public class IPanel extends SimplePanel implements Container { | |||
* no width has been specified. | |||
*/ | |||
/* | |||
* Fixes #1923 IPanel: Horizontal scrollbar does not appear in IE6 | |||
* Fixes #1923 VPanel: Horizontal scrollbar does not appear in IE6 | |||
* with wide content | |||
*/ | |||
@@ -12,9 +12,9 @@ import com.google.gwt.user.client.DOM; | |||
* @author IT Mill Ltd. | |||
* | |||
*/ | |||
public class IPasswordField extends ITextField { | |||
public class VPasswordField extends VTextField { | |||
public IPasswordField() { | |||
public VPasswordField() { | |||
super(DOM.createInputPassword()); | |||
} | |||
@@ -17,17 +17,17 @@ import com.vaadin.terminal.gwt.client.ApplicationConnection; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
public class IPopupCalendar extends ITextualDate implements Paintable, Field, | |||
public class VPopupCalendar extends VTextualDate implements Paintable, Field, | |||
ClickListener, PopupListener { | |||
private final Button calendarToggle; | |||
private final ICalendarPanel calendar; | |||
private final VCalendarPanel calendar; | |||
private final IToolkitOverlay popup; | |||
private final VToolkitOverlay popup; | |||
private boolean open = false; | |||
public IPopupCalendar() { | |||
public VPopupCalendar() { | |||
super(); | |||
calendarToggle = new Button(); | |||
@@ -36,9 +36,9 @@ public class IPopupCalendar extends ITextualDate implements Paintable, Field, | |||
calendarToggle.addClickListener(this); | |||
add(calendarToggle); | |||
calendar = new ICalendarPanel(this); | |||
popup = new IToolkitOverlay(true, true, true); | |||
popup.setStyleName(IDateField.CLASSNAME + "-popup"); | |||
calendar = new VCalendarPanel(this); | |||
popup = new VToolkitOverlay(true, true, true); | |||
popup.setStyleName(VDateField.CLASSNAME + "-popup"); | |||
popup.setWidget(calendar); | |||
popup.addPopupListener(this); | |||
@@ -16,16 +16,16 @@ import com.google.gwt.user.client.ui.RootPanel; | |||
import com.google.gwt.user.client.ui.Widget; | |||
import com.vaadin.terminal.gwt.client.ApplicationConnection; | |||
import com.vaadin.terminal.gwt.client.Container; | |||
import com.vaadin.terminal.gwt.client.ICaption; | |||
import com.vaadin.terminal.gwt.client.ICaptionWrapper; | |||
import com.vaadin.terminal.gwt.client.ITooltip; | |||
import com.vaadin.terminal.gwt.client.VCaption; | |||
import com.vaadin.terminal.gwt.client.VCaptionWrapper; | |||
import com.vaadin.terminal.gwt.client.VTooltip; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.RenderSpace; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
import com.vaadin.terminal.gwt.client.Util; | |||
import com.vaadin.terminal.gwt.client.RenderInformation.Size; | |||
public class IPopupView extends HTML implements Container { | |||
public class VPopupView extends HTML implements Container { | |||
public static final String CLASSNAME = "i-popupview"; | |||
@@ -42,7 +42,7 @@ public class IPopupView extends HTML implements Container { | |||
/** | |||
* loading constructor | |||
*/ | |||
public IPopupView() { | |||
public VPopupView() { | |||
super(); | |||
popup = new CustomPopup(); | |||
@@ -67,7 +67,7 @@ public class IPopupView extends HTML implements Container { | |||
}); | |||
popup.setAnimationEnabled(true); | |||
sinkEvents(ITooltip.TOOLTIP_EVENTS); | |||
sinkEvents(VTooltip.TOOLTIP_EVENTS); | |||
} | |||
/** | |||
@@ -152,10 +152,10 @@ public class IPopupView extends HTML implements Container { | |||
int offsetWidth = popup.getOffsetWidth(); | |||
int offsetHeight = popup.getOffsetHeight(); | |||
int hostHorizontalCenter = IPopupView.this.getAbsoluteLeft() | |||
+ IPopupView.this.getOffsetWidth() / 2; | |||
int hostVerticalCenter = IPopupView.this.getAbsoluteTop() | |||
+ IPopupView.this.getOffsetHeight() / 2; | |||
int hostHorizontalCenter = VPopupView.this.getAbsoluteLeft() | |||
+ VPopupView.this.getOffsetWidth() / 2; | |||
int hostVerticalCenter = VPopupView.this.getAbsoluteTop() | |||
+ VPopupView.this.getOffsetHeight() / 2; | |||
int left = hostHorizontalCenter - offsetWidth / 2; | |||
int top = hostVerticalCenter - offsetHeight / 2; | |||
@@ -192,11 +192,11 @@ public class IPopupView extends HTML implements Container { | |||
} | |||
}-*/; | |||
private class CustomPopup extends IToolkitOverlay { | |||
private class CustomPopup extends VToolkitOverlay { | |||
private Paintable popupComponentPaintable = null; | |||
private Widget popupComponentWidget = null; | |||
private ICaptionWrapper captionWrapper = null; | |||
private VCaptionWrapper captionWrapper = null; | |||
private boolean hasHadMouseOver = false; | |||
private boolean hideOnMouseOut = true; | |||
@@ -314,7 +314,7 @@ public class IPopupView extends HTML implements Container { | |||
/* | |||
* | |||
* We need a hack make popup act as a child of IPopupView in toolkits | |||
* We need a hack make popup act as a child of VPopupView in toolkits | |||
* component tree, but work in default GWT manner when closing or | |||
* opening. | |||
* | |||
@@ -327,7 +327,7 @@ public class IPopupView extends HTML implements Container { | |||
if (!isAttached() || hiding) { | |||
return super.getParent(); | |||
} else { | |||
return IPopupView.this; | |||
return VPopupView.this; | |||
} | |||
} | |||
@@ -388,11 +388,11 @@ public class IPopupView extends HTML implements Container { | |||
} | |||
public void updateCaption(Paintable component, UIDL uidl) { | |||
if (ICaption.isNeeded(uidl)) { | |||
if (VCaption.isNeeded(uidl)) { | |||
if (popup.captionWrapper != null) { | |||
popup.captionWrapper.updateCaption(uidl); | |||
} else { | |||
popup.captionWrapper = new ICaptionWrapper(component, client); | |||
popup.captionWrapper = new VCaptionWrapper(component, client); | |||
popup.setWidget(popup.captionWrapper); | |||
popup.captionWrapper.updateCaption(uidl); | |||
} | |||
@@ -414,4 +414,4 @@ public class IPopupView extends HTML implements Container { | |||
} | |||
} | |||
}// class IPopupView | |||
}// class VPopupView |
@@ -12,7 +12,7 @@ import com.vaadin.terminal.gwt.client.ApplicationConnection; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
public class IProgressIndicator extends Widget implements Paintable { | |||
public class VProgressIndicator extends Widget implements Paintable { | |||
private static final String CLASSNAME = "i-progressindicator"; | |||
Element wrapper = DOM.createDiv(); | |||
@@ -22,7 +22,7 @@ public class IProgressIndicator extends Widget implements Paintable { | |||
private boolean indeterminate = false; | |||
private boolean pollerSuspendedDueDetach; | |||
public IProgressIndicator() { | |||
public VProgressIndicator() { | |||
setElement(DOM.createDiv()); | |||
getElement().appendChild(wrapper); | |||
setStyleName(CLASSNAME); | |||
@@ -47,8 +47,8 @@ public class IProgressIndicator extends Widget implements Paintable { | |||
if (indeterminate) { | |||
String basename = CLASSNAME + "-indeterminate"; | |||
IProgressIndicator.setStyleName(getElement(), basename, true); | |||
IProgressIndicator.setStyleName(getElement(), basename | |||
VProgressIndicator.setStyleName(getElement(), basename, true); | |||
VProgressIndicator.setStyleName(getElement(), basename | |||
+ "-disabled", uidl.getBooleanAttribute("disabled")); | |||
} else { | |||
try { |
@@ -39,32 +39,32 @@ import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.RenderSpace; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
import com.vaadin.terminal.gwt.client.Util; | |||
import com.vaadin.terminal.gwt.client.ui.IScrollTable.IScrollTableBody.IScrollTableRow; | |||
import com.vaadin.terminal.gwt.client.ui.VScrollTable.VScrollTableBody.VScrollTableRow; | |||
/** | |||
* IScrollTable | |||
* VScrollTable | |||
* | |||
* IScrollTable is a FlowPanel having two widgets in it: * TableHead component * | |||
* VScrollTable is a FlowPanel having two widgets in it: * TableHead component * | |||
* ScrollPanel | |||
* | |||
* TableHead contains table's header and widgets + logic for resizing, | |||
* reordering and hiding columns. | |||
* | |||
* ScrollPanel contains IScrollTableBody object which handles content. To save | |||
* ScrollPanel contains VScrollTableBody object which handles content. To save | |||
* some bandwidth and to improve clients responsiveness with loads of data, in | |||
* IScrollTableBody all rows are not necessary rendered. There are "spacers" in | |||
* IScrollTableBody to use the exact same space as non-rendered rows would use. | |||
* VScrollTableBody all rows are not necessary rendered. There are "spacers" in | |||
* VScrollTableBody to use the exact same space as non-rendered rows would use. | |||
* This way we can use seamlessly traditional scrollbars and scrolling to fetch | |||
* more rows instead of "paging". | |||
* | |||
* In IScrollTable we listen to scroll events. On horizontal scrolling we also | |||
* In VScrollTable we listen to scroll events. On horizontal scrolling we also | |||
* update TableHeads scroll position which has its scrollbars hidden. On | |||
* vertical scroll events we will check if we are reaching the end of area where | |||
* we have rows rendered and | |||
* | |||
* TODO implement unregistering for child components in Cells | |||
*/ | |||
public class IScrollTable extends FlowPanel implements Table, ScrollListener { | |||
public class VScrollTable extends FlowPanel implements Table, ScrollListener { | |||
public static final String CLASSNAME = "i-table"; | |||
/** | |||
@@ -113,7 +113,7 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener { | |||
private Set<String> collapsedColumns; | |||
private final RowRequestHandler rowRequestHandler; | |||
private IScrollTableBody tBody; | |||
private VScrollTableBody tBody; | |||
private int firstvisible = 0; | |||
private boolean sortAscending; | |||
private String sortColumn; | |||
@@ -147,7 +147,7 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener { | |||
private String width = ""; | |||
private boolean rendering = false; | |||
public IScrollTable() { | |||
public VScrollTable() { | |||
bodyContainer.addScrollListener(this); | |||
bodyContainer.setStyleName(CLASSNAME + "-body"); | |||
@@ -270,7 +270,7 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener { | |||
tBody.removeFromParent(); | |||
lazyUnregistryBag.add(tBody); | |||
} | |||
tBody = new IScrollTableBody(); | |||
tBody = new VScrollTableBody(); | |||
tBody.renderInitialRows(rowData, uidl.getIntAttribute("firstrow"), | |||
uidl.getIntAttribute("rows")); | |||
@@ -437,11 +437,11 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener { | |||
return tHead.getHeaderCell(colKey).getWidth(); | |||
} | |||
private IScrollTableRow getRenderedRowByKey(String key) { | |||
private VScrollTableRow getRenderedRowByKey(String key) { | |||
final Iterator<Widget> it = tBody.iterator(); | |||
IScrollTableRow r = null; | |||
VScrollTableRow r = null; | |||
while (it.hasNext()) { | |||
r = (IScrollTableRow) it.next(); | |||
r = (VScrollTableRow) it.next(); | |||
if (r.getKey().equals(key)) { | |||
return r; | |||
} | |||
@@ -1653,7 +1653,7 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener { | |||
private boolean collapsed; | |||
public VisibleColumnAction(String colKey) { | |||
super(IScrollTable.TableHead.this); | |||
super(VScrollTable.TableHead.this); | |||
this.colKey = colKey; | |||
caption = tHead.getHeaderCell(colKey).getCaption(); | |||
} | |||
@@ -1762,12 +1762,12 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener { | |||
} | |||
/** | |||
* This Panel can only contain IScrollTableRow type of widgets. This | |||
* This Panel can only contain VScrollTableRow type of widgets. This | |||
* "simulates" very large table, keeping spacers which take room of | |||
* unrendered rows. | |||
* | |||
*/ | |||
public class IScrollTableBody extends Panel { | |||
public class VScrollTableBody extends Panel { | |||
public static final int DEFAULT_ROW_HEIGHT = 24; | |||
@@ -1796,7 +1796,7 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener { | |||
private char[] aligns; | |||
IScrollTableBody() { | |||
VScrollTableBody() { | |||
constructDOM(); | |||
setElement(container); | |||
@@ -1830,7 +1830,7 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener { | |||
final Iterator<?> it = rowData.getChildIterator(); | |||
aligns = tHead.getColumnAlignments(); | |||
while (it.hasNext()) { | |||
final IScrollTableRow row = new IScrollTableRow((UIDL) it | |||
final VScrollTableRow row = new VScrollTableRow((UIDL) it | |||
.next(), aligns); | |||
addRow(row); | |||
} | |||
@@ -1845,13 +1845,13 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener { | |||
final Iterator<?> it = rowData.getChildIterator(); | |||
if (firstIndex == lastRendered + 1) { | |||
while (it.hasNext()) { | |||
final IScrollTableRow row = createRow((UIDL) it.next()); | |||
final VScrollTableRow row = createRow((UIDL) it.next()); | |||
addRow(row); | |||
lastRendered++; | |||
} | |||
fixSpacers(); | |||
} else if (firstIndex + rows == firstRendered) { | |||
final IScrollTableRow[] rowArray = new IScrollTableRow[rows]; | |||
final VScrollTableRow[] rowArray = new VScrollTableRow[rows]; | |||
int i = rows; | |||
while (it.hasNext()) { | |||
i--; | |||
@@ -1866,7 +1866,7 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener { | |||
while (lastRendered + 1 > firstRendered) { | |||
unlinkRow(false); | |||
} | |||
final IScrollTableRow row = createRow((UIDL) it.next()); | |||
final VScrollTableRow row = createRow((UIDL) it.next()); | |||
firstRendered = firstIndex; | |||
lastRendered = firstIndex - 1; | |||
addRow(row); | |||
@@ -1920,12 +1920,12 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener { | |||
* | |||
* @param uidl | |||
*/ | |||
private IScrollTableRow createRow(UIDL uidl) { | |||
final IScrollTableRow row = new IScrollTableRow(uidl, aligns); | |||
private VScrollTableRow createRow(UIDL uidl) { | |||
final VScrollTableRow row = new VScrollTableRow(uidl, aligns); | |||
final int cells = DOM.getChildCount(row.getElement()); | |||
for (int i = 0; i < cells; i++) { | |||
final Element cell = DOM.getChild(row.getElement(), i); | |||
int w = IScrollTable.this.getColWidth(getColKeyByIndex(i)); | |||
int w = VScrollTable.this.getColWidth(getColKeyByIndex(i)); | |||
if (w < 0) { | |||
w = 0; | |||
} | |||
@@ -1936,10 +1936,10 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener { | |||
return row; | |||
} | |||
private void addRowBeforeFirstRendered(IScrollTableRow row) { | |||
IScrollTableRow first = null; | |||
private void addRowBeforeFirstRendered(VScrollTableRow row) { | |||
VScrollTableRow first = null; | |||
if (renderedRows.size() > 0) { | |||
first = (IScrollTableRow) renderedRows.get(0); | |||
first = (VScrollTableRow) renderedRows.get(0); | |||
} | |||
if (first != null && first.getStyleName().indexOf("-odd") == -1) { | |||
row.addStyleName(CLASSNAME + "-row-odd"); | |||
@@ -1955,10 +1955,10 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener { | |||
renderedRows.add(0, row); | |||
} | |||
private void addRow(IScrollTableRow row) { | |||
IScrollTableRow last = null; | |||
private void addRow(VScrollTableRow row) { | |||
VScrollTableRow last = null; | |||
if (renderedRows.size() > 0) { | |||
last = (IScrollTableRow) renderedRows | |||
last = (VScrollTableRow) renderedRows | |||
.get(renderedRows.size() - 1); | |||
} | |||
if (last != null && last.getStyleName().indexOf("-odd") == -1) { | |||
@@ -1994,7 +1994,7 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener { | |||
lastRendered--; | |||
} | |||
if (index >= 0) { | |||
final IScrollTableRow toBeRemoved = (IScrollTableRow) renderedRows | |||
final VScrollTableRow toBeRemoved = (VScrollTableRow) renderedRows | |||
.get(index); | |||
lazyUnregistryBag.add(toBeRemoved); | |||
tBodyElement.removeChild(toBeRemoved.getElement()); | |||
@@ -2056,7 +2056,7 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener { | |||
} else { | |||
if (isAttached()) { | |||
// measure row height by adding a dummy row | |||
IScrollTableRow scrollTableRow = new IScrollTableRow(); | |||
VScrollTableRow scrollTableRow = new VScrollTableRow(); | |||
tBodyElement.appendChild(scrollTableRow.getElement()); | |||
getRowHeight(forceUpdate); | |||
tBodyElement.removeChild(scrollTableRow.getElement()); | |||
@@ -2138,7 +2138,7 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener { | |||
NodeList<TableRowElement> rows = tBodyElement.getRows(); | |||
if (rows.getLength() == 0) { | |||
/* need to temporary add empty row and detect */ | |||
IScrollTableRow scrollTableRow = new IScrollTableRow(); | |||
VScrollTableRow scrollTableRow = new VScrollTableRow(); | |||
tBodyElement.appendChild(scrollTableRow.getElement()); | |||
detectExtrawidth(); | |||
tBodyElement.removeChild(scrollTableRow.getElement()); | |||
@@ -2154,7 +2154,7 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener { | |||
private void reLayoutComponents() { | |||
for (Widget w : this) { | |||
IScrollTableRow r = (IScrollTableRow) w; | |||
VScrollTableRow r = (VScrollTableRow) w; | |||
for (Widget widget : r) { | |||
client.handleComponentRelativeSize(widget); | |||
} | |||
@@ -2174,7 +2174,7 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener { | |||
// loop all rows and move given index to its new place | |||
final Iterator<?> rows = iterator(); | |||
while (rows.hasNext()) { | |||
final IScrollTableRow row = (IScrollTableRow) rows.next(); | |||
final VScrollTableRow row = (VScrollTableRow) rows.next(); | |||
final Element td = DOM.getChild(row.getElement(), oldIndex); | |||
DOM.removeChild(row.getElement(), td); | |||
@@ -2185,7 +2185,7 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener { | |||
} | |||
public class IScrollTableRow extends Panel implements ActionOwner, | |||
public class VScrollTableRow extends Panel implements ActionOwner, | |||
Container { | |||
Vector<Widget> childWidgets = new Vector<Widget>(); | |||
@@ -2196,7 +2196,7 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener { | |||
private String[] actionKeys = null; | |||
private TableRowElement rowElement; | |||
private IScrollTableRow(int rowKey) { | |||
private VScrollTableRow(int rowKey) { | |||
this.rowKey = rowKey; | |||
rowElement = Document.get().createTRElement(); | |||
setElement(rowElement); | |||
@@ -2230,7 +2230,7 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener { | |||
return String.valueOf(rowKey); | |||
} | |||
public IScrollTableRow(UIDL uidl, char[] aligns) { | |||
public VScrollTableRow(UIDL uidl, char[] aligns) { | |||
this(uidl.getIntAttribute("key")); | |||
String rowStyle = uidl.getStringAttribute("rowstyle"); | |||
@@ -2282,7 +2282,7 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener { | |||
/** | |||
* Add a dummy row, used for measurements if Table is empty. | |||
*/ | |||
public IScrollTableRow() { | |||
public VScrollTableRow() { | |||
this(0); | |||
addStyleName(CLASSNAME + "-row"); | |||
addCell("_", 'b', "", true); | |||
@@ -2474,7 +2474,7 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener { | |||
* This is a workaround to make Labels and Embedded in a | |||
* Table clickable (see #2688). It is really not a fix as it | |||
* does not work for a custom component (not extending | |||
* ILabel/IEmbedded) or for read only textfields etc. | |||
* VLabel/VEmbedded) or for read only textfields etc. | |||
*/ | |||
Element tdElement = eventTargetParent; | |||
while (DOM.getParent(tdElement) != thisTrElement) { | |||
@@ -2485,7 +2485,7 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener { | |||
.getFirstChildElement().cast(); | |||
Widget widget = (Widget) client | |||
.getPaintable(componentElement); | |||
if (widget instanceof ILabel || widget instanceof IEmbedded) { | |||
if (widget instanceof VLabel || widget instanceof VEmbedded) { | |||
targetTdOrTr = tdElement; | |||
} | |||
} | |||
@@ -2622,7 +2622,7 @@ public class IScrollTable extends FlowPanel implements Table, ScrollListener { | |||
public void deselectAll() { | |||
final Object[] keys = selectedRowKeys.toArray(); | |||
for (int i = 0; i < keys.length; i++) { | |||
final IScrollTableRow row = getRenderedRowByKey((String) keys[i]); | |||
final VScrollTableRow row = getRenderedRowByKey((String) keys[i]); | |||
if (row != null && row.isSelected()) { | |||
row.toggleSelection(); | |||
} |
@@ -17,7 +17,7 @@ import com.vaadin.terminal.gwt.client.ContainerResizedListener; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
public class ISlider extends Widget implements Paintable, Field, | |||
public class VSlider extends Widget implements Paintable, Field, | |||
ContainerResizedListener { | |||
public static final String CLASSNAME = "i-slider"; | |||
@@ -62,7 +62,7 @@ public class ISlider extends Widget implements Paintable, Field, | |||
/* Temporary dragging/animation variables */ | |||
private boolean dragging = false; | |||
public ISlider() { | |||
public VSlider() { | |||
super(); | |||
setElement(DOM.createDiv()); |
@@ -24,7 +24,7 @@ import com.vaadin.terminal.gwt.client.RenderSpace; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
import com.vaadin.terminal.gwt.client.Util; | |||
public class ISplitPanel extends ComplexPanel implements Container, | |||
public class VSplitPanel extends ComplexPanel implements Container, | |||
ContainerResizedListener { | |||
public static final String CLASSNAME = "i-splitpanel"; | |||
@@ -81,11 +81,11 @@ public class ISplitPanel extends ComplexPanel implements Container, | |||
private boolean rendering = false; | |||
public ISplitPanel() { | |||
public VSplitPanel() { | |||
this(ORIENTATION_HORIZONTAL); | |||
} | |||
public ISplitPanel(int orientation) { | |||
public VSplitPanel(int orientation) { | |||
setElement(DOM.createDiv()); | |||
switch (orientation) { | |||
case ORIENTATION_HORIZONTAL: | |||
@@ -435,7 +435,7 @@ public class ISplitPanel extends ComplexPanel implements Container, | |||
DOM.setStyleAttribute(draggingCurtain, "width", "100%"); | |||
DOM.setStyleAttribute(draggingCurtain, "height", "100%"); | |||
DOM.setStyleAttribute(draggingCurtain, "zIndex", "" | |||
+ IToolkitOverlay.Z_INDEX); | |||
+ VToolkitOverlay.Z_INDEX); | |||
DOM.appendChild(RootPanel.getBodyElement(), draggingCurtain); | |||
} | |||
} |
@@ -0,0 +1,12 @@ | |||
/* | |||
@ITMillApache2LicenseForJavaFiles@ | |||
*/ | |||
package com.vaadin.terminal.gwt.client.ui; | |||
public class VSplitPanelHorizontal extends VSplitPanel { | |||
public VSplitPanelHorizontal() { | |||
super(VSplitPanel.ORIENTATION_HORIZONTAL); | |||
} | |||
} |
@@ -0,0 +1,12 @@ | |||
/* | |||
@ITMillApache2LicenseForJavaFiles@ | |||
*/ | |||
package com.vaadin.terminal.gwt.client.ui; | |||
public class VSplitPanelVertical extends VSplitPanel { | |||
public VSplitPanelVertical() { | |||
super(VSplitPanel.ORIENTATION_VERTICAL); | |||
} | |||
} |
@@ -28,9 +28,9 @@ import com.vaadin.terminal.gwt.client.UIDL; | |||
/** | |||
* TODO make this work (just an early prototype). We may want to have paging | |||
* style table which will be much lighter than IScrollTable is. | |||
* style table which will be much lighter than VScrollTable is. | |||
*/ | |||
public class ITablePaging extends Composite implements Table, Paintable, | |||
public class VTablePaging extends Composite implements Table, Paintable, | |||
ClickListener { | |||
private final Grid tBody = new Grid(); | |||
@@ -64,7 +64,7 @@ public class ITablePaging extends Composite implements Table, Paintable, | |||
public HashMap rowKeysToTableRows = new HashMap(); | |||
public ITablePaging() { | |||
public VTablePaging() { | |||
tBody.setStyleName("itable-tbody"); | |||
@@ -286,7 +286,7 @@ public class ITablePaging extends Composite implements Table, Paintable, | |||
HeaderCell(String pid, String caption) { | |||
super(); | |||
cid = pid; | |||
addClickListener(ITablePaging.this); | |||
addClickListener(VTablePaging.this); | |||
setText(caption); | |||
// TODO remove debug color | |||
DOM.setStyleAttribute(getElement(), "color", "brown"); |
@@ -19,16 +19,16 @@ import com.google.gwt.user.client.ui.ComplexPanel; | |||
import com.google.gwt.user.client.ui.Widget; | |||
import com.vaadin.terminal.gwt.client.ApplicationConnection; | |||
import com.vaadin.terminal.gwt.client.BrowserInfo; | |||
import com.vaadin.terminal.gwt.client.ICaption; | |||
import com.vaadin.terminal.gwt.client.VCaption; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.RenderInformation; | |||
import com.vaadin.terminal.gwt.client.RenderSpace; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
import com.vaadin.terminal.gwt.client.Util; | |||
public class ITabsheet extends ITabsheetBase { | |||
public class VTabsheet extends VTabsheetBase { | |||
private class TabSheetCaption extends ICaption { | |||
private class TabSheetCaption extends VCaption { | |||
TabSheetCaption() { | |||
super(null, client); | |||
} | |||
@@ -97,7 +97,7 @@ public class ITabsheet extends ITabsheetBase { | |||
return getWidgetCount(); | |||
} | |||
public void addTab(ICaption c) { | |||
public void addTab(VCaption c) { | |||
Element td = DOM.createTD(); | |||
setStyleName(td, CLASSNAME + "-tabitemcell"); | |||
@@ -159,7 +159,7 @@ public class ITabsheet extends ITabsheetBase { | |||
@Override | |||
public boolean remove(Widget w) { | |||
((ICaption) w).removeClickListener(this); | |||
((VCaption) w).removeClickListener(this); | |||
return super.remove(w); | |||
} | |||
@@ -180,7 +180,7 @@ public class ITabsheet extends ITabsheetBase { | |||
} | |||
public void updateCaptionSize(int index) { | |||
ICaption c = getTab(index); | |||
VCaption c = getTab(index); | |||
c.setWidth(c.getRequiredWidth() + "px"); | |||
} | |||
@@ -198,10 +198,10 @@ public class ITabsheet extends ITabsheetBase { | |||
private int scrollerIndex = 0; | |||
private final TabBar tb = new TabBar(); | |||
private final ITabsheetPanel tp = new ITabsheetPanel(); | |||
private final VTabsheetPanel tp = new VTabsheetPanel(); | |||
private final Element contentNode, deco; | |||
private final HashMap<String, ICaption> captions = new HashMap<String, ICaption>(); | |||
private final HashMap<String, VCaption> captions = new HashMap<String, VCaption>(); | |||
private String height; | |||
private String width; | |||
@@ -253,7 +253,7 @@ public class ITabsheet extends ITabsheetBase { | |||
return height == null || height.equals(""); | |||
} | |||
public ITabsheet() { | |||
public VTabsheet() { | |||
super(CLASSNAME); | |||
// Tab scrolling | |||
@@ -517,7 +517,7 @@ public class ITabsheet extends ITabsheetBase { | |||
} | |||
} | |||
public class PlaceHolder extends ILabel { | |||
public class PlaceHolder extends VLabel { | |||
public PlaceHolder() { | |||
super(""); | |||
} | |||
@@ -549,7 +549,7 @@ public class ITabsheet extends ITabsheetBase { | |||
tp.showWidget(activeTabIndex); | |||
ITabsheet.this.iLayout(); | |||
VTabsheet.this.iLayout(); | |||
(content).updateFromUIDL(contentUIDL, client); | |||
/* | |||
* The size of a cached, relative sized component must be updated to | |||
@@ -559,7 +559,7 @@ public class ITabsheet extends ITabsheetBase { | |||
client.handleComponentRelativeSize((Widget) content); | |||
} | |||
updateOpenTabSize(); | |||
ITabsheet.this.removeStyleDependentName("loading"); | |||
VTabsheet.this.removeStyleDependentName("loading"); | |||
if (previousVisibleWidget != null) { | |||
DOM.setStyleAttribute(previousVisibleWidget.getElement(), | |||
"visibility", ""); |
@@ -13,7 +13,7 @@ import com.vaadin.terminal.gwt.client.Container; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
abstract class ITabsheetBase extends ComplexPanel implements Container { | |||
abstract class VTabsheetBase extends ComplexPanel implements Container { | |||
String id; | |||
ApplicationConnection client; | |||
@@ -25,7 +25,7 @@ abstract class ITabsheetBase extends ComplexPanel implements Container { | |||
protected Set disabledTabKeys = new HashSet(); | |||
protected boolean cachedUpdate = false; | |||
public ITabsheetBase(String classname) { | |||
public VTabsheetBase(String classname) { | |||
setElement(DOM.createDiv()); | |||
setStylePrimaryName(classname); | |||
} |
@@ -13,20 +13,20 @@ import com.vaadin.terminal.gwt.client.Util; | |||
/** | |||
* A panel that displays all of its child widgets in a 'deck', where only one | |||
* can be visible at a time. It is used by | |||
* {@link com.vaadin.terminal.gwt.client.ui.ITabsheet}. | |||
* {@link com.vaadin.terminal.gwt.client.ui.VTabsheet}. | |||
* | |||
* This class has the same basic functionality as the GWT DeckPanel | |||
* {@link com.google.gwt.user.client.ui.DeckPanel}, with the exception that it | |||
* doesn't manipulate the child widgets' width and height attributes. | |||
*/ | |||
public class ITabsheetPanel extends ComplexPanel { | |||
public class VTabsheetPanel extends ComplexPanel { | |||
private Widget visibleWidget; | |||
/** | |||
* Creates an empty tabsheet panel. | |||
*/ | |||
public ITabsheetPanel() { | |||
public VTabsheetPanel() { | |||
setElement(DOM.createDiv()); | |||
} | |||
@@ -21,10 +21,10 @@ import com.vaadin.terminal.gwt.client.UIDL; | |||
* @author IT Mill Ltd. | |||
* | |||
*/ | |||
public class ITextArea extends ITextField { | |||
public class VTextArea extends VTextField { | |||
public static final String CLASSNAME = "i-textarea"; | |||
public ITextArea() { | |||
public VTextArea() { | |||
super(DOM.createTextArea()); | |||
setStyleName(CLASSNAME); | |||
} |
@@ -13,7 +13,7 @@ import com.google.gwt.user.client.ui.TextBoxBase; | |||
import com.google.gwt.user.client.ui.Widget; | |||
import com.vaadin.terminal.gwt.client.ApplicationConnection; | |||
import com.vaadin.terminal.gwt.client.BrowserInfo; | |||
import com.vaadin.terminal.gwt.client.ITooltip; | |||
import com.vaadin.terminal.gwt.client.VTooltip; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
import com.vaadin.terminal.gwt.client.Util; | |||
@@ -24,7 +24,7 @@ import com.vaadin.terminal.gwt.client.Util; | |||
* @author IT Mill Ltd. | |||
* | |||
*/ | |||
public class ITextField extends TextBoxBase implements Paintable, Field, | |||
public class VTextField extends TextBoxBase implements Paintable, Field, | |||
ChangeListener, FocusListener { | |||
/** | |||
@@ -52,11 +52,11 @@ public class ITextField extends TextBoxBase implements Paintable, Field, | |||
private String inputPrompt = null; | |||
private boolean prompting = false; | |||
public ITextField() { | |||
public VTextField() { | |||
this(DOM.createInputText()); | |||
} | |||
protected ITextField(Element node) { | |||
protected VTextField(Element node) { | |||
super(node); | |||
if (BrowserInfo.get().isIE()) { | |||
// Fixes IE margin problem (#2058) | |||
@@ -66,7 +66,7 @@ public class ITextField extends TextBoxBase implements Paintable, Field, | |||
setStyleName(CLASSNAME); | |||
addChangeListener(this); | |||
addFocusListener(this); | |||
sinkEvents(ITooltip.TOOLTIP_EVENTS); | |||
sinkEvents(VTooltip.TOOLTIP_EVENTS); | |||
} | |||
@Override | |||
@@ -148,7 +148,7 @@ public class ITextField extends TextBoxBase implements Paintable, Field, | |||
} | |||
} | |||
private static ITextField focusedTextField; | |||
private static VTextField focusedTextField; | |||
public static void flushChangesFromFocusedTextField() { | |||
if (focusedTextField != null) { |
@@ -21,7 +21,7 @@ import com.vaadin.terminal.gwt.client.LocaleService; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
public class ITextualDate extends IDateField implements Paintable, Field, | |||
public class VTextualDate extends VDateField implements Paintable, Field, | |||
ChangeListener, ContainerResizedListener, Focusable { | |||
private static final String PARSE_ERROR_CLASSNAME = CLASSNAME | |||
@@ -37,11 +37,11 @@ public class ITextualDate extends IDateField implements Paintable, Field, | |||
protected int fieldExtraWidth = -1; | |||
public ITextualDate() { | |||
public VTextualDate() { | |||
super(); | |||
text = new TextBox(); | |||
// use normal textfield styles as a basis | |||
text.setStyleName(ITextField.CLASSNAME); | |||
text.setStyleName(VTextField.CLASSNAME); | |||
// add datefield spesific style name also | |||
text.addStyleName(CLASSNAME + "-textfield"); | |||
text.addChangeListener(this); | |||
@@ -177,38 +177,38 @@ public class ITextualDate extends IDateField implements Paintable, Field, | |||
// immediate) | |||
client.updateVariable(id, "year", | |||
date != null ? date.getYear() + 1900 : -1, | |||
currentResolution == IDateField.RESOLUTION_YEAR | |||
currentResolution == VDateField.RESOLUTION_YEAR | |||
&& immediate); | |||
if (currentResolution >= IDateField.RESOLUTION_MONTH) { | |||
if (currentResolution >= VDateField.RESOLUTION_MONTH) { | |||
client.updateVariable(id, "month", date != null ? date | |||
.getMonth() + 1 : -1, | |||
currentResolution == IDateField.RESOLUTION_MONTH | |||
currentResolution == VDateField.RESOLUTION_MONTH | |||
&& immediate); | |||
} | |||
if (currentResolution >= IDateField.RESOLUTION_DAY) { | |||
if (currentResolution >= VDateField.RESOLUTION_DAY) { | |||
client.updateVariable(id, "day", date != null ? date.getDate() | |||
: -1, currentResolution == IDateField.RESOLUTION_DAY | |||
: -1, currentResolution == VDateField.RESOLUTION_DAY | |||
&& immediate); | |||
} | |||
if (currentResolution >= IDateField.RESOLUTION_HOUR) { | |||
if (currentResolution >= VDateField.RESOLUTION_HOUR) { | |||
client.updateVariable(id, "hour", date != null ? date | |||
.getHours() : -1, | |||
currentResolution == IDateField.RESOLUTION_HOUR | |||
currentResolution == VDateField.RESOLUTION_HOUR | |||
&& immediate); | |||
} | |||
if (currentResolution >= IDateField.RESOLUTION_MIN) { | |||
if (currentResolution >= VDateField.RESOLUTION_MIN) { | |||
client.updateVariable(id, "min", date != null ? date | |||
.getMinutes() : -1, | |||
currentResolution == IDateField.RESOLUTION_MIN | |||
currentResolution == VDateField.RESOLUTION_MIN | |||
&& immediate); | |||
} | |||
if (currentResolution >= IDateField.RESOLUTION_SEC) { | |||
if (currentResolution >= VDateField.RESOLUTION_SEC) { | |||
client.updateVariable(id, "sec", date != null ? date | |||
.getSeconds() : -1, | |||
currentResolution == IDateField.RESOLUTION_SEC | |||
currentResolution == VDateField.RESOLUTION_SEC | |||
&& immediate); | |||
} | |||
if (currentResolution == IDateField.RESOLUTION_MSEC) { | |||
if (currentResolution == VDateField.RESOLUTION_MSEC) { | |||
client.updateVariable(id, "msec", | |||
date != null ? getMilliseconds() : -1, immediate); | |||
} | |||
@@ -218,10 +218,10 @@ public class ITextualDate extends IDateField implements Paintable, Field, | |||
private String cleanFormat(String format) { | |||
// Remove unnecessary d & M if resolution is too low | |||
if (currentResolution < IDateField.RESOLUTION_DAY) { | |||
if (currentResolution < VDateField.RESOLUTION_DAY) { | |||
format = format.replaceAll("d", ""); | |||
} | |||
if (currentResolution < IDateField.RESOLUTION_MONTH) { | |||
if (currentResolution < VDateField.RESOLUTION_MONTH) { | |||
format = format.replaceAll("M", ""); | |||
} | |||
@@ -11,9 +11,9 @@ import com.google.gwt.user.client.ui.FlowPanel; | |||
import com.google.gwt.user.client.ui.ListBox; | |||
import com.google.gwt.user.client.ui.Widget; | |||
public class ITime extends FlowPanel implements ChangeListener { | |||
public class VTime extends FlowPanel implements ChangeListener { | |||
private final IDateField datefield; | |||
private final VDateField datefield; | |||
private ListBox hours; | |||
@@ -25,14 +25,14 @@ public class ITime extends FlowPanel implements ChangeListener { | |||
private ListBox ampm; | |||
private int resolution = IDateField.RESOLUTION_HOUR; | |||
private int resolution = VDateField.RESOLUTION_HOUR; | |||
private boolean readonly; | |||
public ITime(IDateField parent) { | |||
public VTime(VDateField parent) { | |||
super(); | |||
datefield = parent; | |||
setStyleName(IDateField.CLASSNAME + "-time"); | |||
setStyleName(VDateField.CLASSNAME + "-time"); | |||
} | |||
private void buildTime(boolean redraw) { | |||
@@ -41,14 +41,14 @@ public class ITime extends FlowPanel implements ChangeListener { | |||
clear(); | |||
final int numHours = thc ? 12 : 24; | |||
hours = new ListBox(); | |||
hours.setStyleName(INativeSelect.CLASSNAME); | |||
hours.setStyleName(VNativeSelect.CLASSNAME); | |||
for (int i = 0; i < numHours; i++) { | |||
hours.addItem((i < 10) ? "0" + i : "" + i); | |||
} | |||
hours.addChangeListener(this); | |||
if (thc) { | |||
ampm = new ListBox(); | |||
ampm.setStyleName(INativeSelect.CLASSNAME); | |||
ampm.setStyleName(VNativeSelect.CLASSNAME); | |||
final String[] ampmText = datefield.getDateTimeService() | |||
.getAmPmStrings(); | |||
ampm.addItem(ampmText[0]); | |||
@@ -56,25 +56,25 @@ public class ITime extends FlowPanel implements ChangeListener { | |||
ampm.addChangeListener(this); | |||
} | |||
if (datefield.getCurrentResolution() >= IDateField.RESOLUTION_MIN) { | |||
if (datefield.getCurrentResolution() >= VDateField.RESOLUTION_MIN) { | |||
mins = new ListBox(); | |||
mins.setStyleName(INativeSelect.CLASSNAME); | |||
mins.setStyleName(VNativeSelect.CLASSNAME); | |||
for (int i = 0; i < 60; i++) { | |||
mins.addItem((i < 10) ? "0" + i : "" + i); | |||
} | |||
mins.addChangeListener(this); | |||
} | |||
if (datefield.getCurrentResolution() >= IDateField.RESOLUTION_SEC) { | |||
if (datefield.getCurrentResolution() >= VDateField.RESOLUTION_SEC) { | |||
sec = new ListBox(); | |||
sec.setStyleName(INativeSelect.CLASSNAME); | |||
sec.setStyleName(VNativeSelect.CLASSNAME); | |||
for (int i = 0; i < 60; i++) { | |||
sec.addItem((i < 10) ? "0" + i : "" + i); | |||
} | |||
sec.addChangeListener(this); | |||
} | |||
if (datefield.getCurrentResolution() == IDateField.RESOLUTION_MSEC) { | |||
if (datefield.getCurrentResolution() == VDateField.RESOLUTION_MSEC) { | |||
msec = new ListBox(); | |||
msec.setStyleName(INativeSelect.CLASSNAME); | |||
msec.setStyleName(VNativeSelect.CLASSNAME); | |||
for (int i = 0; i < 1000; i++) { | |||
if (i < 10) { | |||
msec.addItem("00" + i); | |||
@@ -99,46 +99,46 @@ public class ITime extends FlowPanel implements ChangeListener { | |||
if (thc) { | |||
h -= h < 12 ? 0 : 12; | |||
} | |||
add(new ILabel(h < 10 ? "0" + h : "" + h)); | |||
add(new VLabel(h < 10 ? "0" + h : "" + h)); | |||
} else { | |||
add(hours); | |||
} | |||
if (datefield.getCurrentResolution() >= IDateField.RESOLUTION_MIN) { | |||
add(new ILabel(delimiter)); | |||
if (datefield.getCurrentResolution() >= VDateField.RESOLUTION_MIN) { | |||
add(new VLabel(delimiter)); | |||
if (ro) { | |||
final int m = mins.getSelectedIndex(); | |||
add(new ILabel(m < 10 ? "0" + m : "" + m)); | |||
add(new VLabel(m < 10 ? "0" + m : "" + m)); | |||
} else { | |||
add(mins); | |||
} | |||
} | |||
if (datefield.getCurrentResolution() >= IDateField.RESOLUTION_SEC) { | |||
add(new ILabel(delimiter)); | |||
if (datefield.getCurrentResolution() >= VDateField.RESOLUTION_SEC) { | |||
add(new VLabel(delimiter)); | |||
if (ro) { | |||
final int s = sec.getSelectedIndex(); | |||
add(new ILabel(s < 10 ? "0" + s : "" + s)); | |||
add(new VLabel(s < 10 ? "0" + s : "" + s)); | |||
} else { | |||
add(sec); | |||
} | |||
} | |||
if (datefield.getCurrentResolution() == IDateField.RESOLUTION_MSEC) { | |||
add(new ILabel(".")); | |||
if (datefield.getCurrentResolution() == VDateField.RESOLUTION_MSEC) { | |||
add(new VLabel(".")); | |||
if (ro) { | |||
final int m = datefield.getMilliseconds(); | |||
final String ms = m < 100 ? "0" + m : "" + m; | |||
add(new ILabel(m < 10 ? "0" + ms : ms)); | |||
add(new VLabel(m < 10 ? "0" + ms : ms)); | |||
} else { | |||
add(msec); | |||
} | |||
} | |||
if (datefield.getCurrentResolution() == IDateField.RESOLUTION_HOUR) { | |||
add(new ILabel(delimiter + "00")); // o'clock | |||
if (datefield.getCurrentResolution() == VDateField.RESOLUTION_HOUR) { | |||
add(new VLabel(delimiter + "00")); // o'clock | |||
} | |||
if (thc) { | |||
add(new ILabel(" ")); | |||
add(new VLabel(" ")); | |||
if (ro) { | |||
add(new ILabel(ampm.getItemText(datefield.getCurrentDate() | |||
add(new VLabel(ampm.getItemText(datefield.getCurrentDate() | |||
.getHours() < 12 ? 0 : 1))); | |||
} else { | |||
add(ampm); | |||
@@ -165,13 +165,13 @@ public class ITime extends FlowPanel implements ChangeListener { | |||
} else { | |||
hours.setSelectedIndex(cdate.getHours()); | |||
} | |||
if (datefield.getCurrentResolution() >= IDateField.RESOLUTION_MIN) { | |||
if (datefield.getCurrentResolution() >= VDateField.RESOLUTION_MIN) { | |||
mins.setSelectedIndex(cdate.getMinutes()); | |||
} | |||
if (datefield.getCurrentResolution() >= IDateField.RESOLUTION_SEC) { | |||
if (datefield.getCurrentResolution() >= VDateField.RESOLUTION_SEC) { | |||
sec.setSelectedIndex(cdate.getSeconds()); | |||
} | |||
if (datefield.getCurrentResolution() == IDateField.RESOLUTION_MSEC) { | |||
if (datefield.getCurrentResolution() == VDateField.RESOLUTION_MSEC) { | |||
if (selected) { | |||
msec.setSelectedIndex(datefield.getMilliseconds()); | |||
} else { | |||
@@ -192,30 +192,30 @@ public class ITime extends FlowPanel implements ChangeListener { | |||
if (thc) { | |||
h -= h < 12 ? 0 : 12; | |||
} | |||
add(new ILabel(h < 10 ? "0" + h : "" + h)); | |||
add(new VLabel(h < 10 ? "0" + h : "" + h)); | |||
if (datefield.getCurrentResolution() >= IDateField.RESOLUTION_MIN) { | |||
add(new ILabel(delimiter)); | |||
if (datefield.getCurrentResolution() >= VDateField.RESOLUTION_MIN) { | |||
add(new VLabel(delimiter)); | |||
final int m = mins.getSelectedIndex(); | |||
add(new ILabel(m < 10 ? "0" + m : "" + m)); | |||
add(new VLabel(m < 10 ? "0" + m : "" + m)); | |||
} | |||
if (datefield.getCurrentResolution() >= IDateField.RESOLUTION_SEC) { | |||
add(new ILabel(delimiter)); | |||
if (datefield.getCurrentResolution() >= VDateField.RESOLUTION_SEC) { | |||
add(new VLabel(delimiter)); | |||
final int s = sec.getSelectedIndex(); | |||
add(new ILabel(s < 10 ? "0" + s : "" + s)); | |||
add(new VLabel(s < 10 ? "0" + s : "" + s)); | |||
} | |||
if (datefield.getCurrentResolution() == IDateField.RESOLUTION_MSEC) { | |||
add(new ILabel(".")); | |||
if (datefield.getCurrentResolution() == VDateField.RESOLUTION_MSEC) { | |||
add(new VLabel(".")); | |||
final int m = datefield.getMilliseconds(); | |||
final String ms = m < 100 ? "0" + m : "" + m; | |||
add(new ILabel(m < 10 ? "0" + ms : ms)); | |||
add(new VLabel(m < 10 ? "0" + ms : ms)); | |||
} | |||
if (datefield.getCurrentResolution() == IDateField.RESOLUTION_HOUR) { | |||
add(new ILabel(delimiter + "00")); // o'clock | |||
if (datefield.getCurrentResolution() == VDateField.RESOLUTION_HOUR) { | |||
add(new VLabel(delimiter + "00")); // o'clock | |||
} | |||
if (thc) { | |||
add(new ILabel(" ")); | |||
add(new ILabel(ampm.getItemText(cdate.getHours() < 12 ? 0 : 1))); | |||
add(new VLabel(" ")); | |||
add(new VLabel(ampm.getItemText(cdate.getHours() < 12 ? 0 : 1))); | |||
} | |||
} | |||
@@ -239,8 +239,8 @@ public class ITime extends FlowPanel implements ChangeListener { | |||
public void updateTime(boolean redraw) { | |||
buildTime(redraw || resolution != datefield.getCurrentResolution() | |||
|| readonly != datefield.isReadonly()); | |||
if (datefield instanceof ITextualDate) { | |||
((ITextualDate) datefield).buildDate(); | |||
if (datefield instanceof VTextualDate) { | |||
((VTextualDate) datefield).buildDate(); | |||
} | |||
resolution = datefield.getCurrentResolution(); | |||
readonly = datefield.isReadonly(); |
@@ -16,9 +16,9 @@ import com.vaadin.terminal.gwt.client.BrowserInfo; | |||
/** | |||
* In Toolkit UI this Overlay should always be used for all elements that | |||
* temporary float over other components like context menus etc. This is to deal | |||
* stacking order correctly with IWindow objects. | |||
* stacking order correctly with VWindow objects. | |||
*/ | |||
public class IToolkitOverlay extends PopupPanel { | |||
public class VToolkitOverlay extends PopupPanel { | |||
/* | |||
* The z-index value from where all overlays live. This can be overridden in | |||
@@ -59,22 +59,22 @@ public class IToolkitOverlay extends PopupPanel { | |||
*/ | |||
private static final String SHADOW_HTML = "<div class=\"top-left\"></div><div class=\"top\"></div><div class=\"top-right\"></div><div class=\"left\"></div><div class=\"center\"></div><div class=\"right\"></div><div class=\"bottom-left\"></div><div class=\"bottom\"></div><div class=\"bottom-right\"></div>"; | |||
public IToolkitOverlay() { | |||
public VToolkitOverlay() { | |||
super(); | |||
adjustZIndex(); | |||
} | |||
public IToolkitOverlay(boolean autoHide) { | |||
public VToolkitOverlay(boolean autoHide) { | |||
super(autoHide); | |||
adjustZIndex(); | |||
} | |||
public IToolkitOverlay(boolean autoHide, boolean modal) { | |||
public VToolkitOverlay(boolean autoHide, boolean modal) { | |||
super(autoHide, modal); | |||
adjustZIndex(); | |||
} | |||
public IToolkitOverlay(boolean autoHide, boolean modal, boolean showShadow) { | |||
public VToolkitOverlay(boolean autoHide, boolean modal, boolean showShadow) { | |||
super(autoHide, modal); | |||
if (showShadow) { | |||
shadow = DOM.createDiv(); |
@@ -25,7 +25,7 @@ import com.vaadin.terminal.gwt.client.Util; | |||
/** | |||
* | |||
*/ | |||
public class ITree extends FlowPanel implements Paintable { | |||
public class VTree extends FlowPanel implements Paintable { | |||
public static final String CLASSNAME = "i-tree"; | |||
@@ -55,7 +55,7 @@ public class ITree extends FlowPanel implements Paintable { | |||
private boolean rendering; | |||
public ITree() { | |||
public VTree() { | |||
super(); | |||
setStyleName(CLASSNAME); | |||
} | |||
@@ -250,7 +250,7 @@ public class ITree extends FlowPanel implements Paintable { | |||
private void toggleSelection() { | |||
if (selectable) { | |||
ITree.this.setSelected(this, !isSelected()); | |||
VTree.this.setSelected(this, !isSelected()); | |||
} | |||
} | |||
@@ -358,7 +358,7 @@ public class ITree extends FlowPanel implements Paintable { | |||
open = state; | |||
if (!rendering) { | |||
Util.notifyParentOfSizeChange(ITree.this, false); | |||
Util.notifyParentOfSizeChange(VTree.this, false); | |||
} | |||
} | |||
@@ -418,7 +418,7 @@ public class ITree extends FlowPanel implements Paintable { | |||
/** | |||
* Adds/removes IT Mill Toolkit specific style name. This method ought | |||
* to be called only from ITree. | |||
* to be called only from VTree. | |||
* | |||
* @param selected | |||
*/ | |||
@@ -428,7 +428,7 @@ public class ITree extends FlowPanel implements Paintable { | |||
} | |||
protected boolean isSelected() { | |||
return ITree.this.isSelected(this); | |||
return VTree.this.isSelected(this); | |||
} | |||
public void showContextMenu(Event event) { |
@@ -15,7 +15,7 @@ import com.google.gwt.user.client.ui.Panel; | |||
import com.google.gwt.user.client.ui.Widget; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
public class ITwinColSelect extends IOptionGroupBase { | |||
public class VTwinColSelect extends VOptionGroupBase { | |||
private static final String CLASSNAME = "i-select-twincol"; | |||
@@ -27,9 +27,9 @@ public class ITwinColSelect extends IOptionGroupBase { | |||
private final ListBox selections; | |||
private final IButton add; | |||
private final VButton add; | |||
private final IButton remove; | |||
private final VButton remove; | |||
private FlowPanel buttons; | |||
@@ -37,7 +37,7 @@ public class ITwinColSelect extends IOptionGroupBase { | |||
private boolean widthSet = false; | |||
public ITwinColSelect() { | |||
public VTwinColSelect() { | |||
super(CLASSNAME); | |||
options = new ListBox(); | |||
options.addClickListener(this); | |||
@@ -49,10 +49,10 @@ public class ITwinColSelect extends IOptionGroupBase { | |||
selections.setStyleName(CLASSNAME + "-selections"); | |||
buttons = new FlowPanel(); | |||
buttons.setStyleName(CLASSNAME + "-buttons"); | |||
add = new IButton(); | |||
add = new VButton(); | |||
add.setText(">>"); | |||
add.addClickListener(this); | |||
remove = new IButton(); | |||
remove = new VButton(); | |||
remove.setText("<<"); | |||
remove.addClickListener(this); | |||
panel = ((Panel) optionsContainer); |
@@ -11,12 +11,12 @@ import com.vaadin.terminal.gwt.client.ApplicationConnection; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
public class IUnknownComponent extends Composite implements Paintable { | |||
public class VUnknownComponent extends Composite implements Paintable { | |||
com.google.gwt.user.client.ui.Label caption = new com.google.gwt.user.client.ui.Label();; | |||
Tree uidlTree = new Tree(); | |||
public IUnknownComponent() { | |||
public VUnknownComponent() { | |||
final VerticalPanel panel = new VerticalPanel(); | |||
panel.add(caption); | |||
panel.add(uidlTree); |
@@ -19,7 +19,7 @@ import com.vaadin.terminal.gwt.client.ApplicationConnection; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
public class IUpload extends FormPanel implements Paintable, ClickListener, | |||
public class VUpload extends FormPanel implements Paintable, ClickListener, | |||
FormHandler { | |||
public static final String CLASSNAME = "i-upload"; | |||
@@ -56,7 +56,7 @@ public class IUpload extends FormPanel implements Paintable, ClickListener, | |||
private boolean enabled = true; | |||
public IUpload() { | |||
public VUpload() { | |||
super(); | |||
setEncoding(FormPanel.ENCODING_MULTIPART); | |||
setMethod(FormPanel.METHOD_POST); |
@@ -14,7 +14,7 @@ import com.vaadin.terminal.gwt.client.UIDL; | |||
* as an implementation. | |||
* | |||
*/ | |||
public class IUriFragmentUtility extends Widget implements Paintable, | |||
public class VUriFragmentUtility extends Widget implements Paintable, | |||
HistoryListener { | |||
private String fragment; | |||
@@ -22,7 +22,7 @@ public class IUriFragmentUtility extends Widget implements Paintable, | |||
private String paintableId; | |||
private boolean immediate; | |||
public IUriFragmentUtility() { | |||
public VUriFragmentUtility() { | |||
setElement(Document.get().createDivElement()); | |||
if (BrowserInfo.get().isIE6()) { | |||
getElement().getStyle().setProperty("overflow", "hidden"); |
@@ -1,10 +1,10 @@ | |||
package com.vaadin.terminal.gwt.client.ui; | |||
public class IVerticalLayout extends IOrderedLayout { | |||
public class VVerticalLayout extends VOrderedLayout { | |||
public static final String CLASSNAME = "i-verticallayout"; | |||
public IVerticalLayout() { | |||
public VVerticalLayout() { | |||
super(CLASSNAME, ORIENTATION_VERTICAL); | |||
} | |||
@@ -37,7 +37,7 @@ import com.vaadin.terminal.gwt.client.Util; | |||
/** | |||
* | |||
*/ | |||
public class IView extends SimplePanel implements Container, | |||
public class VView extends SimplePanel implements Container, | |||
WindowResizeListener, WindowCloseListener { | |||
private static final String CLASSNAME = "i-view"; | |||
@@ -46,7 +46,7 @@ public class IView extends SimplePanel implements Container, | |||
private Paintable layout; | |||
private final LinkedHashSet<IWindow> subWindows = new LinkedHashSet<IWindow>(); | |||
private final LinkedHashSet<VWindow> subWindows = new LinkedHashSet<VWindow>(); | |||
private String id; | |||
@@ -78,7 +78,7 @@ public class IView extends SimplePanel implements Container, | |||
private boolean immediate; | |||
public IView(String elementId) { | |||
public VView(String elementId) { | |||
super(); | |||
setStyleName(CLASSNAME); | |||
@@ -233,7 +233,7 @@ public class IView extends SimplePanel implements Container, | |||
layout.updateFromUIDL(childUidl, client); | |||
// Update subwindows | |||
final HashSet<IWindow> removedSubWindows = new HashSet<IWindow>( | |||
final HashSet<VWindow> removedSubWindows = new HashSet<VWindow>( | |||
subWindows); | |||
// Open new windows | |||
@@ -243,7 +243,7 @@ public class IView extends SimplePanel implements Container, | |||
if (subWindows.contains(w)) { | |||
removedSubWindows.remove(w); | |||
} else { | |||
subWindows.add((IWindow) w); | |||
subWindows.add((VWindow) w); | |||
} | |||
w.updateFromUIDL(childUidl, client); | |||
} else if ("actions".equals(childUidl.getTag())) { | |||
@@ -279,15 +279,15 @@ public class IView extends SimplePanel implements Container, | |||
final int position = notification | |||
.getIntAttribute("position"); | |||
final int delay = notification.getIntAttribute("delay"); | |||
new INotification(delay).show(html, position, style); | |||
new VNotification(delay).show(html, position, style); | |||
} | |||
} | |||
} | |||
// Close old windows | |||
for (final Iterator<IWindow> rem = removedSubWindows.iterator(); rem | |||
for (final Iterator<VWindow> rem = removedSubWindows.iterator(); rem | |||
.hasNext();) { | |||
final IWindow w = rem.next(); | |||
final VWindow w = rem.next(); | |||
client.unregisterPaintable(w); | |||
subWindows.remove(w); | |||
w.hide(); | |||
@@ -388,24 +388,24 @@ public class IView extends SimplePanel implements Container, | |||
@Override | |||
public void run() { | |||
boolean changed = false; | |||
if (IView.this.width != getOffsetWidth()) { | |||
IView.this.width = getOffsetWidth(); | |||
if (VView.this.width != getOffsetWidth()) { | |||
VView.this.width = getOffsetWidth(); | |||
changed = true; | |||
ApplicationConnection.getConsole().log( | |||
"window w" + IView.this.width); | |||
"window w" + VView.this.width); | |||
} | |||
if (IView.this.height != getOffsetHeight()) { | |||
IView.this.height = getOffsetHeight(); | |||
if (VView.this.height != getOffsetHeight()) { | |||
VView.this.height = getOffsetHeight(); | |||
changed = true; | |||
ApplicationConnection.getConsole().log( | |||
"window h" + IView.this.height); | |||
"window h" + VView.this.height); | |||
} | |||
if (changed) { | |||
ApplicationConnection | |||
.getConsole() | |||
.log( | |||
"Running layout functions due window resize"); | |||
connection.runDescendentsLayout(IView.this); | |||
connection.runDescendentsLayout(VView.this); | |||
sendClientResized(); | |||
} | |||
@@ -416,14 +416,14 @@ public class IView extends SimplePanel implements Container, | |||
} | |||
resizeTimer.schedule(200); | |||
} else { | |||
if (width == IView.this.width && height == IView.this.height) { | |||
if (width == VView.this.width && height == VView.this.height) { | |||
// No point in doing resize operations if window size has not | |||
// changed | |||
return; | |||
} | |||
IView.this.width = Window.getClientWidth(); | |||
IView.this.height = Window.getClientHeight(); | |||
VView.this.width = Window.getClientWidth(); | |||
VView.this.height = Window.getClientHeight(); | |||
ApplicationConnection.getConsole().log( | |||
"Running layout functions due window resize"); | |||
@@ -452,7 +452,7 @@ public class IView extends SimplePanel implements Container, | |||
public void onWindowClosed() { | |||
// Change focus on this window in order to ensure that all state is | |||
// collected from textfields | |||
ITextField.flushChangesFromFocusedTextField(); | |||
VTextField.flushChangesFromFocusedTextField(); | |||
// Send the closing state to server | |||
connection.updateVariable(id, "close", true, false); | |||
@@ -564,9 +564,9 @@ public class IView extends SimplePanel implements Container, | |||
* | |||
* @return | |||
*/ | |||
public ArrayList<IWindow> getSubWindowList() { | |||
ArrayList<IWindow> windows = new ArrayList<IWindow>(subWindows.size()); | |||
for (IWindow widget : subWindows) { | |||
public ArrayList<VWindow> getSubWindowList() { | |||
ArrayList<VWindow> windows = new ArrayList<VWindow>(subWindows.size()); | |||
for (VWindow widget : subWindows) { | |||
windows.add(widget); | |||
} | |||
return windows; |
@@ -35,14 +35,14 @@ import com.vaadin.terminal.gwt.client.Util; | |||
* | |||
* @author IT Mill Ltd | |||
*/ | |||
public class IWindow extends IToolkitOverlay implements Container, | |||
public class VWindow extends VToolkitOverlay implements Container, | |||
ScrollListener { | |||
private static final int MIN_HEIGHT = 100; | |||
private static final int MIN_WIDTH = 150; | |||
private static Vector<IWindow> windowOrder = new Vector<IWindow>(); | |||
private static Vector<VWindow> windowOrder = new Vector<VWindow>(); | |||
public static final String CLASSNAME = "i-window"; | |||
@@ -134,7 +134,7 @@ public class IWindow extends IToolkitOverlay implements Container, | |||
private boolean immediate; | |||
public IWindow() { | |||
public VWindow() { | |||
super(false, false, true); // no autohide, not modal, shadow | |||
// Different style of shadow for windows | |||
setShadowStyle("window"); | |||
@@ -396,7 +396,7 @@ public class IWindow extends IToolkitOverlay implements Container, | |||
final int position = notification | |||
.getIntAttribute("position"); | |||
final int delay = notification.getIntAttribute("delay"); | |||
new INotification(delay).show(html, position, style); | |||
new VNotification(delay).show(html, position, style); | |||
} | |||
} | |||
} | |||
@@ -595,7 +595,7 @@ public class IWindow extends IToolkitOverlay implements Container, | |||
DOM.setStyleAttribute(draggingCurtain, "width", "100%"); | |||
DOM.setStyleAttribute(draggingCurtain, "height", "100%"); | |||
DOM.setStyleAttribute(draggingCurtain, "zIndex", "" | |||
+ IToolkitOverlay.Z_INDEX); | |||
+ VToolkitOverlay.Z_INDEX); | |||
DOM.appendChild(RootPanel.getBodyElement(), draggingCurtain); | |||
} else if (!show && draggingCurtain != null) { | |||
@@ -917,7 +917,7 @@ public class IWindow extends IToolkitOverlay implements Container, | |||
@Override | |||
public void addStyleDependentName(String styleSuffix) { | |||
// IWindow's getStyleElement() does not return the same element as | |||
// VWindow's getStyleElement() does not return the same element as | |||
// getElement(), so we need to override this. | |||
setStyleName(getElement(), getStylePrimaryName() + "-" + styleSuffix, | |||
true); |
@@ -13,7 +13,7 @@ import com.vaadin.terminal.gwt.client.BrowserInfo; | |||
import com.vaadin.terminal.gwt.client.Container; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
import com.vaadin.terminal.gwt.client.ui.IMarginInfo; | |||
import com.vaadin.terminal.gwt.client.ui.VMarginInfo; | |||
public abstract class CellBasedLayout extends ComplexPanel implements Container { | |||
@@ -27,7 +27,7 @@ public abstract class CellBasedLayout extends ComplexPanel implements Container | |||
public static final int ORIENTATION_HORIZONTAL = 1; | |||
protected Margins activeMargins = new Margins(0, 0, 0, 0); | |||
protected IMarginInfo activeMarginsInfo = new IMarginInfo(-1); | |||
protected VMarginInfo activeMarginsInfo = new VMarginInfo(-1); | |||
protected boolean spacingEnabled = false; | |||
protected final Spacing spacingFromCSS = new Spacing(12, 12); | |||
@@ -214,7 +214,7 @@ public abstract class CellBasedLayout extends ComplexPanel implements Container | |||
private void updateMarginAndSpacingInfo(UIDL uidl) { | |||
int bitMask = uidl.getIntAttribute("margins"); | |||
if (activeMarginsInfo.getBitMask() != bitMask) { | |||
activeMarginsInfo = new IMarginInfo(bitMask); | |||
activeMarginsInfo = new VMarginInfo(bitMask); | |||
marginsNeedsRecalculation = true; | |||
} | |||
boolean spacing = uidl.getBooleanAttribute("spacing"); |
@@ -12,7 +12,7 @@ import com.google.gwt.user.client.ui.Panel; | |||
import com.google.gwt.user.client.ui.Widget; | |||
import com.vaadin.terminal.gwt.client.ApplicationConnection; | |||
import com.vaadin.terminal.gwt.client.BrowserInfo; | |||
import com.vaadin.terminal.gwt.client.ICaption; | |||
import com.vaadin.terminal.gwt.client.VCaption; | |||
import com.vaadin.terminal.gwt.client.Paintable; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
import com.vaadin.terminal.gwt.client.Util; | |||
@@ -62,7 +62,7 @@ public class ChildComponentContainer extends Panel { | |||
private int alignmentTopOffset = 0; | |||
// private Margins alignmentOffset = new Margins(0, 0, 0, 0); | |||
private ICaption caption = null; | |||
private VCaption caption = null; | |||
private DivElement containerDIV; | |||
private DivElement widgetDIV; | |||
private Widget widget; | |||
@@ -413,13 +413,13 @@ public class ChildComponentContainer extends Panel { | |||
} | |||
public void updateCaption(UIDL uidl, ApplicationConnection client) { | |||
if (ICaption.isNeeded(uidl)) { | |||
if (VCaption.isNeeded(uidl)) { | |||
// We need a caption | |||
ICaption newCaption = caption; | |||
VCaption newCaption = caption; | |||
if (newCaption == null) { | |||
newCaption = new ICaption((Paintable) widget, client); | |||
newCaption = new VCaption((Paintable) widget, client); | |||
// Set initial height to avoid Safari flicker | |||
newCaption.setHeight("18px"); | |||
// newCaption.setHeight(newCaption.getHeight()); // This might | |||
@@ -462,7 +462,7 @@ public class ChildComponentContainer extends Panel { | |||
} | |||
private void setCaption(ICaption newCaption) { | |||
private void setCaption(VCaption newCaption) { | |||
// Validate | |||
// if (newCaption == caption) { | |||
// return; |
@@ -29,7 +29,7 @@ import com.vaadin.terminal.gwt.client.ui.Field; | |||
* @author IT Mill Ltd. | |||
* | |||
*/ | |||
public class IRichTextArea extends Composite implements Paintable, Field, | |||
public class VRichTextArea extends Composite implements Paintable, Field, | |||
ChangeListener, FocusListener, KeyboardListener { | |||
/** | |||
@@ -45,7 +45,7 @@ public class IRichTextArea extends Composite implements Paintable, Field, | |||
private RichTextArea rta = new RichTextArea(); | |||
private IRichTextToolbar formatter = new IRichTextToolbar(rta); | |||
private VRichTextToolbar formatter = new VRichTextToolbar(rta); | |||
private HTML html = new HTML(); | |||
@@ -60,7 +60,7 @@ public class IRichTextArea extends Composite implements Paintable, Field, | |||
private int toolbarNaturalWidth = 500; | |||
public IRichTextArea() { | |||
public VRichTextArea() { | |||
fp.add(formatter); | |||
rta.setWidth("100%"); |
@@ -36,7 +36,7 @@ import com.google.gwt.user.client.ui.Widget; | |||
* provides a simple UI for all rich text formatting, dynamically displayed only | |||
* for the available functionality. | |||
*/ | |||
public class IRichTextToolbar extends Composite { | |||
public class VRichTextToolbar extends Composite { | |||
/** | |||
* This {@link ImageBundle} is used for all the button icons. Using an image | |||
@@ -325,7 +325,7 @@ public class IRichTextToolbar extends Composite { | |||
* @param richText | |||
* the rich text area to be controlled | |||
*/ | |||
public IRichTextToolbar(RichTextArea richText) { | |||
public VRichTextToolbar(RichTextArea richText) { | |||
this.richText = richText; | |||
basic = richText.getBasicFormatter(); | |||
extended = richText.getExtendedFormatter(); |
@@ -9,7 +9,7 @@ import java.util.Map; | |||
import com.vaadin.terminal.PaintException; | |||
import com.vaadin.terminal.PaintTarget; | |||
import com.vaadin.terminal.gwt.client.ui.IAbsoluteLayout; | |||
import com.vaadin.terminal.gwt.client.ui.VAbsoluteLayout; | |||
/** | |||
* AbsoluteLayout is a layout implementation that mimics html absolute | |||
@@ -28,7 +28,7 @@ public class AbsoluteLayout extends AbstractLayout { | |||
@Override | |||
public String getTag() { | |||
return IAbsoluteLayout.TAGNAME; | |||
return VAbsoluteLayout.TAGNAME; | |||
} | |||
public Iterator<Component> getComponentIterator() { |
@@ -109,7 +109,7 @@ public class DateField extends AbstractField { | |||
private String dateFormat; | |||
/** | |||
* Read-only content of an ITextualDate field - null for other types of date | |||
* Read-only content of an VTextualDate field - null for other types of date | |||
* fields. | |||
*/ | |||
private String dateString; |
@@ -6,7 +6,7 @@ package com.vaadin.ui; | |||
import java.io.Serializable; | |||
import com.vaadin.terminal.gwt.client.ui.IMarginInfo; | |||
import com.vaadin.terminal.gwt.client.ui.VMarginInfo; | |||
import com.vaadin.terminal.gwt.client.ui.AlignmentInfo.Bits; | |||
/** | |||
@@ -224,7 +224,7 @@ public interface Layout extends ComponentContainer, Serializable { | |||
} | |||
@SuppressWarnings("serial") | |||
public static class MarginInfo extends IMarginInfo implements Serializable { | |||
public static class MarginInfo extends VMarginInfo implements Serializable { | |||
public MarginInfo(boolean enabled) { | |||
super(enabled, enabled, enabled, enabled); |