Java 类com.google.gwt.user.client.ui.SimplePanel 实例源码

项目:errai-spring-boot-sample    文件:App.java   
@AfterInitialization
public void afterInitialization() {
    authenticationServiceCaller.call(new RemoteCallback<User>() {
        @Override
        public void callback(User user) {
            Label userLabel = new Label(
                    "User logged in: username=" + user.getIdentifier() + ", roles=" + user.getRoles());
            RootPanel.get().add(userLabel);
            SimplePanel panel = new SimplePanel();
            Anchor logoutLink = new Anchor("Spring Security Logout URL", GWT.getHostPageBaseURL() + "logout");
            panel.add(logoutLink);
            RootPanel.get().add(panel);
            initBtns();
        }
    }).getUser();
}
项目:EasyML    文件:SaveDatasetPanel.java   
@Override
protected void init(){
    grid = new DescribeGrid(labarr, "data");
    verticalPanel.add(grid);
    grid.addStyleName("bda-descgrid-savedata");
    savebtn.setStyleName("bda-descgrid-savedata-submitbtn");
    SimplePanel simPanel = new SimplePanel();
    simPanel.add( savebtn );
    simPanel.setStyleName("bda-descgrid-savedata-simpanel");
    verticalPanel.add(simPanel);
    savebtn.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            dbController.submitSaveDataset2DB(panel,SaveDatasetPanel.this, dataset,grid);
        }
    });
}
项目:appinventor-extensions    文件:MockBall.java   
/**
 * Creates a new MockBall component.
 *
 * @param editor  editor of source file the component belongs to
 */
public MockBall(SimpleEditor editor) {
  super(editor, TYPE, images.ball());

  // Initialize mock ball UI
  ballWidget = new SimplePanel();
  ballWidget.setStylePrimaryName("ode-SimpleMockComponent");

  // Create an appropriately sized ball
  canvas = new GWTCanvas(diameter, diameter);
  canvas.setPixelSize(diameter, diameter);
  canvas.setBackgroundColor(GWTCanvas.TRANSPARENT);
  fillCircle();
  ballWidget.setWidget(canvas);

  initComponent(ballWidget);
}
项目:WebConsole    文件:SliderComponent.java   
public Thumb() {
    visibleThumb = new SimplePanel();
    Element visibleElem = visibleThumb.getElement();
    Element touchElem = getElement();

    visibleThumb.setStylePrimaryName(THUMB_CLASS_NAME);

    BrowserUtils.setStyleAttributeAllBrowsers(visibleElem, "boxSizing", "border-box");
    BrowserUtils.setStyleAttributeAllBrowsers(touchElem, "boxSizing", "border-box");

    this.setWidget(visibleThumb);

    if (!isPassive)
    {
        visibleThumb.addStyleName(INTERACTIVE_CLASS_NAME);
    }
}
项目:cuba    文件:EscKeyDownHandler.java   
@Override
public void onKeyDown(KeyDownEvent keyDownEvent) {

    if (keyDownEvent.getNativeKeyCode() == KeyCodes.KEY_ESCAPE) {

        SimplePanel panel = WidgetUtil.findWidget(WidgetUtil.getFocusedElement(), SimplePanel.class);

        if (panel != null) {
            WidgetUtil.focus(panel.getParent().getElement());

            // prevent further bubbling of the event as it has only
            // navigational purpose if thrown at this depth. A subsequent
            // press of ESC is not stopped, so ESC abort actions of the
            // application should work as soon as the focus is in
            // "navigational mode" on a grid-cell
            keyDownEvent.preventDefault();
            keyDownEvent.stopPropagation();
        }
    }
}
项目:cuba    文件:ComponentRenderer.java   
@Override
public void render(RendererCellReference rendererCellReference, final ComponentConnector componentConnector,
                   final SimplePanel panel) {
    if (componentConnector != null) {

        // render chart widgets deferred so measurements are correct. Do not render
        // normal component widgets deferred as it causes some flicker when rerendering the grid
        if (componentConnector.getClass().getName().equals("com.vaadin.addon.charts.shared.ChartConnector")) {
            Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
                @Override
                public void execute() {
                    panel.setWidget(componentConnector.getWidget());
                }
            });
        } else {
            panel.setWidget(componentConnector.getWidget());
        }
    } else {
        panel.clear();
    }
}
项目:cuba    文件:CubaWidgetsTreeWidget.java   
public void setNodeWidget(Widget nodeWidget) {
    this.nodeWidget = nodeWidget;

    addStyleName(CLASSNAME);

    nodeCaptionDiv = DOM.createDiv();
    nodeCaptionDiv.setPropertyString("className", CLASSNAME + "-caption");

    Element wrapper = DOM.createDiv();
    nodeCaptionSpan = DOM.createSpan();
    DOM.appendChild(getElement(), nodeCaptionDiv);
    DOM.appendChild(nodeCaptionDiv, wrapper);
    DOM.appendChild(wrapper, nodeCaptionSpan);

    if (BrowserInfo.get().isOpera()) {
        /*
         * Focus the caption div of the node to get keyboard navigation
         * to work without scrolling up or down when focusing a node.
         */
        nodeCaptionDiv.setTabIndex(-1);
    }

    FlowPanel nodeContent = new FlowPanel();
    nodeContent.setStylePrimaryName(CLASSNAME + "-content");
    setWidget(nodeContent);

    nodeWidgetRoot = new SimplePanel();
    nodeWidgetRoot.setStylePrimaryName(CLASSNAME + "-widget");
    nodeWidgetRoot.setWidget(nodeWidget);
    nodeContent.add(nodeWidgetRoot);

    childNodeContainer = new FlowPanel();
    childNodeContainer.setStyleName(CLASSNAME + "-children");
    nodeContent.add(childNodeContainer);
}
项目:che    文件:NotificationPopup.java   
/**
 * Create icon wrapper that contains an icon.
 *
 * @return {@link SimplePanel} as icon wrapper
 */
