Vojtech Szocs has posted comments on this change. Change subject: userportal, webadmin: ScrollableTabBar ......................................................................
Patch Set 9: (51 comments) Overall very nice patch, comments inline! .................................................... File frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/presenter/ScrollableTabBarPresenterWidget.java Line 14: import com.gwtplatform.mvp.client.PresenterWidget; Line 15: import com.gwtplatform.mvp.client.View; Line 16: Line 17: /** Line 18: * Scroll-able tab widget that presents scrolling buttons when the window is not large enough to contain all the ... tab bar widget ... Line 19: * tabs. The scroll buttons allow the user to scroll so they can see tabs that they could not see otherwise. The Line 20: * widget also provide a drop down menu list of all the tabs. Line 21: */ Line 22: public class ScrollableTabBarPresenterWidget extends PresenterWidget<ScrollableTabBarPresenterWidget.ViewDef> Line 24: Line 25: /** Line 26: * View definition. Line 27: */ Line 28: public interface ViewDef extends View, TabWidgetHandler, IsWidget { GWTP View interface already extends IsWidget, no need to extend IsWidget here. Line 29: /** Line 30: * recalculate the needed sizes. Line 31: */ Line 32: void recalculateSize(); Line 37: /** Line 38: * Set the offset. Line 39: * @param left The offset in pixels. Line 40: */ Line 41: void setOffset(int left); Consider using Javadoc from ScrollableTabBarPresenterWidget.setOffset method which has more detail. One convention is to document methods on Presenter, without documenting View methods. This is because View should be managed by this Presenter, other Presenters intracting with this Presenter should call methods on this Presenter. Line 42: /** Line 43: * Set how many pixels the scroll panel should scroll when a button is clicked. Line 44: * @param scrollDistance The distance in pixels. Line 45: */ Line 86: resizeHandlerRegistration.removeHandler(); Line 87: } Line 88: } Line 89: })); Line 90: resizeHandlerRegistration = Window.addResizeHandler(new ResizeHandler() { Can you please clarify why the Window resize handler isn't needed after first HeaderOffsetChangeEvent gets fired and handled here? Line 91: @Override Line 92: public void onResize(ResizeEvent resizeEvent) { Line 93: getView().recalculateSize(); Line 94: getView().showScrollButtons(); .................................................... File frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/view/ScrollableTabBarView.java Line 21: import com.google.gwt.user.client.ui.PushButton; Line 22: import com.google.gwt.user.client.ui.Widget; Line 23: import com.google.inject.Inject; Line 24: Line 25: public class ScrollableTabBarView extends Composite implements ScrollableTabBarPresenterWidget.ViewDef { This View extends Composite which makes it GWT widget on its own. However, most Views extend AbstractView by convention, for example: public class SomeView extends AbstractView implements ViewDef { interface ViewUiBinder extends UiBinder<Widget, SomeView> { ViewUiBinder uiBinder = GWT.create(ViewUiBinder.class); } public SomeView() { // see ViewImpl.initWidget() for details initWidget(ViewUiBinder.uiBinder.createAndBindUi(this)); } } AbstractView implements GWTP View which extends IsWidget interface. This means AbstractView is just a wrapper around the actual GWT widget, it's not GWT widget on its own. In other words, Views are architectural components in Model-View-Presenter so it's better to not mix the concept of a View with concept of a GWT widget. I think it's better to make ScrollableTabBarView extend AbstractView. If you want to get hold of the actual GWT widget wrapped by AbstractView, you can use IsWidget.asWidget() method. Line 26: Line 27: public interface TabBarUiBinder extends UiBinder<Widget, ScrollableTabBarView> { Line 28: } Line 29: Line 23: import com.google.inject.Inject; Line 24: Line 25: public class ScrollableTabBarView extends Composite implements ScrollableTabBarPresenterWidget.ViewDef { Line 26: Line 27: public interface TabBarUiBinder extends UiBinder<Widget, ScrollableTabBarView> { By convention, this should be "ViewUiBinder". Line 28: } Line 29: Line 30: /** Line 31: * element style name of 'min-width' that gets manipulated in the view. Line 46: Line 47: /** Line 48: * The CSS styles available to be modified inside the view. Line 49: */ Line 50: interface Style extends CssResource { I like that this interface has package-private visibility, assuming it's meant to be used only by this View. Line 51: /** Line 52: * The style associated with each drop down item. Line 53: * Line 54: * @return The style name as a string regardless of obfuscation level. Line 52: * The style associated with each drop down item. Line 53: * Line 54: * @return The style name as a string regardless of obfuscation level. Line 55: */ Line 56: String dropdownItems(); If this CSS style name relates to a single item, I'd suggest to use singular form like "dropdownItem". Line 57: Line 58: /** Line 59: * The style of the outer item container. Line 60: * @return The style name as a string regardless of obfuscation level. Line 124: * Line 125: * @param binder The UI-binder definition used to instantiate the widget. Line 126: */ Line 127: @Inject Line 128: public ScrollableTabBarView(final TabBarUiBinder binder) { This is interesting, I see that you utilize GIN's ability to GWT.create() @Inject'ed dependencies lazily. Normally, in View classes we use UiBinder like so: interface ViewUiBinder extends UiBinder<Widget, SomeView> { ViewUiBinder uiBinder = GWT.create(ViewUiBinder.class); } Your code essentially causes GWT.create(TabBarUiBinder.class) but there is one catch - in your code, "binder" is not singleton, GIN creates & injects it lazily and then forgets it. This is because the default scope in GIN is non-singleton (aka "prototype" in Spring). On the other hand, "ViewUiBinder.uiBinder" is implicitly static and therefore the GWT.create()'d instance is shared by all View instances. This is why we have an established usage pattern like "ViewUiBinder.uiBinder". IIUC, ScrollableTabBarView is bound as non-singleton - please consider using the notation above & let me know what you think. Line 129: initWidget(binder.createAndBindUi(this)); Line 130: configureAutoHidePartners(); Line 131: } Line 132: Line 138: } Line 139: Line 140: @Override Line 141: public void addTabWidget(IsWidget tabWidget, int index) { Line 142: Widget listWidget = copyWidget(tabWidget); This is interesting, copying original tab widget into one suitable for use with dropdown panel. Line 143: if (listWidget != null) { Line 144: widgetBar.insert(tabWidget, index); Line 145: dropdownPanel.insert(listWidget, index); Line 146: } Line 144: widgetBar.insert(tabWidget, index); Line 145: dropdownPanel.insert(listWidget, index); Line 146: } Line 147: recalculateWidgetBarMinWidth(); Line 148: showScrollButtons(); Shouldn't also the above two statements be included inside "if" block above? Line 149: } Line 150: Line 151: @Override Line 152: public void removeTabWidget(IsWidget tabWidget) { Line 149: } Line 150: Line 151: @Override Line 152: public void removeTabWidget(IsWidget tabWidget) { Line 153: widgetBar.remove(tabWidget); What about dropdownPanel, don't we want to remove corresponding "listWidget" from there too? Line 154: recalculateWidgetBarMinWidth(); Line 155: showScrollButtons(); Line 156: } Line 157: Line 155: showScrollButtons(); Line 156: } Line 157: Line 158: /** Line 159: * Copy the passed in widget WITHOUT the event handlers. Then add a click handler to the new widget Consider updating the Javadoc to state that the copied widget is created from source widget's HTML, minus any original CSS class names. Line 160: * and add the 'dropdownItems' style to them. Also left align the text in the widget as it is now part Line 161: * of a list and it looks strange not being left aligned. Line 162: * Line 163: * @param widget The original widget, which is unchanged after this call. Line 162: * Line 163: * @param widget The original widget, which is unchanged after this call. Line 164: * @return The new widget with click handler and dropdownItems style. Line 165: */ Line 166: private Widget copyWidget(final IsWidget widget) { Consider changing method name to something like "copyWidgetAsDropdownItem". Line 167: HTML newWidget = null; Line 168: if (widget != null) { Line 169: newWidget = new HTML(); Line 170: newWidget.setHTML(widget.asWidget().getElement().getString().replaceAll("class=\".*?\"", //$NON-NLS-1$ Line 198: * Calculate the minimum width needed to display all the tabs on the bar. This works even if there are some Line 199: * right floating tabs. Line 200: */ Line 201: private void recalculateWidgetBarMinWidth() { Line 202: // Add 1 for browsers that don't report width properly. Does this impact browsers that do report width properly? Line 203: widgetBar.getElement().getStyle().setProperty(MIN_WIDTH_STYLE, calculateWidgetMinWidthNeeded() + 1, Unit.PX); Line 204: } Line 205: Line 206: /** Line 328: */ Line 329: private boolean isScrollingNecessary() { Line 330: int currentWidth = asWidget().getOffsetWidth(); Line 331: int minWidth = getWidgetMinWidthNeeded(); Line 332: return minWidth > 0 && currentWidth > 0 && currentWidth <= minWidth + 1; Is the +1 related to +1 in recalculateWidgetBarMinWidth method? If yes, shouldn't calculateWidgetMinWidthNeeded method be modified to include +1 adjustment instead of duplicating +1 in recalculateWidgetBarMinWidth + isScrollingNecessary calculations? Line 333: } Line 334: Line 335: /** Line 336: * Adjust the scroll by a number of pixels. The value can be positive or negative. Line 395: showScrollButtons(); Line 396: } Line 397: Line 398: @Override Line 399: public void addToSlot(Object slot, IsWidget content) { Do we really need addToSlot + removeFromSlot + setInSlot method overrides here? If I'm not mistaken, ScrollableTabBarPresenter doesn't expose any slots to which content can be added, so these method overrides aren't used at all. Line 400: recalculateSize(); Line 401: } Line 402: Line 403: @Override .................................................... File frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/action/AbstractActionPanel.java Line 80: @Source("org/ovirt/engine/ui/common/images/cascade_button.png") Line 81: ImageResource cascadeButtonArrow(); Line 82: } Line 83: Line 84: private static final ActionPanelResources RESOURCES = GWT.create(ActionPanelResources.class); Making this static causes the ClientBundle to be GWT.create'd early, I don't think this is a problem, though. Line 85: Line 86: private static final String GWT_PREFIX = "gwt-"; //$NON-NLS-1$ Line 87: private static final String MIN_WIDTH = "minWidth"; //$NON-NLS-1$ Line 88: private static final String MAX_WIDTH = "maxWidth"; //$NON-NLS-1$ Line 95: private final FlowPanel contentPanel; Line 96: Line 97: // List of action buttons managed by this action panel Line 98: private final List<ActionButtonDefinition<T>> actionButtonList = new ArrayList<ActionButtonDefinition<T>>(); Line 99: // List of buttons in the tool-bar. Please be more specific what tool-bar means.. looks similar to actionButtonList but seems this one is for the purpose of a dropdown menu containing "cascaded" action buttons? (Why not use actionButtonList instead?) Line 100: private final List<ActionButtonDefinition<T>> actionToolbarButtonList = new ArrayList<ActionButtonDefinition<T>>(); Line 101: Line 102: private final SearchableModelProvider<T, ?> dataProvider; Line 103: private final EventBus eventBus; Line 140: * Constructor. Line 141: * @param modelProvider The data provider. Line 142: * @param gwtEventBus The GWT event bus. Line 143: */ Line 144: public AbstractActionPanel(SearchableModelProvider<T, ?> modelProvider, EventBus gwtEventBus) { While I'm not strictly against it, I wonder what's the advantage of not using convention: this.something = something; simply because when constructor parameter names and field names are the same, it naturally drives you towards using "this.something" which makes code more readable. Otherwise, you could write code like this: dataProvider = modelProvider; // this.dataProvider which is less readable in my opinion. Line 145: this.dataProvider = modelProvider; Line 146: this.eventBus = gwtEventBus; Line 147: contextPopupPanel = new PopupPanel(true); Line 148: contextMenuBar = new MenuBar(true); Line 190: } Line 191: initializeCascadeMenuPanel(); Line 192: } Line 193: }); Line 194: resizeHandlerRegistration = Window.addResizeHandler(new ResizeHandler() { (Same question as in ScrollableTabBarPresenterWidget.java) Can you please clarify why the Window resize handler isn't needed after first HeaderOffsetChangeEvent gets fired and handled here? Line 195: @Override Line 196: public void onResize(ResizeEvent resizeEvent) { Line 197: initializeCascadeMenuPanel(); Line 198: } Line 239: boolean foundEdge = false; Line 240: if (contentPanel.getWidgetCount() > 1) { Line 241: for (int i = 0; i < contentPanel.getWidgetCount() - 1; i++) { Line 242: Widget widget = contentPanel.getWidget(i); Line 243: widget.setVisible(true); //temporarily show the widget, so we get the actual width of the widget. Compared to calculateWidgetMinWidthNeeded method, this method doesn't reset widget's visibility to its original value, won't this cause problems? (Action buttons which are hidden due to not being accessible at time when this logic executes suddenly become visible.) Line 244: if (foundEdge || (widgetWidth + widget.getOffsetWidth() > currentWidth)) { Line 245: widget.setVisible(false); Line 246: actionToolbarButtonList.get(i).setCascaded(true); Line 247: foundEdge = true; Line 298: // Add the button to the action panel Line 299: if (buttonDef.getCommandLocation().equals(CommandLocation.ContextAndToolBar) Line 300: || buttonDef.getCommandLocation().equals(CommandLocation.OnlyFromToolBar)) { Line 301: copyStyleToCascadeButton(newActionButton); Line 302: contentPanel.insert(newActionButton.asWidget(), contentPanel.getWidgetCount() - 1); I assume the -1 relates to cascadeButton being inserted in initWidget method, i.e. add action button before cascadeButton? Line 303: actionToolbarButtonList.add(buttonDef); Line 304: } Line 305: Line 306: // Add the button to the context menu Line 361: * Calculate the width of all the sibling widgets to this widget (this is for the case where there are extra Line 362: * buttons and other things on the same row).<br /> Line 363: * <br /> Line 364: * <b>NOTE</b> This calculation breaks down if the siblings have left or/and right margins. The reported width Line 365: * is inaccurate if margins exist. Can it happen in practice that CSS margins are set on sibling elements? Line 366: * @return The total width of all the sibling widgets in pixels. Line 367: */ Line 368: private int calculateSiblingWidth() { Line 369: int width = 0; Line 367: */ Line 368: private int calculateSiblingWidth() { Line 369: int width = 0; Line 370: Widget parent = actionPanel.getParent(); Line 371: if (parent != null && parent instanceof HasWidgets) { The null check isn't really necessary: something instanceof HasWidgets is false when something is null. Line 372: Iterator<Widget> widgetIterator = ((HasWidgets) parent).iterator(); Line 373: while (widgetIterator.hasNext()) { Line 374: Widget widget = widgetIterator.next(); Line 375: if (widget != actionPanel) { Line 411: String styleString = ((Widget) newActionButton).getStyleName(); Line 412: if (styleString != null) { Line 413: String[] stylesArray = styleString.split(" "); //$NON-NLS-1$ Line 414: for (String singleStyle : stylesArray) { Line 415: if (!singleStyle.startsWith(GWT_PREFIX)) { Hm, why is it necessary to copy non-gwt-... style names into cascadeButton's style? Can't we just modify cascadeButton's CSS to override relevant styling? Line 416: cascadeButton.addStyleName(singleStyle); Line 417: } Line 418: } Line 419: } Line 583: * @param buttonDef The {@code ActionButtonDefinition} used to determine the new state of the button. Line 584: */ Line 585: void updateActionButton(ActionButton button, ActionButtonDefinition<T> buttonDef) { Line 586: button.asWidget().setVisible(buttonDef.isAccessible(getSelectedItems()) Line 587: && buttonDef.isVisible(getSelectedItems()) && !buttonDef.isCascaded()); This indicates that updateActionButton is called also on actionToolbarButtonList, aside from calling it on actionButtonList.. Given the ActionButtonDefinition contains is/set cascaded methods, why do we need both actionButtonList + actionToolbarButtonList? (same question like above) Line 588: button.setEnabled(buttonDef.isEnabled(getSelectedItems())); Line 589: button.setTitle(buttonDef.getButtonToolTip() != null ? buttonDef.getButtonToolTip() : buttonDef.getTitle()); Line 590: } Line 591: .................................................... File frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/tab/AbstractHeadlessTabPanel.java Line 16: this.tabWidgetHandler = tabWidgetHandler; Line 17: } Line 18: Line 19: @Override Line 20: public void addTabWidget(IsWidget tabWidget, int index) { +1 to replacing Widget with IsWidget in interface method signatures. Line 21: if (tabWidgetHandler != null) { Line 22: tabWidgetHandler.addTabWidget(tabWidget, index); Line 23: } Line 24: } .................................................... File frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/tab/ModelBoundTab.java Line 13: import com.google.gwt.event.shared.GwtEvent; Line 14: import com.google.gwt.event.shared.HasHandlers; Line 15: Line 16: public class ModelBoundTab extends SimpleTab implements HasHandlers { Line 17: final EventBus eventBus; Consider marking this field private. Line 18: Line 19: public ModelBoundTab(final ModelBoundTabData tabData, AbstractTabPanel tabPanel, EventBus eventBus) { Line 20: super(tabData, tabPanel); Line 21: setAlign(tabData.getAlign()); Line 47: // Update tab accessibility when 'IsAvailable' property changes Line 48: if ("IsAvailable".equals(pcArgs.propertyName)) { //$NON-NLS-1$ Line 49: boolean isAvailable = modelProvider.getModel().getIsAvailable(); Line 50: setAccessible(isAvailable); Line 51: TabAccessibleChangeEvent.fire(ModelBoundTab.this, ModelBoundTab.this); Shouldn't we fire TabAccessibleChangeEvent on each setAccessible call, i.e. not only in this particular case but also on other places calling setAccessible method? Line 52: } Line 53: } Line 54: }); Line 55: } .................................................... File frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/tab/RepeatingPushButton.java Line 2: Line 3: import com.google.gwt.user.client.Timer; Line 4: import com.google.gwt.user.client.ui.PushButton; Line 5: Line 6: public class RepeatingPushButton extends PushButton { I see that RepeatingPushButton is used to implement left & right scroll buttons in ScrollableTabBarView, can you please clarify the motivation for implementing RepeatingPushButton and add some Javadoc? Line 7: /** Line 8: * The repeating period, in milliseconds. Line 9: */ Line 10: private int period; Line 16: /** Line 17: * The constructor Line 18: */ Line 19: public RepeatingPushButton() { Line 20: super(); Explicit call to super can be omitted here [1], it's basically a matter of coding style. [1] http://stackoverflow.com/questions/2712971/do-you-put-a-super-call-a-the-beginning-of-your-constructors Line 21: timer = new Timer() { Line 22: @Override Line 23: public void run() { Line 24: RepeatingPushButton.super.onClick(); .................................................... File frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/presenter/AbstractSubTabPanelPresenter.java Line 23: * @param <P> Line 24: * Proxy type. Line 25: */ Line 26: public abstract class AbstractSubTabPanelPresenter<V extends TabView, P extends Proxy<?>> Line 27: extends TabContainerPresenter<V, P> implements TabWidgetHandler { +1 for extracting common sub tab Presenter stuff in UserPortal. Line 28: Line 29: @ContentSlot Line 30: public static final Type<RevealContentHandler<?>> TYPE_SetTabBar = new Type<RevealContentHandler<?>>(); Line 31: .................................................... File frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/presenter/tab/extended/template/ExtendedTemplateSubTabPanelPresenter.java Line 26: @ProxyCodeSplit Line 27: public interface ProxyDef extends Proxy<ExtendedTemplateSubTabPanelPresenter> { Line 28: } Line 29: Line 30: public interface ViewDef extends TabView, HasUiHandlers<TabWidgetHandler> { Suggestion - add ViewDef in AbstractSubTabPanelPresenter & make it extend HasUiHandlers<TabWidgetHandler> AbstractSubTabPanelPresenter.java: public abstract class AbstractSubTabPanelPresenter<V extends AbstractSubTabPanelPresenter.ViewDef, P extends Proxy<?>> extends TabContainerPresenter<V, P> implements TabWidgetHandler { public interface ViewDef extends TabView, HasUiHandlers<TabWidgetHandler> { } ... } ViewDefs of specific Presenters (like ExtendedTemplateSubTabPanelPresenter.ViewDef) can now just extend parent Presenter's ViewDef: public interface ViewDef extends AbstractSubTabPanelPresenter.ViewDef { } This way, code like this: getView().setUiHandlers(tabBar); can be placed right into AbstractSubTabPanelPresenter's constructor, reducing necessary code for Presenter subclasses. Line 31: } Line 32: Line 33: @RequestTabs Line 34: public static final Type<RequestTabsHandler> TYPE_RequestTabs = new Type<RequestTabsHandler>(); .................................................... File frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/presenter/tab/extended/vm/ExtendedVmSubTabPanelPresenter.java Line 25: @ProxyCodeSplit Line 26: public interface ProxyDef extends Proxy<ExtendedVmSubTabPanelPresenter> { Line 27: } Line 28: Line 29: public interface ViewDef extends TabView, HasUiHandlers<TabWidgetHandler> { See my suggestion in ExtendedTemplateSubTabPanelPresenter.java regarding ViewDef improvement. Line 30: } Line 31: Line 32: @RequestTabs Line 33: public static final Type<RequestTabsHandler> TYPE_RequestTabs = new Type<RequestTabsHandler>(); .................................................... File frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/view/AbstractSubTabPanelView.java Line 11: Line 12: public abstract class AbstractSubTabPanelView extends AbstractTabPanelView implements HasUiHandlers<TabWidgetHandler> { Line 13: Line 14: protected void setTabBar(IsWidget content) { Line 15: ((SimpleTabPanel) getTabPanel()).setTabBar(content); I think that "instanceof" would be safer alternative vs. unconditional cast. Regardless, if this class is meant to work with SimpleTabPanel (specific tab panel implementation directly), you can always tighten getTabPanel() method contract: @Override protected abstract SimpleTabPanel getTabPanel(); You can then use tightened getTabPanel method to return SimpleTabPanel directly. Even better, you can push methods like setTabBar + setUiHandlers into AbstractTabPanel and make SimpleTabPanel implement these methods (which is already the case, if I'm not mistaken). Line 16: } Line 17: Line 18: @Override Line 19: public void setInSlot(Object slot, IsWidget content) { .................................................... File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/tab/cluster/ClusterSubTabPanelPresenter.java Line 24: @ProxyCodeSplit Line 25: public interface ProxyDef extends Proxy<ClusterSubTabPanelPresenter> { Line 26: } Line 27: Line 28: public interface ViewDef extends TabView, DynamicTabPanel, HasUiHandlers<TabWidgetHandler> { See my suggestion in ExtendedTemplateSubTabPanelPresenter.java regarding ViewDef improvement. Line 29: } Line 30: Line 31: @RequestTabs Line 32: public static final Type<RequestTabsHandler> TYPE_RequestTabs = new Type<RequestTabsHandler>(); .................................................... File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/tab/datacenter/DataCenterSubTabPanelPresenter.java Line 24: @ProxyCodeSplit Line 25: public interface ProxyDef extends Proxy<DataCenterSubTabPanelPresenter> { Line 26: } Line 27: Line 28: public interface ViewDef extends TabView, DynamicTabPanel, HasUiHandlers<TabWidgetHandler> { See my suggestion in ExtendedTemplateSubTabPanelPresenter.java regarding ViewDef improvement. Line 29: } Line 30: Line 31: @RequestTabs Line 32: public static final Type<RequestTabsHandler> TYPE_RequestTabs = new Type<RequestTabsHandler>(); .................................................... File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/tab/disk/DiskSubTabPanelPresenter.java Line 24: @ProxyCodeSplit Line 25: public interface ProxyDef extends Proxy<DiskSubTabPanelPresenter> { Line 26: } Line 27: Line 28: public interface ViewDef extends TabView, DynamicTabPanel, HasUiHandlers<TabWidgetHandler> { See my suggestion in ExtendedTemplateSubTabPanelPresenter.java regarding ViewDef improvement. Line 29: } Line 30: Line 31: @RequestTabs Line 32: public static final Type<RequestTabsHandler> TYPE_RequestTabs = new Type<RequestTabsHandler>(); .................................................... File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/tab/gluster/VolumeSubTabPanelPresenter.java Line 24: @ProxyCodeSplit Line 25: public interface ProxyDef extends Proxy<VolumeSubTabPanelPresenter> { Line 26: } Line 27: Line 28: public interface ViewDef extends TabView, DynamicTabPanel, HasUiHandlers<TabWidgetHandler> { See my suggestion in ExtendedTemplateSubTabPanelPresenter.java regarding ViewDef improvement. Line 29: } Line 30: Line 31: @RequestTabs Line 32: public static final Type<RequestTabsHandler> TYPE_RequestTabs = new Type<RequestTabsHandler>(); .................................................... File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/tab/host/HostSubTabPanelPresenter.java Line 24: @ProxyCodeSplit Line 25: public interface ProxyDef extends Proxy<HostSubTabPanelPresenter> { Line 26: } Line 27: Line 28: public interface ViewDef extends TabView, DynamicTabPanel, HasUiHandlers<TabWidgetHandler> { See my suggestion in ExtendedTemplateSubTabPanelPresenter.java regarding ViewDef improvement. Line 29: } Line 30: Line 31: @RequestTabs Line 32: public static final Type<RequestTabsHandler> TYPE_RequestTabs = new Type<RequestTabsHandler>(); .................................................... File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/tab/network/NetworkSubTabPanelPresenter.java Line 24: @ProxyCodeSplit Line 25: public interface ProxyDef extends Proxy<NetworkSubTabPanelPresenter> { Line 26: } Line 27: Line 28: public interface ViewDef extends TabView, DynamicTabPanel, HasUiHandlers<TabWidgetHandler> { See my suggestion in ExtendedTemplateSubTabPanelPresenter.java regarding ViewDef improvement. Line 29: } Line 30: Line 31: @RequestTabs Line 32: public static final Type<RequestTabsHandler> TYPE_RequestTabs = new Type<RequestTabsHandler>(); .................................................... File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/tab/pool/PoolSubTabPanelPresenter.java Line 24: @ProxyCodeSplit Line 25: public interface ProxyDef extends Proxy<PoolSubTabPanelPresenter> { Line 26: } Line 27: Line 28: public interface ViewDef extends TabView, DynamicTabPanel, HasUiHandlers<TabWidgetHandler> { See my suggestion in ExtendedTemplateSubTabPanelPresenter.java regarding ViewDef improvement. Line 29: } Line 30: Line 31: @RequestTabs Line 32: public static final Type<RequestTabsHandler> TYPE_RequestTabs = new Type<RequestTabsHandler>(); .................................................... File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/tab/profile/VnicProfileSubTabPanelPresenter.java Line 24: @ProxyCodeSplit Line 25: public interface ProxyDef extends Proxy<VnicProfileSubTabPanelPresenter> { Line 26: } Line 27: Line 28: public interface ViewDef extends TabView, DynamicTabPanel, HasUiHandlers<TabWidgetHandler> { See my suggestion in ExtendedTemplateSubTabPanelPresenter.java regarding ViewDef improvement. Line 29: } Line 30: Line 31: @RequestTabs Line 32: public static final Type<RequestTabsHandler> TYPE_RequestTabs = new Type<RequestTabsHandler>(); .................................................... File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/tab/provider/ProviderSubTabPanelPresenter.java Line 24: @ProxyCodeSplit Line 25: public interface ProxyDef extends Proxy<ProviderSubTabPanelPresenter> { Line 26: } Line 27: Line 28: public interface ViewDef extends TabView, DynamicTabPanel, HasUiHandlers<TabWidgetHandler> { See my suggestion in ExtendedTemplateSubTabPanelPresenter.java regarding ViewDef improvement. Line 29: } Line 30: Line 31: @RequestTabs Line 32: public static final Type<RequestTabsHandler> TYPE_RequestTabs = new Type<RequestTabsHandler>(); .................................................... File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/tab/quota/QuotaSubTabPanelPresenter.java Line 24: @ProxyCodeSplit Line 25: public interface ProxyDef extends Proxy<QuotaSubTabPanelPresenter> { Line 26: } Line 27: Line 28: public interface ViewDef extends TabView, DynamicTabPanel, HasUiHandlers<TabWidgetHandler> { See my suggestion in ExtendedTemplateSubTabPanelPresenter.java regarding ViewDef improvement. Line 29: } Line 30: Line 31: @RequestTabs Line 32: public static final Type<RequestTabsHandler> TYPE_RequestTabs = new Type<RequestTabsHandler>(); .................................................... File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/tab/storage/StorageSubTabPanelPresenter.java Line 24: @ProxyCodeSplit Line 25: public interface ProxyDef extends Proxy<StorageSubTabPanelPresenter> { Line 26: } Line 27: Line 28: public interface ViewDef extends TabView, DynamicTabPanel, HasUiHandlers<TabWidgetHandler> { See my suggestion in ExtendedTemplateSubTabPanelPresenter.java regarding ViewDef improvement. Line 29: } Line 30: Line 31: @RequestTabs Line 32: public static final Type<RequestTabsHandler> TYPE_RequestTabs = new Type<RequestTabsHandler>(); .................................................... File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/tab/template/TemplateSubTabPanelPresenter.java Line 24: @ProxyCodeSplit Line 25: public interface ProxyDef extends Proxy<TemplateSubTabPanelPresenter> { Line 26: } Line 27: Line 28: public interface ViewDef extends TabView, DynamicTabPanel, HasUiHandlers<TabWidgetHandler> { See my suggestion in ExtendedTemplateSubTabPanelPresenter.java regarding ViewDef improvement. Line 29: } Line 30: Line 31: @RequestTabs Line 32: public static final Type<RequestTabsHandler> TYPE_RequestTabs = new Type<RequestTabsHandler>(); .................................................... File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/tab/user/UserSubTabPanelPresenter.java Line 24: @ProxyCodeSplit Line 25: public interface ProxyDef extends Proxy<UserSubTabPanelPresenter> { Line 26: } Line 27: Line 28: public interface ViewDef extends TabView, DynamicTabPanel, HasUiHandlers<TabWidgetHandler> { See my suggestion in ExtendedTemplateSubTabPanelPresenter.java regarding ViewDef improvement. Line 29: } Line 30: Line 31: @RequestTabs Line 32: public static final Type<RequestTabsHandler> TYPE_RequestTabs = new Type<RequestTabsHandler>(); .................................................... File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/tab/virtualMachine/VirtualMachineSubTabPanelPresenter.java Line 24: @ProxyCodeSplit Line 25: public interface ProxyDef extends Proxy<VirtualMachineSubTabPanelPresenter> { Line 26: } Line 27: Line 28: public interface ViewDef extends TabView, DynamicTabPanel, HasUiHandlers<TabWidgetHandler> { See my suggestion in ExtendedTemplateSubTabPanelPresenter.java regarding ViewDef improvement. Line 29: } Line 30: Line 31: @RequestTabs Line 32: public static final Type<RequestTabsHandler> TYPE_RequestTabs = new Type<RequestTabsHandler>(); .................................................... File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/AbstractSubTabPanelView.java Line 11: Line 12: public abstract class AbstractSubTabPanelView extends AbstractTabPanelView implements HasUiHandlers<TabWidgetHandler> { Line 13: Line 14: protected void setTabBar(IsWidget content) { Line 15: ((SimpleTabPanel) getTabPanel()).setTabBar(content); See my comment in UserPortal's AbstractSubTabPanelView.java Line 16: } Line 17: Line 18: @Override Line 19: public void setInSlot(Object slot, IsWidget content) { -- To view, visit http://gerrit.ovirt.org/21716 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I63dddb3c0026ea3a5c13c3d18daebd02e13b1043 Gerrit-PatchSet: 9 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alexander Wels <aw...@redhat.com> Gerrit-Reviewer: Alexander Wels <aw...@redhat.com> Gerrit-Reviewer: Einav Cohen <eco...@redhat.com> Gerrit-Reviewer: Greg Sheremeta <gsher...@redhat.com> Gerrit-Reviewer: Vojtech Szocs <vsz...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches