Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.UIObject$DebugIdImplEnabled


     * @return True if the field was found, false otherwise.
     */
    public boolean decorateFieldWithValidationError(IViewWithValidation view, LocalizableMessage message, String style) {
        Map<String, UIObject> map = view.getValidatedFieldMap();
        if (message.getContext() != null && map.containsKey(message.getContext())) {
            UIObject field = map.get(message.getContext());
            field.addStyleName(style);
            return true;
        } else {
            return false;
        }
    }
View Full Code Here


    public StyleValidationFeedback(String styleName) {
        this.styleName = styleName;
    }
   
    public void handleException(Object source, ValidationException exception) {
        UIObject object = (UIObject) source;
        if(this.styleName.equals(object.getStyleName()) ){
            return;
        }
        String previousStyle =  object.getStyleName() == null ||
                object.getStyleName().length() == 0 ?
                    "default" :
                    object.getStyleName();
        if( !this.previousStyles.containsKey(source) )
            this.previousStyles.put( source, previousStyle );
        Logger.getAnonymousLogger().log( Level.SPAM,  "Previous style: "+ previousStyle, null );
        object.setStyleName( this.styleName );
        Logger.getAnonymousLogger().log( Level.SPAM,  "Current style: "+ object.getStyleName(), null );
    }
View Full Code Here

        object.setStyleName( this.styleName );
        Logger.getAnonymousLogger().log( Level.SPAM,  "Current style: "+ object.getStyleName(), null );
    }
   
    public void resolve(Object source) {
        UIObject object = (UIObject) source;
        String previousStyle = (String) this.previousStyles.get(source);
        if( previousStyle != null ){
            GWT.log( "Reverting to style:" + previousStyle, null  );
            object.setStyleName( previousStyle );
            GWT.log( object.toString(), null  );
            this.previousStyles.remove( source );
        }
    }
View Full Code Here

      }
      computedScrollType = true;
    }

    if (parentScrollPanel != null) {
      parentScrollPanel.ensureVisible(new UIObject() {
        {
          setElement(tr);
        }
      });
    } else {
View Full Code Here

    protected void showSelectedIndex(int newIndex) {
        if(selectable) {
          searching = false;
          table.setSelectedIndex(newIndex);
          if(newIndex >= 0) {
            final UIObject rowWidget = table.getRowUIObject(newIndex);
            if(rowWidget != null)
                container.ensureVisible(rowWidget);
          }
        }
    }
View Full Code Here

      return selectedModel;
    }

    protected void ensureSelectedIndexIsVisible() {
      if(table.getSelectedIndex() >= && table.getRowCount() > 0) {
        final UIObject rowUIObject = table.getRowUIObject(table.getSelectedIndex());
        if(rowUIObject != null)
            container.ensureVisible(rowUIObject);
            // TODO Ensure that the part of the container which has the ui object is also visible.  #584
      }
    }
View Full Code Here

        }
    }

    @Override
    public void add(final PTInstruction add, final UIService uiService) {
        final UIObject widget = asWidget(add.getObjectID(), uiService);

        if (widget instanceof Tree) {
            this.tree = (Tree) widget;
        } else {
            if (add.containsKey(PROPERTY.WIDGET)) {
View Full Code Here

    }

    @Override
    public PTObject unRegisterObject(final Long objectId) {
        final PTObject ptObject = objectByID.remove(objectId);
        final UIObject uiObject = widgetIDByObjectID.remove(objectId);
        if (uiObject != null) {
            objectIDByWidget.remove(uiObject);
        }
        return ptObject;
    }
View Full Code Here

    return false;
  }

  @SuppressWarnings("unchecked")
  public UIObject createWidget(Class widget) {
    final UIObject uiObject = widgetFactory.createWidget(this, widget);
    if (uiObject != null) {
      if (uiObjects == null) {
        uiObjects = new ArrayList<UIObject>();
      }
      uiObjects.add(uiObject);
View Full Code Here

    public StyleValidationFeedback(String styleName) {
        this.styleName = styleName;
    }
   
    public void handleException(Object source, ValidationException exception) {
        UIObject object = (UIObject) source;
        String previousStyle =  object.getStyleName() == null ||
                object.getStyleName().length() == 0 ?
                    "default" :
                    object.getStyleName();
        if( !this.previousStyles.containsKey(source) )
            this.previousStyles.put( source, previousStyle );
        Logger.getAnonymousLogger().log( Level.SPAM,  "Previous style: "+ previousStyle, null );
        object.setStyleName( this.styleName );
        Logger.getAnonymousLogger().log( Level.SPAM,  "Current style: "+ object.getStyleName(), null );
    }
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.UIObject$DebugIdImplEnabled

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.