private SimplePanel createIconWidget() {
  SimplePanel iconWrapper = new SimplePanel();
  iconWrapper.setStyleName(resources.notificationCss().notificationPopupIconWrapper());
  iconWrapper.ensureDebugId(ICON_DBG_ID + notification.getId());
  return iconWrapper;
}
项目:che    文件:NotificationContainerItem.java   
/**
 * Create close icon widget that contains an close notification icon.
 *
 * @return {@link SimplePanel} as close icon wrapper
 */
private SimplePanel createCloseWidget() {
  SimplePanel closeWrapper = new SimplePanel();
  SVGImage closeImage = new SVGImage(resources.closeIcon());
  closeImage.addClickHandler(
      new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
          delegate.onClose(notification);
        }
      });
  closeWrapper.add(closeImage);
  closeWrapper.setStyleName(resources.notificationCss().notificationCloseButtonWrapper());
  closeImage.ensureDebugId(CLOSE_ICON_DBG_ID + notification.getId());
  return closeWrapper;
}
项目:componentrenderer    文件:ComponentRenderer.java   
@Override
public void render(RendererCellReference rendererCellReference, final ComponentConnector componentConnector,
                   final SimplePanel panel)
{
    if (componentConnector != null) {

        // render chart widgets deferred so measurements are correct. Do not render
        // normal component widgets deferred as it causes some flicker when rerendering the grid
        if (componentConnector.getClass().getName().equals("com.vaadin.addon.charts.shared.ChartConnector")) {
            Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
                @Override
                public void execute() {
                    panel.setWidget(componentConnector.getWidget());
                }
            });
        } else {
            panel.setWidget(componentConnector.getWidget());
        }
    } else {
        panel.clear();
    }
}
项目:riscoss-corporate    文件:RolePropertyPage.java   
public RolePropertyPage() {
    HorizontalPanel toolbar = new HorizontalPanel();
    toolbar.add( new Button( "Add User", new ClickHandler() {
        @Override
        public void onClick( ClickEvent event ) {
            onNewUserClicked();
        }
    } ) );

    userList = new UserList("");

    DockPanel dock = new DockPanel();
    dock.add( toolbar,DockPanel.NORTH );
    dock.add( userList, DockPanel.CENTER );

    tabPanel.add( new SimplePanel(), "Role Properties" );
    tabPanel.add( dock, "Users" );

    panel.setWidget( tabPanel );
}
项目:riscoss-corporate    文件:ComparisonPanel.java   
protected void generateLegend(int i, String ras) {
    String c = "col" + i;
    HTMLPanel html = new HTMLPanel("<span id='" + c + "'></span>");
    SimplePanel p = new SimplePanel();
    p.setSize("20px", "20px");
    p.getElement().getStyle().setBackgroundColor(colorsArray[i]);
    p.setStyleName("colorBox");
    HorizontalPanel hp = new HorizontalPanel();
    hp.setStyleName("margin-bottom");
    hp.add(p);
    String htmlString = "<b>" + ras + "</b>";
    HTMLPanel htm = new HTMLPanel( htmlString );
    hp.add(htm);
    html.add(hp, c);
    legend.add(html);
}
项目:riscoss-corporate    文件:ComparisonPanel.java   
protected Widget generateIndicatorWidget(JSONObject v) {
    VerticalPanel panel = new VerticalPanel();
    GaugeImage img = new GaugeImage();
    img.setEvidence( v.get( "p" ).isString().stringValue(), v.get( "m" ).isString().stringValue() );
    SimplePanel pp = new SimplePanel();
    pp.setWidget(img);
    pp.setStyleName("contentResultsTable");
    panel.add(pp);
    panel.add( new HTML( 
            "Exposure: <font color='red'>" + 
                    v.get( "e" ).isObject().get( "e" ).isNumber().doubleValue() +
            "</font>") );
    panel.setStyleName("headerTable");
    panel.setHeight("100%");
    return panel;
}
项目:firefly    文件:DummyInventoryUI.java   
public Widget makeUI() {
    final SimplePanel panel = new SimplePanel();
    GwtUtil.setStyle(panel, "lineHeight", "100px");

    UserServices.App.getInstance().getMissionConfig("planck", new BaseCallback() {
        @Override
        public void doSuccess(Object result) {
            MissionTag dt = (MissionTag) result;
            List<ImageSetTag> iltag = dt.getImagesetList();
            if (iltag.size() > 0) {
                FormTag ftag = iltag.get(0).getForm();
                Form form = GwtUtil.createSearchForm(ftag, null, null);
                form.setStyleName("shadow");
                panel.add(form);
            }
        }
    });

    return GwtUtil.wrap(panel, 50, 50, 50, 20);
}
项目:firefly    文件:LSSTCatalogSearchUI.java   
public Widget makeUI() {
    spacialArea= new SpacialSelectUI(new SpacialSelectUI.TabChange() {
                public void onTabChange() {
                    adjustSpacialHeight();
                }
            });
    spacialArea.setSpacialOptions(new HashSet<SpacialType>(Arrays.asList(SpacialType.Cone, SpacialType.Box)), DataSetInfo.DataTypes.CATALOGS);
    spacialArea.updateSearchMax(3600);
    mainPanel.setSize("100%", "100%");

    topArea= new DockLayoutPanel(Style.Unit.PX);
    Widget spacialAreaWrap= new SimplePanel(spacialArea);
    topArea.add(spacialAreaWrap);
    mainPanel.addNorth(topArea, spacialArea.getHeightRequired());
    DOM.getParent(topArea.getElement()).addClassName("change-height-transition");
    return mainPanel;
}
项目:firefly    文件:SearchPanel.java   
private void layout() {

        formPanel.clear();
        navPanel.clear();

        if (lists.size()==1 && lists.get(0).getWidgetCount()==1) {
            navPanel.setVisible(false);
            if (navPanel.getParent() instanceof DockPanel) {
                DockPanel dp = (DockPanel)navPanel.getParent();
                dp.remove(navPanel);
            }
        }
        else {
            for (int i = 0; i < lists.size(); i++) {
                if (i != 0) {
                    SimplePanel spacer = new SimplePanel();
                    spacer.setPixelSize(1,10);
                    navPanel.add(spacer);
                }
                LinksPanel.ULList l = lists.get(i);
                if (l != null) {
                    navPanel.add(l);
                }
            }
        }        
    }
