diff --git a/modules/desktop/src/com/haulmont/cuba/desktop/gui/DesktopComponentsFactory.java b/modules/desktop/src/com/haulmont/cuba/desktop/gui/DesktopComponentsFactory.java
index 4cd74cb0d5..abddd57e1e 100644
--- a/modules/desktop/src/com/haulmont/cuba/desktop/gui/DesktopComponentsFactory.java
+++ b/modules/desktop/src/com/haulmont/cuba/desktop/gui/DesktopComponentsFactory.java
@@ -17,9 +17,8 @@ import java.util.HashMap;
import java.util.Map;
/**
- *
$Id$
- *
* @author krivopustov
+ * @version $Id$
*/
@ManagedBean(ComponentsFactory.NAME)
public class DesktopComponentsFactory implements ComponentsFactory {
@@ -61,7 +60,7 @@ public class DesktopComponentsFactory implements ComponentsFactory {
classes.put(OptionsGroup.NAME, DesktopOptionsGroup.class);
classes.put(FileUploadField.NAME, DesktopFileUploadField.class);
classes.put(FileMultiUploadField.NAME, DesktopFileMultiUploadField.class);
- classes.put(Tabsheet.NAME, DesktopTabsheet.class);
+ classes.put(TabSheet.NAME, DesktopTabSheet.class);
classes.put(Embedded.NAME, DesktopEmbedded.class);
classes.put(WidgetsTree.NAME, DesktopWidgetsTree.class);
classes.put(GroupBoxLayout.NAME, DesktopGroupBox.class);
diff --git a/modules/desktop/src/com/haulmont/cuba/desktop/gui/components/DesktopTabsheet.java b/modules/desktop/src/com/haulmont/cuba/desktop/gui/components/DesktopTabSheet.java
similarity index 95%
rename from modules/desktop/src/com/haulmont/cuba/desktop/gui/components/DesktopTabsheet.java
rename to modules/desktop/src/com/haulmont/cuba/desktop/gui/components/DesktopTabSheet.java
index f52dc7c9d1..1da386d4b6 100644
--- a/modules/desktop/src/com/haulmont/cuba/desktop/gui/components/DesktopTabsheet.java
+++ b/modules/desktop/src/com/haulmont/cuba/desktop/gui/components/DesktopTabSheet.java
@@ -25,13 +25,12 @@ import java.awt.event.*;
import java.util.*;
/**
- * $Id$
- *
* @author krivopustov
+ * @version $Id$
*/
-public class DesktopTabsheet
+public class DesktopTabSheet
extends DesktopAbstractComponent
- implements Tabsheet, Component.Container, AutoExpanding {
+ implements TabSheet, Component.Container, AutoExpanding {
protected Map components = new HashMap();
protected List tabs = new ArrayList();
@@ -48,7 +47,7 @@ public class DesktopTabsheet
protected Set listeners = new HashSet();
- public DesktopTabsheet() {
+ public DesktopTabSheet() {
impl = new JTabbedPane();
}
@@ -283,7 +282,7 @@ public class DesktopTabsheet
lti.tabContent.add(comp);
lti.tabContent.expand(comp, "", "");
- final Window window = ComponentsHelper.getWindow(DesktopTabsheet.this);
+ final Window window = ComponentsHelper.getWindow(DesktopTabSheet.this);
if (window != null) {
ComponentsHelper.walkComponents(
lti.tabContent,
@@ -355,7 +354,7 @@ public class DesktopTabsheet
return false;
}
- protected class TabImpl implements Tabsheet.Tab {
+ protected class TabImpl implements TabSheet.Tab {
private String name;
private Component component;
@@ -395,7 +394,7 @@ public class DesktopTabsheet
@Override
public void setCaption(String caption) {
this.caption = caption;
- DesktopTabsheet.this.impl.setTitleAt(getTabIndex(), caption);
+ DesktopTabSheet.this.impl.setTitleAt(getTabIndex(), caption);
getButtonTabComponent().setCaption(caption);
}
@@ -430,7 +429,7 @@ public class DesktopTabsheet
public void setVisible(boolean visible) {
if (visible != this.visible) {
this.visible = visible;
- DesktopTabsheet.this.updateTabVisibility(this);
+ DesktopTabSheet.this.updateTabVisibility(this);
}
}
@@ -475,7 +474,7 @@ public class DesktopTabsheet
}
public int getTabIndex() {
- return DesktopTabsheet.this.impl.indexOfTabComponent(buttonTabComponent);
+ return DesktopTabSheet.this.impl.indexOfTabComponent(buttonTabComponent);
}
@Override
diff --git a/modules/gui/src/com/haulmont/cuba/gui/WindowCreationHelper.java b/modules/gui/src/com/haulmont/cuba/gui/WindowCreationHelper.java
index c80e72615b..5b66ee3693 100644
--- a/modules/gui/src/com/haulmont/cuba/gui/WindowCreationHelper.java
+++ b/modules/gui/src/com/haulmont/cuba/gui/WindowCreationHelper.java
@@ -20,7 +20,6 @@ import org.apache.commons.logging.LogFactory;
import org.dom4j.Element;
import java.io.InputStream;
-import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -96,9 +95,9 @@ public class WindowCreationHelper {
final String subComponentId = matcher.group(2);
final Component customComponent = window.getComponent(customComponentId);
if (customComponent != null) {
- if (customComponent instanceof Tabsheet) {
- final Tabsheet tabsheet = (Tabsheet) customComponent;
- final Tabsheet.Tab tab = tabsheet.getTab(subComponentId);
+ if (customComponent instanceof TabSheet) {
+ final TabSheet tabsheet = (TabSheet) customComponent;
+ final TabSheet.Tab tab = tabsheet.getTab(subComponentId);
if (tab != null) {
Integer permissionValue = permissionEntry.getValue();
if (permissionValue == UiPermissionValue.HIDE.getValue())
diff --git a/modules/gui/src/com/haulmont/cuba/gui/app/core/file/multiupload.xml b/modules/gui/src/com/haulmont/cuba/gui/app/core/file/multiupload.xml
index fb61afcb67..6911a9525d 100644
--- a/modules/gui/src/com/haulmont/cuba/gui/app/core/file/multiupload.xml
+++ b/modules/gui/src/com/haulmont/cuba/gui/app/core/file/multiupload.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/modules/gui/src/com/haulmont/cuba/gui/app/security/group/browse/GroupBrowser.java b/modules/gui/src/com/haulmont/cuba/gui/app/security/group/browse/GroupBrowser.java
index aaaf64f1fd..58af7feeb2 100644
--- a/modules/gui/src/com/haulmont/cuba/gui/app/security/group/browse/GroupBrowser.java
+++ b/modules/gui/src/com/haulmont/cuba/gui/app/security/group/browse/GroupBrowser.java
@@ -60,7 +60,7 @@ public class GroupBrowser extends AbstractWindow {
protected Table usersTable;
@Inject
- protected Tabsheet tabsheet;
+ protected TabSheet tabsheet;
@Inject
protected UserSession userSession;
@@ -133,9 +133,9 @@ public class GroupBrowser extends AbstractWindow {
});
tabsheet.addListener(
- new Tabsheet.TabChangeListener() {
+ new TabSheet.TabChangeListener() {
@Override
- public void tabChanged(Tabsheet.Tab newTab) {
+ public void tabChanged(TabSheet.Tab newTab) {
if ("constraintsTab".equals(newTab.getName()))
initConstraintsTab();
else if ("attributesTab".equals(newTab.getName()))
diff --git a/modules/gui/src/com/haulmont/cuba/gui/app/security/group/browse/group-browse.xml b/modules/gui/src/com/haulmont/cuba/gui/app/security/group/browse/group-browse.xml
index af05af3232..9f5ed08aa6 100644
--- a/modules/gui/src/com/haulmont/cuba/gui/app/security/group/browse/group-browse.xml
+++ b/modules/gui/src/com/haulmont/cuba/gui/app/security/group/browse/group-browse.xml
@@ -66,7 +66,7 @@
-
+
@@ -135,7 +135,7 @@
-
+
diff --git a/modules/gui/src/com/haulmont/cuba/gui/app/security/role/edit/role-edit.xml b/modules/gui/src/com/haulmont/cuba/gui/app/security/role/edit/role-edit.xml
index a48f20236d..4a76d74793 100644
--- a/modules/gui/src/com/haulmont/cuba/gui/app/security/role/edit/role-edit.xml
+++ b/modules/gui/src/com/haulmont/cuba/gui/app/security/role/edit/role-edit.xml
@@ -62,7 +62,7 @@
-
+
@@ -83,7 +83,7 @@
-
+
diff --git a/modules/gui/src/com/haulmont/cuba/gui/components/ClientScriptHost.java b/modules/gui/src/com/haulmont/cuba/gui/components/ClientScriptHost.java
deleted file mode 100644
index 91ea2c77db..0000000000
--- a/modules/gui/src/com/haulmont/cuba/gui/components/ClientScriptHost.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.haulmont.cuba.gui.components;
-
-/**
- * Component for evaluate custom script code at client side
- * $Id$
- *
- * @author artamonov
- */
-public interface ClientScriptHost extends Component, Component.BelongToFrame{
-
- void evaluateScript(String script);
-
- void viewDocument(String documentUrl);
-
- void getResource(String resourceUrl);
-}
\ No newline at end of file
diff --git a/modules/gui/src/com/haulmont/cuba/gui/components/FileMultiUploadField.java b/modules/gui/src/com/haulmont/cuba/gui/components/FileMultiUploadField.java
index 101496e602..ead9ab1aa5 100644
--- a/modules/gui/src/com/haulmont/cuba/gui/components/FileMultiUploadField.java
+++ b/modules/gui/src/com/haulmont/cuba/gui/components/FileMultiUploadField.java
@@ -1,21 +1,20 @@
/*
- * Copyright (c) 2010 Haulmont Technology Ltd. All Rights Reserved.
+ * Copyright (c) 2012 Haulmont Technology Ltd. All Rights Reserved.
* Haulmont Technology proprietary and confidential.
* Use is subject to license terms.
-
- * Author: Yuryi Artamonov
- * Created: 17.11.2010 18:04:54
- *
- * $Id$
*/
package com.haulmont.cuba.gui.components;
import java.util.Map;
import java.util.UUID;
+/**
+ * @author artamonov
+ * @version $Id$
+ */
public interface FileMultiUploadField extends Component, Component.HasCaption, Component.BelongToFrame {
- String NAME = "multiupload";
+ String NAME = "multiUpload";
int QUEUE_LIMIT_EXCEEDED = -100;
int FILE_EXCEEDS_SIZE_LIMIT = -110;
diff --git a/modules/gui/src/com/haulmont/cuba/gui/components/FlowBoxLayout.java b/modules/gui/src/com/haulmont/cuba/gui/components/FlowBoxLayout.java
new file mode 100644
index 0000000000..82d06fbbcf
--- /dev/null
+++ b/modules/gui/src/com/haulmont/cuba/gui/components/FlowBoxLayout.java
@@ -0,0 +1,16 @@
+/*
+ * Copyright (c) 2012 Haulmont Technology Ltd. All Rights Reserved.
+ * Haulmont Technology proprietary and confidential.
+ * Use is subject to license terms.
+ */
+
+package com.haulmont.cuba.gui.components;
+
+/**
+ * @author krivopustov
+ * @version $Id$
+ */
+public interface FlowBoxLayout extends BoxLayout {
+
+ String NAME = "flowBox";
+}
diff --git a/modules/gui/src/com/haulmont/cuba/gui/components/HtmlBoxLayout.java b/modules/gui/src/com/haulmont/cuba/gui/components/HtmlBoxLayout.java
index 2d64a015dd..4b28774a31 100644
--- a/modules/gui/src/com/haulmont/cuba/gui/components/HtmlBoxLayout.java
+++ b/modules/gui/src/com/haulmont/cuba/gui/components/HtmlBoxLayout.java
@@ -1,18 +1,17 @@
/*
- * Copyright (c) 2008 Haulmont Technology Ltd. All Rights Reserved.
+ * Copyright (c) 2012 Haulmont Technology Ltd. All Rights Reserved.
* Haulmont Technology proprietary and confidential.
* Use is subject to license terms.
-
- * Author: Nikolay Gorodnov
- * Created: 17.08.2009 17:09:25
- *
- * $Id$
*/
package com.haulmont.cuba.gui.components;
+/**
+ * @author gorodnov
+ * @version $Id$
+ */
public interface HtmlBoxLayout extends ExpandingLayout, Component.BelongToFrame {
- String NAME = "htmlbox";
+ String NAME = "htmlBox";
String getTemplateName();
void setTemplateName(String templateName);
diff --git a/modules/gui/src/com/haulmont/cuba/gui/components/RuntimePropertiesFrame.java b/modules/gui/src/com/haulmont/cuba/gui/components/RuntimePropertiesFrame.java
index e44ef9796b..aea6afc28a 100644
--- a/modules/gui/src/com/haulmont/cuba/gui/components/RuntimePropertiesFrame.java
+++ b/modules/gui/src/com/haulmont/cuba/gui/components/RuntimePropertiesFrame.java
@@ -30,10 +30,9 @@ import java.util.*;
/**
* Universal frame for editing Runtime properties
* of any {@link com.haulmont.cuba.core.entity.CategorizedEntity} subclass.
- *
- * $Id$
*
* @author devyatkin
+ * @version $Id$
*/
public class RuntimePropertiesFrame extends AbstractWindow {
@@ -41,7 +40,8 @@ public class RuntimePropertiesFrame extends AbstractWindow {
private RuntimePropsDatasource rds;
private CollectionDatasource categoriesDs;
- public static final String NAME = "runtimePropertiesFrame";
+ public static final String NAME = "runtimeProperties";
+
private static final String DEFAULT_FIELD_WIDTH = "100%";
private String rows;
private String cols;
diff --git a/modules/gui/src/com/haulmont/cuba/gui/components/Tabsheet.java b/modules/gui/src/com/haulmont/cuba/gui/components/TabSheet.java
similarity index 84%
rename from modules/gui/src/com/haulmont/cuba/gui/components/Tabsheet.java
rename to modules/gui/src/com/haulmont/cuba/gui/components/TabSheet.java
index f989f4fffa..f543209d5c 100644
--- a/modules/gui/src/com/haulmont/cuba/gui/components/Tabsheet.java
+++ b/modules/gui/src/com/haulmont/cuba/gui/components/TabSheet.java
@@ -1,11 +1,7 @@
/*
- * Copyright (c) 2008 Haulmont Technology Ltd. All Rights Reserved.
+ * Copyright (c) 2012 Haulmont Technology Ltd. All Rights Reserved.
* Haulmont Technology proprietary and confidential.
* Use is subject to license terms.
-
- * Author: Dmitry Abramov
- * Created: 16.01.2009 17:33:46
- * $Id$
*/
package com.haulmont.cuba.gui.components;
@@ -14,11 +10,13 @@ import org.dom4j.Element;
import java.util.Collection;
-public interface Tabsheet
- extends
- Component, Component.BelongToFrame
-{
- String NAME = "tabsheet";
+/**
+ * @author abramov
+ * @version $Id$
+ */
+public interface TabSheet extends Component, Component.BelongToFrame {
+
+ String NAME = "tabSheet";
Tab addTab(String name, Component component);
Tab addLazyTab(String name, Element descriptor, ComponentLoader loader);
diff --git a/modules/gui/src/com/haulmont/cuba/gui/components/ToggleBoxLayout.java b/modules/gui/src/com/haulmont/cuba/gui/components/ToggleBoxLayout.java
index dbfe367a72..cfed2ef5cd 100644
--- a/modules/gui/src/com/haulmont/cuba/gui/components/ToggleBoxLayout.java
+++ b/modules/gui/src/com/haulmont/cuba/gui/components/ToggleBoxLayout.java
@@ -1,19 +1,18 @@
/*
- * Copyright (c) 2008 Haulmont Technology Ltd. All Rights Reserved.
+ * Copyright (c) 2012 Haulmont Technology Ltd. All Rights Reserved.
* Haulmont Technology proprietary and confidential.
* Use is subject to license terms.
-
- * Author: Nikolay Gorodnov
- * Created: 12.08.2009 12:39:22
- *
- * $Id$
*/
package com.haulmont.cuba.gui.components;
+/**
+ * @author gorodnov
+ * @version $Id$
+ */
public interface ToggleBoxLayout extends Component.Container,
- Component.HasSettings, Component.HasCaption, Component.BelongToFrame
-{
- String NAME = "togglebox";
+ Component.HasSettings, Component.HasCaption, Component.BelongToFrame {
+
+ String NAME = "toggleBox";
void toggle();
void setOn(boolean on);
diff --git a/modules/gui/src/com/haulmont/cuba/gui/window.xsd b/modules/gui/src/com/haulmont/cuba/gui/window.xsd
index 1219f35dd9..7545d51bdb 100644
--- a/modules/gui/src/com/haulmont/cuba/gui/window.xsd
+++ b/modules/gui/src/com/haulmont/cuba/gui/window.xsd
@@ -1246,15 +1246,15 @@
-
+
-
+
-
+
@@ -1292,7 +1292,7 @@
-
+
diff --git a/modules/gui/src/com/haulmont/cuba/gui/xml/layout/LayoutLoaderConfig.java b/modules/gui/src/com/haulmont/cuba/gui/xml/layout/LayoutLoaderConfig.java
index 392766b2d5..0e247f645d 100644
--- a/modules/gui/src/com/haulmont/cuba/gui/xml/layout/LayoutLoaderConfig.java
+++ b/modules/gui/src/com/haulmont/cuba/gui/xml/layout/LayoutLoaderConfig.java
@@ -6,8 +6,7 @@
package com.haulmont.cuba.gui.xml.layout;
import com.haulmont.cuba.gui.ComponentPalette;
-import com.haulmont.cuba.gui.components.ProgressBar;
-import com.haulmont.cuba.gui.components.SearchField;
+import com.haulmont.cuba.gui.components.*;
import com.haulmont.cuba.gui.xml.layout.loaders.*;
import java.util.HashMap;
@@ -45,55 +44,57 @@ public class LayoutLoaderConfig {
}
private static void registerComponents(LayoutLoaderConfig config) {
- config.register("hbox", HBoxLoader.class);
- config.register("vbox", VBoxLoader.class);
- config.register("grid", GridLayoutLoader.class);
- config.register("scrollBox", ScrollBoxLayoutLoader.class);
+ config.register(BoxLayout.HBOX, HBoxLoader.class);
+ config.register(BoxLayout.VBOX, VBoxLoader.class);
+ config.register(GridLayout.NAME, GridLayoutLoader.class);
+ config.register(ScrollBoxLayout.NAME, ScrollBoxLayoutLoader.class);
config.register("scrollbox", ScrollBoxLayoutLoader.class); // for backward compatibility
- config.register("togglebox", ToggleBoxLoader.class);
- config.register("htmlbox", HtmlBoxLoader.class);
- config.register("flowbox", FlowBoxLoader.class);
+ config.register(GroupBoxLayout.NAME, GroupBoxLayoutLoader.class);
+ config.register(ToggleBoxLayout.NAME, ToggleBoxLayoutLoader.class);
+ config.register("togglebox", ToggleBoxLayoutLoader.class); // for backward compatibility
+ config.register(HtmlBoxLayout.NAME, HtmlBoxLayoutLoader.class);
+ config.register("htmlbox", HtmlBoxLayoutLoader.class); // for backward compatibility
+ config.register(FlowBoxLayout.NAME, FlowBoxLayoutLoader.class);
+ config.register("flowbox", FlowBoxLayoutLoader.class); // for backward compatibility
- config.register("button", ButtonLoader.class);
- config.register("linkButton", ButtonLoader.class); // the same loader as for button
- config.register("groupBox", GroupBoxLayoutLoader.class);
- config.register("checkBox", AbstractFieldLoader.class);
- config.register("label", LabelLoader.class);
- config.register("textField", ResizableTextFieldLoader.class);
- config.register("autoCompleteTextField", AutoCompleteTextFieldLoader.class);
- config.register("textArea", TextAreaLoader.class);
- config.register("dateField", DateFieldLoader.class);
- config.register("timeField", TimeFieldLoader.class);
- config.register("lookupField", LookupFieldLoader.class);
- config.register("pickerField", PickerFieldLoader.class);
- config.register("lookupPickerField", LookupPickerFieldLoader.class);
- config.register("searchPickerField", SearchPickerFieldLoader.class);
- config.register("optionsGroup", OptionsGroupLoader.class);
- config.register("upload", FileUploadFieldLoader.class);
- config.register("multiupload", FileUploadFieldLoader.class);
- config.register("table", TableLoader.class);
- config.register("treeTable", TreeTableLoader.class);
- config.register("groupTable", GroupTableLoader.class);
- config.register("iframe", IFrameLoader.class);
- config.register("runtimeProperties", RuntimePropertiesFrameLoader.class);
- config.register("split", SplitPanelLoader.class);
- config.register("tree", TreeLoader.class);
- config.register("tabsheet", TabsheetLoader.class);
- config.register("embedded", EmbeddedLoader.class);
- config.register("filter", FilterLoader.class);
- config.register("accessControl", AccessControlLoader.class);
- config.register("buttonsPanel", ButtonsPanelLoader.class);
- config.register("actionsField", ActionsFieldLoader.class);
- config.register("popupButton", PopupButtonLoader.class);
- config.register("fieldGroup", FieldGroupLoader.class);
- config.register("runtimeFieldGroup", FieldGroupRuntimeLoader.class);
- config.register("tokenList", TokenListLoader.class);
- config.register("widgetsTree", WidgetsTreeLoader.class);
- config.register("twinColumn", TwinColumnLoader.class);
+ config.register(Button.NAME, ButtonLoader.class);
+ config.register(LinkButton.NAME, ButtonLoader.class);
+ config.register(CheckBox.NAME, AbstractFieldLoader.class);
+ config.register(Label.NAME, LabelLoader.class);
+ config.register(TextField.NAME, ResizableTextFieldLoader.class);
+ config.register(AutoCompleteTextField.NAME, AutoCompleteTextFieldLoader.class);
+ config.register(TextArea.NAME, TextAreaLoader.class);
+ config.register(DateField.NAME, DateFieldLoader.class);
+ config.register(TimeField.NAME, TimeFieldLoader.class);
+ config.register(LookupField.NAME, LookupFieldLoader.class);
+ config.register(PickerField.NAME, PickerFieldLoader.class);
+ config.register(LookupPickerField.NAME, LookupPickerFieldLoader.class);
+ config.register(SearchPickerField.NAME, SearchPickerFieldLoader.class);
+ config.register(OptionsGroup.NAME, OptionsGroupLoader.class);
+ config.register(FileUploadField.NAME, FileUploadFieldLoader.class);
+ config.register(FileMultiUploadField.NAME, FileUploadFieldLoader.class);
+ config.register("multiupload", FileUploadFieldLoader.class); // for backward compatibility
+ config.register(Table.NAME, TableLoader.class);
+ config.register(TreeTable.NAME, TreeTableLoader.class);
+ config.register(GroupTable.NAME, GroupTableLoader.class);
+ config.register(IFrame.NAME, IFrameLoader.class);
+ config.register(RuntimePropertiesFrame.NAME, RuntimePropertiesFrameLoader.class);
+ config.register(SplitPanel.NAME, SplitPanelLoader.class);
+ config.register(Tree.NAME, TreeLoader.class);
+ config.register(TabSheet.NAME, TabSheetLoader.class);
+ config.register("tabsheet", TabSheetLoader.class); // for backward compatibility
+ config.register(Embedded.NAME, EmbeddedLoader.class);
+ config.register(Filter.NAME, FilterLoader.class);
+ config.register(AccessControl.NAME, AccessControlLoader.class);
+ config.register(ButtonsPanel.NAME, ButtonsPanelLoader.class);
+ config.register(ActionsField.NAME, ActionsFieldLoader.class);
+ config.register(PopupButton.NAME, PopupButtonLoader.class);
+ config.register(FieldGroup.NAME, FieldGroupLoader.class);
+ config.register(TokenList.NAME, TokenListLoader.class);
+ config.register(WidgetsTree.NAME, WidgetsTreeLoader.class);
+ config.register(TwinColumn.NAME, TwinColumnLoader.class);
config.register(ProgressBar.NAME, ProgressBarLoader.class);
config.register(SearchField.NAME, SearchFieldLoader.class);
-
- config.register("scriptHost", ScriptHostLoader.class);
}
public static void registerLoader(String tagName, Class extends com.haulmont.cuba.gui.xml.layout.ComponentLoader> aClass) {
diff --git a/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/FieldGroupRuntimeLoader.java b/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/FieldGroupRuntimeLoader.java
deleted file mode 100644
index 8f60480d5f..0000000000
--- a/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/FieldGroupRuntimeLoader.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2011 Haulmont Technology Ltd. All Rights Reserved.
- * Haulmont Technology proprietary and confidential.
- * Use is subject to license terms.
- */
-
-package com.haulmont.cuba.gui.xml.layout.loaders;
-
-import com.haulmont.chile.core.model.MetaClass;
-import com.haulmont.chile.core.model.MetaProperty;
-import com.haulmont.cuba.gui.components.Component;
-import com.haulmont.cuba.gui.components.FieldGroup;
-import com.haulmont.cuba.gui.components.IFrame;
-import com.haulmont.cuba.gui.data.CollectionDatasource;
-import com.haulmont.cuba.gui.data.Datasource;
-import com.haulmont.cuba.gui.data.impl.DsListenerAdapter;
-import com.haulmont.cuba.gui.xml.layout.*;
-import com.haulmont.cuba.gui.xml.layout.ComponentLoader;
-import org.apache.commons.lang.BooleanUtils;
-import org.apache.commons.lang.StringUtils;
-import org.dom4j.Element;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-/**
- * $Id$
- *
- * @author devyatkin
- */
-
-public class FieldGroupRuntimeLoader extends FieldGroupLoader {
-
- public FieldGroupRuntimeLoader(Context context, LayoutLoaderConfig config, ComponentsFactory factory) {
- super(context, config, factory);
- }
-
- @Override
- public Component loadComponent(ComponentsFactory factory, Element element, Component parent) throws InstantiationException, IllegalAccessException {
- final FieldGroup component = factory.createComponent("fieldGroup");
-
- assignXmlDescriptor(component, element);
- loadId(component, element);
-
- loadVisible(component, element);
-
- assignFrame(component);
-
- return component;
- }
-
-
- protected List loadFields(FieldGroup component, Datasource ds){
- MetaClass meta = ds.getMetaClass();
- Collection metaProperties = meta.getProperties();
- List fields = new ArrayList();
- for(MetaProperty property : metaProperties){
- FieldGroup.Field field = new FieldGroup.Field(property.getName());
- field.setCaption(property.getName());
- fields.add(field);
-
- }
- return fields;
- }
-}
diff --git a/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/FileUploadFieldLoader.java b/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/FileUploadFieldLoader.java
index 5ac9008801..183f02b730 100644
--- a/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/FileUploadFieldLoader.java
+++ b/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/FileUploadFieldLoader.java
@@ -1,11 +1,7 @@
/*
- * Copyright (c) 2008 Haulmont Technology Ltd. All Rights Reserved.
+ * Copyright (c) 2012 Haulmont Technology Ltd. All Rights Reserved.
* Haulmont Technology proprietary and confidential.
* Use is subject to license terms.
-
- * Author: Dmitry Abramov
- * Created: 11.03.2009 18:14:23
- * $Id$
*/
package com.haulmont.cuba.gui.xml.layout.loaders;
@@ -13,8 +9,11 @@ import com.haulmont.cuba.gui.components.Component;
import com.haulmont.cuba.gui.xml.layout.ComponentsFactory;
import org.dom4j.Element;
-public class FileUploadFieldLoader extends ComponentLoader{
- private static final long serialVersionUID = 5698387638929530175L;
+/**
+ * @author abramov
+ * @version $Id$
+ */
+public class FileUploadFieldLoader extends ComponentLoader {
public FileUploadFieldLoader(Context context) {
super(context);
diff --git a/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/FlowBoxLoader.java b/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/FlowBoxLayoutLoader.java
similarity index 62%
rename from modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/FlowBoxLoader.java
rename to modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/FlowBoxLayoutLoader.java
index f9f6760650..65ffe96faf 100644
--- a/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/FlowBoxLoader.java
+++ b/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/FlowBoxLayoutLoader.java
@@ -1,27 +1,29 @@
/*
- * Copyright (c) 2008 Haulmont Technology Ltd. All Rights Reserved.
+ * Copyright (c) 2012 Haulmont Technology Ltd. All Rights Reserved.
* Haulmont Technology proprietary and confidential.
* Use is subject to license terms.
-
- * Author: Nikolay Gorodnov
- * Created: 17.08.2010 14:24:26
- *
- * $Id$
*/
package com.haulmont.cuba.gui.xml.layout.loaders;
import com.haulmont.cuba.gui.components.BoxLayout;
import com.haulmont.cuba.gui.components.Component;
-import com.haulmont.cuba.gui.xml.layout.*;
+import com.haulmont.cuba.gui.components.FlowBoxLayout;
+import com.haulmont.cuba.gui.xml.layout.ComponentsFactory;
+import com.haulmont.cuba.gui.xml.layout.LayoutLoaderConfig;
import org.dom4j.Element;
-public class FlowBoxLoader extends ContainerLoader {
- public FlowBoxLoader(Context context, LayoutLoaderConfig config, ComponentsFactory factory) {
+/**
+ * @author gorodnov
+ * @version $Id$
+ */
+public class FlowBoxLayoutLoader extends ContainerLoader {
+
+ public FlowBoxLayoutLoader(Context context, LayoutLoaderConfig config, ComponentsFactory factory) {
super(context, config, factory);
}
public Component loadComponent(ComponentsFactory factory, Element element, Component parent) throws InstantiationException, IllegalAccessException {
- final BoxLayout component = factory.createComponent("flowbox");
+ final BoxLayout component = factory.createComponent(FlowBoxLayout.NAME);
assignXmlDescriptor(component, element);
loadId(component, element);
diff --git a/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/HtmlBoxLoader.java b/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/HtmlBoxLayoutLoader.java
similarity index 80%
rename from modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/HtmlBoxLoader.java
rename to modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/HtmlBoxLayoutLoader.java
index 1ba415a803..91ed73783d 100644
--- a/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/HtmlBoxLoader.java
+++ b/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/HtmlBoxLayoutLoader.java
@@ -1,12 +1,7 @@
/*
- * Copyright (c) 2008 Haulmont Technology Ltd. All Rights Reserved.
+ * Copyright (c) 2012 Haulmont Technology Ltd. All Rights Reserved.
* Haulmont Technology proprietary and confidential.
* Use is subject to license terms.
-
- * Author: Nikolay Gorodnov
- * Created: 17.08.2009 17:18:59
- *
- * $Id$
*/
package com.haulmont.cuba.gui.xml.layout.loaders;
@@ -18,15 +13,20 @@ import com.haulmont.cuba.gui.xml.layout.LayoutLoaderConfig;
import org.apache.commons.lang.StringUtils;
import org.dom4j.Element;
-public class HtmlBoxLoader extends ContainerLoader implements ComponentLoader {
- public HtmlBoxLoader(Context context, LayoutLoaderConfig config, ComponentsFactory factory) {
+/**
+ * @author gorodnov
+ * @version $Id$
+ */
+public class HtmlBoxLayoutLoader extends ContainerLoader implements ComponentLoader {
+
+ public HtmlBoxLayoutLoader(Context context, LayoutLoaderConfig config, ComponentsFactory factory) {
super(context, config, factory);
}
public Component loadComponent(
ComponentsFactory factory, Element element, Component parent
) throws InstantiationException, IllegalAccessException {
- final HtmlBoxLayout component = factory.createComponent("htmlbox");
+ final HtmlBoxLayout component = factory.createComponent(HtmlBoxLayout.NAME);
assignXmlDescriptor(component, element);
loadId(component, element);
diff --git a/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/ProgressBarLoader.java b/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/ProgressBarLoader.java
index 4e8e744fe9..7e575ec599 100644
--- a/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/ProgressBarLoader.java
+++ b/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/ProgressBarLoader.java
@@ -15,12 +15,10 @@ import org.apache.commons.lang.StringUtils;
import org.dom4j.Element;
/**
- * $Id$
- *
* @author Alexander Budarov
+ * @version $Id$
*/
public class ProgressBarLoader extends AbstractFieldLoader {
- private static final long serialVersionUID = 4465232545027614638L;
public ProgressBarLoader(Context context, LayoutLoaderConfig config, ComponentsFactory factory) {
super(context, config, factory);
diff --git a/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/ScriptHostLoader.java b/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/ScriptHostLoader.java
deleted file mode 100644
index 23a6424305..0000000000
--- a/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/ScriptHostLoader.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2011 Haulmont Technology Ltd. All Rights Reserved.
- * Haulmont Technology proprietary and confidential.
- * Use is subject to license terms.
- */
-
-package com.haulmont.cuba.gui.xml.layout.loaders;
-
-import com.haulmont.cuba.gui.components.Component;
-import com.haulmont.cuba.gui.xml.layout.ComponentsFactory;
-import org.dom4j.Element;
-
-/**
- * $Id$
- *
- * @author artamonov
- */
-public class ScriptHostLoader extends ComponentLoader {
- private static final long serialVersionUID = -5747403317360243260L;
-
- public ScriptHostLoader(Context context) {
- super(context);
- }
-
- public Component loadComponent(ComponentsFactory factory, Element element, Component parent) throws InstantiationException, IllegalAccessException {
- Component component = factory.createComponent(element.getName());
-
- loadId(component, element);
-
- assignFrame((Component.BelongToFrame) component);
-
- return component;
- }
-}
\ No newline at end of file
diff --git a/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/TabsheetLoader.java b/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/TabSheetLoader.java
similarity index 87%
rename from modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/TabsheetLoader.java
rename to modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/TabSheetLoader.java
index f2049e3009..f80b5efb8f 100644
--- a/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/TabsheetLoader.java
+++ b/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/TabSheetLoader.java
@@ -6,7 +6,7 @@
package com.haulmont.cuba.gui.xml.layout.loaders;
import com.haulmont.cuba.gui.components.Component;
-import com.haulmont.cuba.gui.components.Tabsheet;
+import com.haulmont.cuba.gui.components.TabSheet;
import com.haulmont.cuba.gui.xml.layout.ComponentLoader;
import com.haulmont.cuba.gui.xml.layout.ComponentsFactory;
import com.haulmont.cuba.gui.xml.layout.LayoutLoaderConfig;
@@ -19,8 +19,9 @@ import java.util.List;
* @author abramov
* @version $Id$
*/
-public class TabsheetLoader extends ContainerLoader {
- public TabsheetLoader(Context context, LayoutLoaderConfig config, ComponentsFactory factory) {
+public class TabSheetLoader extends ContainerLoader {
+
+ public TabSheetLoader(Context context, LayoutLoaderConfig config, ComponentsFactory factory) {
super(context, config, factory);
}
@@ -28,7 +29,7 @@ public class TabsheetLoader extends ContainerLoader {
public Component loadComponent(ComponentsFactory factory, Element element, Component parent)
throws InstantiationException, IllegalAccessException {
- final Tabsheet component = factory.createComponent("tabsheet");
+ final TabSheet component = factory.createComponent(TabSheet.NAME);
assignXmlDescriptor(component, element);
loadId(component, element);
@@ -46,7 +47,7 @@ public class TabsheetLoader extends ContainerLoader {
boolean lazy = Boolean.valueOf(tabElement.attributeValue("lazy"));
final ComponentLoader loader = getLoader("vbox");
- final Tabsheet.Tab tab;
+ final TabSheet.Tab tab;
if (lazy) {
tab = component.addLazyTab(name, tabElement, loader);
diff --git a/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/ToggleBoxLoader.java b/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/ToggleBoxLayoutLoader.java
similarity index 77%
rename from modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/ToggleBoxLoader.java
rename to modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/ToggleBoxLayoutLoader.java
index 597bede0aa..5a6e7a0dc3 100644
--- a/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/ToggleBoxLoader.java
+++ b/modules/gui/src/com/haulmont/cuba/gui/xml/layout/loaders/ToggleBoxLayoutLoader.java
@@ -1,24 +1,24 @@
/*
- * Copyright (c) 2008 Haulmont Technology Ltd. All Rights Reserved.
+ * Copyright (c) 2012 Haulmont Technology Ltd. All Rights Reserved.
* Haulmont Technology proprietary and confidential.
* Use is subject to license terms.
-
- * Author: Nikolay Gorodnov
- * Created: 12.08.2009 15:14:59
- *
- * $Id$
*/
package com.haulmont.cuba.gui.xml.layout.loaders;
import com.haulmont.cuba.gui.components.Component;
import com.haulmont.cuba.gui.components.ToggleBoxLayout;
-import com.haulmont.cuba.gui.xml.layout.*;
+import com.haulmont.cuba.gui.xml.layout.ComponentsFactory;
+import com.haulmont.cuba.gui.xml.layout.LayoutLoaderConfig;
import org.dom4j.Element;
-public class ToggleBoxLoader extends ContainerLoader
+/**
+ * @author gorodnov
+ * @version $Id$
+ */
+public class ToggleBoxLayoutLoader extends ContainerLoader
implements com.haulmont.cuba.gui.xml.layout.ComponentLoader {
- public ToggleBoxLoader(Context context, LayoutLoaderConfig config, ComponentsFactory factory) {
+ public ToggleBoxLayoutLoader(Context context, LayoutLoaderConfig config, ComponentsFactory factory) {
super(context, config, factory);
}
@@ -27,7 +27,7 @@ public class ToggleBoxLoader extends ContainerLoader
Element element,
Component parent
) throws InstantiationException, IllegalAccessException {
- final ToggleBoxLayout component = factory.createComponent("togglebox");
+ final ToggleBoxLayout component = factory.createComponent(ToggleBoxLayout.NAME);
assignXmlDescriptor(component, element);
loadId(component, element);
diff --git a/modules/web/src/com/haulmont/cuba/web/WebWindowManager.java b/modules/web/src/com/haulmont/cuba/web/WebWindowManager.java
index 34442685c7..6512c5ce6c 100644
--- a/modules/web/src/com/haulmont/cuba/web/WebWindowManager.java
+++ b/modules/web/src/com/haulmont/cuba/web/WebWindowManager.java
@@ -1,12 +1,7 @@
/*
- * Copyright (c) 2008 Haulmont Technology Ltd. All Rights Reserved.
+ * Copyright (c) 2012 Haulmont Technology Ltd. All Rights Reserved.
* Haulmont Technology proprietary and confidential.
* Use is subject to license terms.
-
- * Author: Konstantin Krivopustov
- * Created: 11.12.2008 17:33:12
- *
- * $Id$
*/
package com.haulmont.cuba.web;
@@ -15,8 +10,13 @@ import com.haulmont.cuba.core.global.Configuration;
import com.haulmont.cuba.core.global.Messages;
import com.haulmont.cuba.core.global.SilentException;
import com.haulmont.cuba.gui.*;
-import com.haulmont.cuba.gui.components.*;
+import com.haulmont.cuba.gui.components.AbstractAction;
+import com.haulmont.cuba.gui.components.Action;
+import com.haulmont.cuba.gui.components.DialogAction;
+import com.haulmont.cuba.gui.components.IFrame;
+import com.haulmont.cuba.gui.components.ShortcutAction;
import com.haulmont.cuba.gui.components.Window;
+import com.haulmont.cuba.gui.components.WrappedWindow;
import com.haulmont.cuba.gui.config.WindowInfo;
import com.haulmont.cuba.web.gui.WebWindow;
import com.haulmont.cuba.web.gui.components.WebButton;
@@ -30,6 +30,7 @@ import com.vaadin.ui.Button;
import com.vaadin.ui.Component;
import com.vaadin.ui.*;
import com.vaadin.ui.Label;
+import com.vaadin.ui.TabSheet;
import org.apache.commons.lang.BooleanUtils;
import org.apache.commons.lang.ObjectUtils;
import org.apache.commons.lang.StringUtils;
@@ -40,6 +41,10 @@ import org.apache.commons.logging.LogFactory;
import javax.annotation.Nullable;
import java.util.*;
+/**
+ * @author krivopustov
+ * @version $Id$
+ */
public class WebWindowManager extends WindowManager {
protected static class WindowData {
diff --git a/modules/web/src/com/haulmont/cuba/web/app/ui/serverlogviewer/server-log-window.xml b/modules/web/src/com/haulmont/cuba/web/app/ui/serverlogviewer/server-log-window.xml
index 5539d8b005..d02e48e0bf 100644
--- a/modules/web/src/com/haulmont/cuba/web/app/ui/serverlogviewer/server-log-window.xml
+++ b/modules/web/src/com/haulmont/cuba/web/app/ui/serverlogviewer/server-log-window.xml
@@ -16,7 +16,7 @@
-
+
@@ -37,7 +37,7 @@
-
+
diff --git a/modules/web/src/com/haulmont/cuba/web/gui/WebComponentsFactory.java b/modules/web/src/com/haulmont/cuba/web/gui/WebComponentsFactory.java
index 190f87c921..09e830e4a1 100644
--- a/modules/web/src/com/haulmont/cuba/web/gui/WebComponentsFactory.java
+++ b/modules/web/src/com/haulmont/cuba/web/gui/WebComponentsFactory.java
@@ -14,6 +14,10 @@ import javax.annotation.ManagedBean;
import java.util.HashMap;
import java.util.Map;
+/**
+ * @author krivopustov
+ * @version $Id$
+ */
@ManagedBean(ComponentsFactory.NAME)
public class WebComponentsFactory implements ComponentsFactory {
@@ -30,7 +34,7 @@ public class WebComponentsFactory implements ComponentsFactory {
classes.put(ScrollBoxLayout.NAME, WebScrollBoxLayout.class);
classes.put(ToggleBoxLayout.NAME, WebToggleBoxLayout.class);
classes.put(HtmlBoxLayout.NAME, WebHtmlBoxLayout.class);
- classes.put("flowbox", WebFlowBoxLayout.class);
+ classes.put(FlowBoxLayout.NAME, WebFlowBoxLayout.class);
classes.put(Button.NAME, WebButton.class);
classes.put(LinkButton.NAME, WebLinkButton.class);
@@ -57,7 +61,7 @@ public class WebComponentsFactory implements ComponentsFactory {
classes.put(FileMultiUploadField.NAME, WebFileMultiUploadField.class);
classes.put(SplitPanel.NAME, WebSplitPanel.class);
classes.put(Tree.NAME, WebTree.class);
- classes.put(Tabsheet.NAME, WebTabsheet.class);
+ classes.put(TabSheet.NAME, WebTabSheet.class);
classes.put(Embedded.NAME, WebEmbedded.class);
classes.put(Filter.NAME, WebFilter.class);
classes.put(AccessControl.NAME, WebAccessControl.class);
diff --git a/modules/web/src/com/haulmont/cuba/web/gui/WebWindow.java b/modules/web/src/com/haulmont/cuba/web/gui/WebWindow.java
index 73e40c4d3f..42a60d42f2 100644
--- a/modules/web/src/com/haulmont/cuba/web/gui/WebWindow.java
+++ b/modules/web/src/com/haulmont/cuba/web/gui/WebWindow.java
@@ -27,8 +27,13 @@ import com.haulmont.cuba.web.toolkit.ui.VerticalActionsLayout;
import com.vaadin.event.ItemClickEvent;
import com.vaadin.terminal.Sizeable;
import com.vaadin.terminal.ThemeResource;
-import com.vaadin.ui.*;
+import com.vaadin.ui.AbstractOrderedLayout;
import com.vaadin.ui.Button;
+import com.vaadin.ui.ComponentContainer;
+import com.vaadin.ui.HorizontalLayout;
+import com.vaadin.ui.Layout;
+import com.vaadin.ui.TabSheet;
+import com.vaadin.ui.VerticalLayout;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.dom4j.Element;
diff --git a/modules/web/src/com/haulmont/cuba/web/gui/components/WebFlowBoxLayout.java b/modules/web/src/com/haulmont/cuba/web/gui/components/WebFlowBoxLayout.java
index a84b3e2ada..382c69f5d9 100644
--- a/modules/web/src/com/haulmont/cuba/web/gui/components/WebFlowBoxLayout.java
+++ b/modules/web/src/com/haulmont/cuba/web/gui/components/WebFlowBoxLayout.java
@@ -10,13 +10,14 @@
*/
package com.haulmont.cuba.web.gui.components;
-import com.haulmont.cuba.gui.components.Component;
+import com.haulmont.cuba.gui.components.FlowBoxLayout;
import com.haulmont.cuba.toolkit.gwt.client.ui.VFlowLayout;
import com.vaadin.ui.ClientWidget;
@SuppressWarnings("serial")
@ClientWidget(VFlowLayout.class)
-public class WebFlowBoxLayout extends WebVBoxLayout {
+public class WebFlowBoxLayout extends WebVBoxLayout implements FlowBoxLayout {
+
public WebFlowBoxLayout() {
setHeight("100%");
}
diff --git a/modules/web/src/com/haulmont/cuba/web/gui/components/WebScriptHost.java b/modules/web/src/com/haulmont/cuba/web/gui/components/WebScriptHost.java
index ca3b34ea8c..0824e40138 100644
--- a/modules/web/src/com/haulmont/cuba/web/gui/components/WebScriptHost.java
+++ b/modules/web/src/com/haulmont/cuba/web/gui/components/WebScriptHost.java
@@ -6,7 +6,6 @@
package com.haulmont.cuba.web.gui.components;
-import com.haulmont.cuba.gui.components.ClientScriptHost;
import com.haulmont.cuba.gui.components.ValueProvider;
import com.haulmont.cuba.toolkit.gwt.client.utils.VScriptHost;
import com.haulmont.cuba.web.toolkit.ui.JavaScriptHost;
@@ -19,7 +18,7 @@ import com.vaadin.ui.ClientWidget;
*/
@ClientWidget(VScriptHost.class)
@SuppressWarnings({"unused"})
-public class WebScriptHost extends WebAbstractComponent implements ClientScriptHost {
+public class WebScriptHost extends WebAbstractComponent {
public WebScriptHost() {
this.component = new JavaScriptHost();
diff --git a/modules/web/src/com/haulmont/cuba/web/gui/components/WebTabsheet.java b/modules/web/src/com/haulmont/cuba/web/gui/components/WebTabSheet.java
similarity index 82%
rename from modules/web/src/com/haulmont/cuba/web/gui/components/WebTabsheet.java
rename to modules/web/src/com/haulmont/cuba/web/gui/components/WebTabSheet.java
index 47570b1d60..5d838812a6 100644
--- a/modules/web/src/com/haulmont/cuba/web/gui/components/WebTabsheet.java
+++ b/modules/web/src/com/haulmont/cuba/web/gui/components/WebTabSheet.java
@@ -14,28 +14,27 @@ import com.haulmont.cuba.gui.ComponentVisitor;
import com.haulmont.cuba.gui.ComponentsHelper;
import com.haulmont.cuba.gui.components.Component;
import com.haulmont.cuba.gui.components.IFrame;
-import com.haulmont.cuba.gui.components.Tabsheet;
+import com.haulmont.cuba.gui.components.TabSheet;
import com.haulmont.cuba.gui.components.Window;
import com.haulmont.cuba.gui.data.impl.DsContextImplementation;
import com.haulmont.cuba.gui.settings.Settings;
import com.haulmont.cuba.gui.xml.layout.ComponentLoader;
-import com.vaadin.ui.TabSheet;
import org.dom4j.Element;
import java.util.*;
-public class WebTabsheet
+public class WebTabSheet
extends
- WebAbstractComponent
+ WebAbstractComponent
implements
- Tabsheet, Component.Wrapper, Component.Container
+ TabSheet, Component.Wrapper, Component.Container
{
private boolean postInitTaskAdded;
private boolean componentTabChangeListenerInitialized;
private ComponentLoader.Context context;
- public WebTabsheet() {
+ public WebTabSheet() {
component = new TabSheetEx(this);
component.setCloseHandler(new MyCloseHandler());
}
@@ -85,7 +84,7 @@ public class WebTabsheet
return ComponentsHelper.getComponents(this);
}
- protected class Tab implements com.haulmont.cuba.gui.components.Tabsheet.Tab {
+ protected class Tab implements TabSheet.Tab {
private String name;
private Component component;
@@ -108,43 +107,43 @@ public class WebTabsheet
@Override
public String getCaption() {
- return WebTabsheet.this.component.getTab(WebComponentsHelper.unwrap(component)).getCaption();
+ return WebTabSheet.this.component.getTab(WebComponentsHelper.unwrap(component)).getCaption();
}
@Override
public void setCaption(String caption) {
- WebTabsheet.this.component.getTab(WebComponentsHelper.unwrap(component)).setCaption(caption);
+ WebTabSheet.this.component.getTab(WebComponentsHelper.unwrap(component)).setCaption(caption);
}
@Override
public boolean isEnabled() {
- return WebTabsheet.this.component.getTab(WebComponentsHelper.unwrap(component)).isEnabled();
+ return WebTabSheet.this.component.getTab(WebComponentsHelper.unwrap(component)).isEnabled();
}
@Override
public void setEnabled(boolean enabled) {
- WebTabsheet.this.component.getTab(WebComponentsHelper.unwrap(component)).setEnabled(enabled);
+ WebTabSheet.this.component.getTab(WebComponentsHelper.unwrap(component)).setEnabled(enabled);
}
@Override
public boolean isVisible() {
- return WebTabsheet.this.component.getTab(WebComponentsHelper.unwrap(component)).isVisible();
+ return WebTabSheet.this.component.getTab(WebComponentsHelper.unwrap(component)).isVisible();
}
@Override
public void setVisible(boolean visible) {
- WebTabsheet.this.component.getTab(WebComponentsHelper.unwrap(component)).setVisible(visible);
+ WebTabSheet.this.component.getTab(WebComponentsHelper.unwrap(component)).setVisible(visible);
}
@Override
public boolean isClosable() {
- TabSheet.Tab tab = WebTabsheet.this.component.getTab(WebComponentsHelper.unwrap(component));
+ com.vaadin.ui.TabSheet.Tab tab = WebTabSheet.this.component.getTab(WebComponentsHelper.unwrap(component));
return tab.isClosable();
}
@Override
public void setClosable(boolean closable) {
- TabSheet.Tab tab = WebTabsheet.this.component.getTab(WebComponentsHelper.unwrap(component));
+ com.vaadin.ui.TabSheet.Tab tab = WebTabSheet.this.component.getTab(WebComponentsHelper.unwrap(component));
tab.setClosable(closable);
}
@@ -172,13 +171,13 @@ public class WebTabsheet
@Override
public void setCaptionStyleName(String styleName) {
- TabSheet.Tab vaadinTab = WebTabsheet.this.component.getTab(WebComponentsHelper.unwrap(component));
+ com.vaadin.ui.TabSheet.Tab vaadinTab = WebTabSheet.this.component.getTab(WebComponentsHelper.unwrap(component));
vaadinTab.setCaptionStyle(styleName);
}
}
@Override
- public com.haulmont.cuba.gui.components.Tabsheet.Tab addTab(String name, Component component) {
+ public TabSheet.Tab addTab(String name, Component component) {
final Tab tab = new Tab(name, component);
this.tabs.put(name, tab);
@@ -193,7 +192,7 @@ public class WebTabsheet
}
@Override
- public com.haulmont.cuba.gui.components.Tabsheet.Tab addLazyTab(String name,
+ public TabSheet.Tab addLazyTab(String name,
Element descriptor,
ComponentLoader loader)
{
@@ -244,7 +243,7 @@ public class WebTabsheet
}
@Override
- public void setTab(com.haulmont.cuba.gui.components.Tabsheet.Tab tab) {
+ public void setTab(TabSheet.Tab tab) {
this.component.setSelectedTab(WebComponentsHelper.unwrap(((Tab) tab).getComponent()));
}
@@ -257,12 +256,12 @@ public class WebTabsheet
}
@Override
- public Tabsheet.Tab getTab(String name) {
+ public TabSheet.Tab getTab(String name) {
return tabs.get(name);
}
@Override
- public Collection getTabs() {
+ public Collection getTabs() {
return (Collection)tabs.values();
}
@@ -276,9 +275,9 @@ public class WebTabsheet
// init component SelectedTabChangeListener only when needed, making sure it is
// after all lazy tabs listeners
if (!componentTabChangeListenerInitialized) {
- component.addListener(new TabSheet.SelectedTabChangeListener() {
+ component.addListener(new com.vaadin.ui.TabSheet.SelectedTabChangeListener() {
@Override
- public void selectedTabChange(TabSheet.SelectedTabChangeEvent event) {
+ public void selectedTabChange(com.vaadin.ui.TabSheet.SelectedTabChangeEvent event) {
// Fire GUI listener
fireTabChanged();
// Execute outstanding post init tasks after GUI listener.
@@ -302,7 +301,7 @@ public class WebTabsheet
}
}
- private static class TabSheetEx extends TabSheet implements WebComponentEx {
+ private static class TabSheetEx extends com.vaadin.ui.TabSheet implements WebComponentEx {
private Component component;
private TabSheetEx(Component component) {
@@ -315,7 +314,7 @@ public class WebTabsheet
}
}
- private class LazyTabChangeListener implements TabSheet.SelectedTabChangeListener {
+ private class LazyTabChangeListener implements com.vaadin.ui.TabSheet.SelectedTabChangeListener {
private WebAbstractBox tabContent;
private Element descriptor;
@@ -328,8 +327,8 @@ public class WebTabsheet
}
@Override
- public void selectedTabChange(TabSheet.SelectedTabChangeEvent event) {
- com.vaadin.ui.Component selectedTab = WebTabsheet.this.component.getSelectedTab();
+ public void selectedTabChange(com.vaadin.ui.TabSheet.SelectedTabChangeEvent event) {
+ com.vaadin.ui.Component selectedTab = WebTabSheet.this.component.getSelectedTab();
if (selectedTab == tabContent && lazyTabs.remove(tabContent)) {
Component comp;
try {
@@ -344,7 +343,7 @@ public class WebTabsheet
com.vaadin.ui.Component impl = WebComponentsHelper.getComposition(comp);
impl.setSizeFull();
- final Window window = com.haulmont.cuba.gui.ComponentsHelper.getWindow(WebTabsheet.this);
+ final Window window = com.haulmont.cuba.gui.ComponentsHelper.getWindow(WebTabSheet.this);
if (window != null) {
com.haulmont.cuba.gui.ComponentsHelper.walkComponents(
tabContent,
@@ -368,11 +367,11 @@ public class WebTabsheet
}
}
- private class MyCloseHandler implements TabSheet.CloseHandler {
+ private class MyCloseHandler implements com.vaadin.ui.TabSheet.CloseHandler {
private static final long serialVersionUID = -6766617382191585632L;
@Override
- public void onTabClose(TabSheet tabsheet, com.vaadin.ui.Component tabContent) {
+ public void onTabClose(com.vaadin.ui.TabSheet tabsheet, com.vaadin.ui.Component tabContent) {
// have no other way to get tab from tab content
for (Tab tab: tabs.values()) {
com.vaadin.ui.Component tabComponent = WebComponentsHelper.unwrap(tab.getComponent());