项目:firefly    文件:Toolbar.java   
public CmdButton(String name, Widget icon, Command cmd, String label, String desc) {
    this.name = name;
    this.command = cmd;
    this.name = name;
    String htmlstr = label == null ? name : label;
    html = new HTML(htmlstr);
    if (desc != null) {
        html.setTitle(desc);
    }
    this.command = cmd;
    html.setWordWrap(false);
    if (command instanceof GeneralCommand) {
        addListeners();
        setButtonEnabled(((GeneralCommand)command).isEnabled());
    }

    GwtUtil.setStyles(iconHolderLeft, "padding", "none", "marginRight", "3px");
    GwtUtil.setStyle(html, "padding", "6px 0");
    container = GwtUtil.makeHoriPanel(null, null, iconHolderLeft, html, iconHolderRight);
    container.setCellVerticalAlignment(iconHolderLeft, VerticalPanel.ALIGN_MIDDLE);
    container.setCellVerticalAlignment(iconHolderRight, VerticalPanel.ALIGN_MIDDLE);
    setIconLeft(icon);
    setIconRight(null);
    GwtUtil.setStyle(container, "margin", "0px auto");
    initWidget(new SimplePanel(container));
}
项目:firefly    文件:XYPlotJSInterface.java   
public static void addXYPlot(JscriptRequest jspr, String div) {
    Map<String,String> paramMap= jspr.asMap();
    WidgetFactory factory= Application.getInstance().getWidgetFactory();
    TablePreview xyPrev= factory.createObserverUI(WidgetFactory.XYPLOT,paramMap);
    xyPrev.bind(FFToolEnv.getHub());

    SimplePanel panel= makeCenter();
    panel.add(xyPrev.getDisplay());
    FFToolEnv.addToPanel(div, panel, "XY Plot");

    if (xyPrev.getDisplay() instanceof RequiresResize) {
        final RequiresResize resizer= (RequiresResize)xyPrev.getDisplay();
        Window.addResizeHandler(new ResizeHandler() {
            public void onResize(ResizeEvent event) {
                resizer.onResize();
            }
        });
    }
}
项目:firefly    文件:MiniPlotWidget.java   
public Panel makeFixedSizeContainer(int width, int height, boolean decorated) {

        SimplePanel panel= new SimplePanel();
        panel.setWidget(this);
        panel.setPixelSize(width,height);

        Panel retval= panel;

        if (decorated) {
            DecoratorPanel dp= new DecoratorPanel();
            dp.setWidget(panel);
            retval= dp;
        }
        return retval;

    }
项目:appinventor-extensions    文件:TopToolbar.java   
@Override
public void execute() {
  final DialogBox db = new DialogBox(false, true);
  db.setText("About MIT App Inventor");
  db.setStyleName("ode-DialogBox");
  db.setHeight("200px");
  db.setWidth("400px");
  db.setGlassEnabled(true);
  db.setAnimationEnabled(true);
  db.center();

  VerticalPanel DialogBoxContents = new VerticalPanel();
  String html = MESSAGES.gitBuildId(GitBuildId.getDate(), GitBuildId.getVersion()) +
      "<BR/>Use Companion: " + BlocklyPanel.getCompVersion();
  Config config = Ode.getInstance().getSystemConfig();
  String releaseNotesUrl = config.getReleaseNotesUrl();
  if (!Strings.isNullOrEmpty(releaseNotesUrl)) {
    html += "<BR/><BR/>Please see <a href=\"" + releaseNotesUrl +
        "\" target=\"_blank\">release notes</a>";
  }
  String tosUrl = config.getTosUrl();
  if (!Strings.isNullOrEmpty(tosUrl)) {
    html += "<BR/><BR/><a href=\"" + tosUrl +
        "\" target=\"_blank\">" + MESSAGES.privacyTermsLink() + "</a>";
  }
  HTML message = new HTML(html);

  SimplePanel holder = new SimplePanel();
  Button ok = new Button("Close");
  ok.addClickListener(new ClickListener() {
    public void onClick(Widget sender) {
      db.hide();
    }
  });
  holder.add(ok);
  DialogBoxContents.add(message);
  DialogBoxContents.add(holder);
  db.setWidget(DialogBoxContents);
  db.show();
}
项目:appinventor-extensions    文件:TopToolbar.java   
@Override
public void execute() {
  final DialogBox db = new DialogBox(false, true);
  db.setText("About The Companion");
  db.setStyleName("ode-DialogBox");
  db.setHeight("200px");
  db.setWidth("400px");
  db.setGlassEnabled(true);
  db.setAnimationEnabled(true);
  db.center();

  String downloadinfo = "";
  if (!YaVersion.COMPANION_UPDATE_URL1.equals("")) {
    String url = "http://" + Window.Location.getHost() + YaVersion.COMPANION_UPDATE_URL1;
    downloadinfo = "<br/>\n<a href=" + url + ">Download URL: " + url + "</a><br/>\n";
    downloadinfo += BlocklyPanel.getQRCode(url);
  }

  VerticalPanel DialogBoxContents = new VerticalPanel();
  HTML message = new HTML(
      "Companion Version " + BlocklyPanel.getCompVersion() + downloadinfo
  );

  SimplePanel holder = new SimplePanel();
  Button ok = new Button("Close");
  ok.addClickListener(new ClickListener() {
    public void onClick(Widget sender) {
      db.hide();
    }
  });
  holder.add(ok);
  DialogBoxContents.add(message);
  DialogBoxContents.add(holder);
  db.setWidget(DialogBoxContents);
  db.show();
}
项目:appinventor-extensions    文件:MockVideoPlayer.java   
/**
 * Creates a new MockVideoPlayer component.
 *
 * @param editor  editor of source file the component belongs to
 */
public MockVideoPlayer(SimpleEditor editor) {
  super(editor, TYPE, images.videoplayer());

  // Initialize mock video UI
  videoPlayerWidget = new SimplePanel();
  videoPlayerWidget.setStylePrimaryName("ode-SimpleMockComponent");
  videoPlayerWidget.setWidget(getIconImage());
  initComponent(videoPlayerWidget);
}
项目:appinventor-extensions    文件:MockWrapper.java   
MockWrapper(SimpleEditor editor, String type, ImageResource icon) {
  super(editor, type, icon);

  // Initialize wrapper UI
  wrapper = new SimplePanel();
  wrapper.setStylePrimaryName("ode-SimpleMockComponent");
}
项目:appinventor-extensions    文件:MockListView.java   
private void createLabelPanel() {
  panelForItem =new SimplePanel();
  panelForItem.setStylePrimaryName("listViewItemStyle");
  panelForItem.setSize(ComponentConstants.LISTVIEW_PREFERRED_WIDTH + "px",
      ComponentConstants.LISTVIEW_PREFERRED_HEIGHT + "px");
  panelForItem.add(labelInItem);
  listViewWidget.add(panelForItem);
}
项目:appinventor-extensions    文件:MockSlider.java   
/**
 * Creates a new MockSlider component.
 *
 * @param editor editor of source file the component belongs to
 */
public MockSlider(SimpleEditor editor) {
  super(editor, TYPE, images.slider());

  // Initialize mock slider UI
  sliderWidget = new SimplePanel();
  sliderWidget.setStylePrimaryName("ode-SimpleMockComponent");

  sliderWidget.setWidget(getIconImage());

  initComponent(sliderWidget);
}
项目:appinventor-extensions    文件:MockWebViewer.java   
/**
 * Creates a new MockWebViewer component.
 *
 * @param editor  editor of source file the component belongs to
 */
public MockWebViewer(SimpleEditor editor) {
  super(editor, TYPE, images.webviewer());

  // Initialize mock WebViewer UI
  SimplePanel webViewerWidget = new SimplePanel();
  webViewerWidget.setStylePrimaryName("ode-SimpleMockContainer");
  // TODO(halabelson): Center vertically as well as horizontally
  webViewerWidget.addStyleDependentName("centerContents");
  webViewerWidget.setWidget(largeImage);
  initComponent(webViewerWidget);
}
项目:WebConsole    文件:ScreenIndicator.java   
public ScreenIndicator(List<Integer> screenIds) {
    super(new HorizontalPanel(), CLASS_NAME);
    HorizontalPanel container = (HorizontalPanel)getWidget();
    DOM.setIntStyleAttribute(getElement(), "zIndex", 1000 );
    DOM.setStyleAttribute(getElement(), "overflow", "hidden");
    container.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    this.screenIds = screenIds;
    screenIndicators = new ArrayList<Widget>();

    if (screenIds != null) {
        width = INDICATOR_SIZE * ((screenIds.size()*2) - 1);
        setWidth(width + "px");
        setHeight(INDICATOR_SIZE + "px");
        height = INDICATOR_SIZE;

        // Add a simple div for each screen
        for (int i=0; i<screenIds.size(); i++) {
            int cellWidth = INDICATOR_SIZE;
            //cellWidth = i != screenIds.size()-1 ? cellWidth + INDICATOR_SPACING : cellWidth;
            Widget screenIndicator = new SimplePanel();
            screenIndicator.setWidth(INDICATOR_SIZE + "px");
            screenIndicator.setHeight(INDICATOR_SIZE + "px");
            screenIndicator.setStylePrimaryName(ITEM_CLASS_NAME);
            screenIndicators.add(screenIndicator);
            container.add(screenIndicator);
            container.setCellWidth(screenIndicator, cellWidth + "px");

            if (i<screenIds.size()-1) {
                // Add a spacer
                Widget spacer = new SimplePanel();
                spacer.setWidth(INDICATOR_SIZE + "px");
                spacer.setHeight(INDICATOR_SIZE + "px");
                spacer.setStylePrimaryName(SPACER_CLASS_NAME);
                container.add(spacer);
                container.setCellWidth(spacer, cellWidth + "px");
            }
        }
    }
}
项目:mentor    文件:Mentor.java   
@Override
public void onModuleLoad() {

    GWT.setUncaughtExceptionHandler(new GWT.UncaughtExceptionHandler() {
        public void onUncaughtException(Throwable e) {
            Log.log(Level.SEVERE, e.getMessage(), e);
            MaterialToast.fireToast("Unknown error, please reload application");
        }
    });

    Theme.bundle(); // inject

    workPanel = new SimplePanel();
    workPanel.setSize("100%", "100%");

    ActivityMapper activityMapper = new MentorActivityMapper();
    ActivityManager activityManager = new ActivityManager(activityMapper, MentorBus.get());
    activityManager.setDisplay(workPanel);

    Element loader = Document.get().getElementById("loader");
    if (loader != null)
        loader.removeFromParent();

    RootPanel.get().add(workPanel, 0, 0);

       Places.handler().handleCurrentHistory(); // goes to the place represented on URL, else default place

}
项目:document-management-system    文件:SearchResult.java   
public SearchResult() {
    sp = new SimplePanel();
    searchCompactResult = new SearchCompactResult();
    searchFullResult = new SearchFullResult();
    sp.add(searchFullResult);

    status = new Status();
    status.setStyleName("okm-StatusPopup");

    initWidget(sp);
}
项目:cuba    文件:FocusPreservingRefreshClientRpcImpl.java   
@Override
public void saveFocus() {
    SimplePanel panel = WidgetUtil.findWidget(WidgetUtil.getFocusedElement(), SimplePanel.class);

    if (panel != null) {
        focus = panel.getParent().getElement();
    }
}
项目:cuba    文件:ComponentRenderer.java   
@Override
public SimplePanel createWidget() {
    final SimplePanel panel = GWT.create(SimplePanel.class);
    panel.getElement().addClassName("cr-component-cell");
    panel.sinkEvents(com.google.gwt.user.client.Event.ONCLICK);
    return panel;
}
项目:x-cure-chat    文件:TextBaseTranslitAndProgressBar.java   
/**
 * Allows to bind and unbind the progress bar from the text box base objects
 * @param bind if true then first unbinds the old object and then binds the new one
 *             if false then just unbinds the old object.
 * @param textObject the new text box base to bind the progress bar with or null for bind==false
 * @param maxObjectCapacity the maximum capacity of the provided text box base or 0 for bind==false
 * @param progressBarPanel the panel that will store the progress bar or null for bind==false
 * @param placeHolder the place holder that will be substituted with the progress bar or null for bind==false
 */
private static void bindProgressBar( final boolean bind, final TextBoxBase textObject,
                                     final int maxObjectCapacity,
                                     final VerticalPanel progressBarPanel,
                                     final SimplePanel placeHolder ) {
    //First remove the old bindings if any
    if( bondedProgressBarPanel != null ) {
        bondedProgressBarPanel.remove( progressBar );
        bondedProgressBarPanel.add( bindedProgBarPlaceHolder );
        bondedProgressBarPanel = null;
        bindedProgBarPlaceHolder = null;
    }

    //Do new bindings
    if( bind ) {
        if( progressBarPanel != null ) {
            progressBarPanel.remove( placeHolder );
            progressBarPanel.add( progressBar );
            /*Remove the panel from the tabulation sequence*/
            progressBar.setTabIndex(-1);
        } 
        bindedProgBarPlaceHolder = placeHolder;
        bondedProgressBarPanel = progressBarPanel;
    }

    //Then bind the new object or finish un-binding the old one
    progressBar.bindProgressBar(bind, textObject, maxObjectCapacity);
}
项目:x-cure-chat    文件:SiteNavigatorElement.java   
/**
 * The site-navigator element is constructed with the following parameters
 * @param imageBaseName the name of the base name of the image that is related to this element
 * @param isOnLogOutDisabled if true then in case the user is logged out this section is disabled
 * @param siteBodyPanel the site's body panel that should store the widget related to this site section
 * @param siteNavigator the instance of the site navigator itself
 * @param forceUserStatus the status to be forced when the user selects this site section
 * decorations into the logged out mode
 * @throws InvocationTargetException 
 * @throws IllegalAccessException 
 * @throws IllegalArgumentException 
 */
protected SiteNavigatorElement( final String imageBaseName, final boolean isOnLogOutDisabled,
                                final SimplePanel siteBodyPanel, final SiteNavigator siteNavigator,
                                final UserStatusType forceUserStatus ) {
    //Store the reference to the site's main vertical panel
    this.siteBodyPanel = siteBodyPanel;
    //Store the reference to the site navigator
    this.siteNavigator = siteNavigator;
    //Store the other properties
    this.isOnLogOutDisabled = isOnLogOutDisabled;
    this.forceUserStatus = forceUserStatus;

    //Set the image urls 
    final String locale = InterfaceUtils.getCurrentLocale();
    selectedImageURL = NAVIGATION_IMAGE_URL_BASE + imageBaseName + "_" + locale + NAVIGATION_IMAGE_FILE_EXT;
    unselectedImageURL = NAVIGATION_IMAGE_URL_BASE + imageBaseName + "_" + locale + NAVIGATION_IMAGE_DISABLED_SUFFIX + NAVIGATION_IMAGE_FILE_EXT;

    //Set the initial image URL, style, and set the click handler
    setNavigatorImage( unselectedImageURL, CommonResourcesContainer.NAVIGATION_IMAGE_ENTRY_STYLE, isSectionAlertOn );
    anchorLink.addStyleName( CommonResourcesContainer.SITE_SECTION_LINK_STYLE );

    //In case of clicking on the anchor we want to set the proper
    //anchor link url because it might not have been set initially
    //due to the  site section not being selected before
    sinkEvents( Event.ONMOUSEUP | Event.ONDBLCLICK | Event.ONCONTEXTMENU );

    //Initialize the composite widget
    initWidget( anchorLink );
}
项目:switchyard    文件:ComponentView.java   
@Override
public Widget createWidget() {
    VerticalPanel wrapper = new VerticalPanel();
    wrapper.setStyleName("fill-layout-width"); //$NON-NLS-1$
    _mainContentPanel = new SimplePanel();
    wrapper.add(_mainContentPanel);

    return wrapper;
}
项目:che    文件:WorkBenchPartControllerImpl.java   
@Inject
public WorkBenchPartControllerImpl(
    @Assisted SplitLayoutPanel splitLayoutPanel, @Assisted SimplePanel widget) {
  this.splitLayoutPanel = splitLayoutPanel;
  this.widget = widget;

  splitLayoutPanel.setWidgetToggleDisplayAllowed(widget, true);
  splitLayoutPanel.setWidgetHidden(widget, true);
  splitLayoutPanel.forceLayout();
}
项目:appformer    文件:JSNativePlugin.java   
protected void buildElement() {
    final String content;
    final String contentUrl;
    if (hasMethod(obj,
                  "templateUrl")) {
        contentUrl = getTemplateUrlFunctionResult(obj);
        content = null;
    } else if (hasMethod(obj,
                         "template")) {
        content = getTemplateFunctionResult(obj);
        contentUrl = null;
    } else if (hasStringProperty(obj,
                                 "templateUrl")) {
        contentUrl = getTemplateUrl(obj);
        content = null;
    } else if (hasStringProperty(obj,
                                 "template")) {
        content = getTemplate(obj);
        contentUrl = null;
    } else {
        content = null;
        contentUrl = null;
    }

    element = new SimplePanel(new Label("Loading")).getElement();
    if (content != null) {
        element = new HTML(new SafeHtmlBuilder().appendHtmlConstant(content).toSafeHtml()).getElement();
    } else if (contentUrl != null) {
        runtimePluginsService.getTemplateContent(contentUrl,
                                                 new ParameterizedCommand<String>() {
                                                     @Override
                                                     public void execute(String parameter) {
                                                         element = new HTML(new SafeHtmlBuilder().appendHtmlConstant(parameter).toSafeHtml()).getElement();
                                                     }
                                                 });
    } else {
        element = null;
    }
}
项目:che    文件:NotificationContainerItem.java   
/**
 * Create message widget that contains notification message.
 *
 * @return {@link SimplePanel} as message wrapper
 */
private SimplePanel createContentWidget() {
  SimplePanel messageWrapper = new SimplePanel();
  Label messageLabel = new Label();
  messageWrapper.add(messageLabel);
  messageWrapper.setStyleName(resources.notificationCss().notificationMessageWrapper());
  messageWrapper.ensureDebugId(MESSAGE_WRAPPER_DBG_ID + notification.getId());
  return messageWrapper;
}
项目:che    文件:ProjectPerspectiveTest.java   
@Before
public void setUp() {

  when(view.getLeftPanel()).thenReturn(panel);
  when(view.getRightPanel()).thenReturn(panel);
  when(view.getBottomPanel()).thenReturn(panel);

  when(view.getSplitPanel()).thenReturn(layoutPanel);

  when(view.getNavigationPanel()).thenReturn(simplePanel);
  when(view.getInformationPanel()).thenReturn(simpleLayoutPanel);
  when(view.getToolPanel()).thenReturn(simplePanel);

  when(controllerFactory.createController(
          org.mockito.ArgumentMatchers.<SplitLayoutPanel>anyObject(),
          org.mockito.ArgumentMatchers.<SimplePanel>anyObject()))
      .thenReturn(workBenchController);

  when(partViewFactory.create(org.mockito.ArgumentMatchers.<FlowPanel>anyObject()))
      .thenReturn(partStackView);

  when(stackPresenterFactory.create(
          org.mockito.ArgumentMatchers.<PartStackView>anyObject(),
          org.mockito.ArgumentMatchers.<WorkBenchPartController>anyObject()))
      .thenReturn(partStackPresenter);

  perspective =
      new ProjectPerspective(
          view,
          editorMultiPartStackPresenter,
          stackPresenterFactory,
          partViewFactory,
          controllerFactory,
          eventBus,
          dynaProvider,
          projectExplorerPresenter,
          commandsExplorerPresenter,
          notificationManager,
          processesPanelPresenter);
}
项目:che    文件:AbstractPerspectiveTest.java   
@Before
public void setUp() throws Exception {
  when(view.getLeftPanel()).thenReturn(panel);
  when(view.getRightPanel()).thenReturn(panel);
  when(view.getBottomPanel()).thenReturn(panel);

  when(view.getSplitPanel()).thenReturn(layoutPanel);

  when(view.getNavigationPanel()).thenReturn(simplePanel);
  when(view.getInformationPanel()).thenReturn(simpleLayoutPanel);
  when(view.getToolPanel()).thenReturn(simplePanel);

  when(controllerFactory.createController(
          org.mockito.ArgumentMatchers.<SplitLayoutPanel>anyObject(),
          org.mockito.ArgumentMatchers.<SimplePanel>anyObject()))
      .thenReturn(workBenchController);

  when(partStackViewFactory.create(org.mockito.ArgumentMatchers.<FlowPanel>anyObject()))
      .thenReturn(partStackView);

  when(stackPresenterFactory.create(
          org.mockito.ArgumentMatchers.<PartStackView>anyObject(),
          org.mockito.ArgumentMatchers.<WorkBenchPartController>anyObject()))
      .thenReturn(partStackPresenter);

  perspective =
      new DummyPerspective(
          view,
          stackPresenterFactory,
          partStackViewFactory,
          controllerFactory,
          eventBus,
          extraPartStackPresenter,
          partStackPresenter,
          dynaProvider);
}
项目:componentrenderer    文件:FocusPreservingRefreshClientRpcImpl.java   
@Override
public void saveFocus() {
    SimplePanel panel = WidgetUtil.findWidget(WidgetUtil.getFocusedElement(), SimplePanel.class);

    if (panel != null) {
        focus = panel.getParent().getElement();
    }
}