Package org.eclipse.wb.core.model.broadcast

Examples of org.eclipse.wb.core.model.broadcast.ObjectInfoPresentationDecorateText


  /**
   * Decorates text of {@link Cell} with short excerpt of its content.
   */
  private void decorateCellText() {
    addBroadcastListener(new ObjectInfoPresentationDecorateText() {
      public void invoke(ObjectInfo object, String[] text) throws Exception {
        if (object instanceof HtmlCell && isParentOf(object)) {
          DocumentElement element = ((HtmlCell) object).getElement();
          int beginIndex = element.getOpenTagOffset() + element.getOpenTagLength();
          int endIndex = element.getCloseTagOffset();
View Full Code Here


  ////////////////////////////////////////////////////////////////////////////
  /**
   * Decorate Widget's text with edge.
   */
  private void decorateWidgetText() {
    addBroadcastListener(new ObjectInfoPresentationDecorateText() {
      public void invoke(ObjectInfo object, String[] text) throws Exception {
        if (object instanceof WidgetInfo && object.getParent() == DockLayoutPanelInfo.this) {
          String edgeName = getEdge((WidgetInfo) object);
          text[0] = edgeName + " - " + text[0];
        }
View Full Code Here

  ////////////////////////////////////////////////////////////////////////////
  /**
   * Decorate {@link WidgetInfo} text with direction.
   */
  private void decorateWidget_withDirection() {
    addBroadcastListener(new ObjectInfoPresentationDecorateText() {
      public void invoke(ObjectInfo object, String[] text) throws Exception {
        if (object instanceof WidgetInfo && object.getParent() == DockPanelInfo.this) {
          String directionText = getDirection((WidgetInfo) object);
          text[0] = directionText + " - " + text[0];
        }
View Full Code Here

  public DockPanelInfo(AstEditor editor,
      ComponentDescription description,
      CreationSupport creationSupport) throws Exception {
    super(editor, description, creationSupport);
    // decorate Widget's text with direction
    addBroadcastListener(new ObjectInfoPresentationDecorateText() {
      public void invoke(ObjectInfo object, String[] text) throws Exception {
        if (object instanceof WidgetInfo && object.getParent() == DockPanelInfo.this) {
          String directionText = getDirection((WidgetInfo) object);
          text[0] = directionText + " - " + text[0];
        }
View Full Code Here

  ////////////////////////////////////////////////////////////////////////////
  /**
   * Decorate Widget's text with edge.
   */
  private void decorateWidgetText() {
    addBroadcastListener(new ObjectInfoPresentationDecorateText() {
      public void invoke(ObjectInfo object, String[] text) throws Exception {
        if (object instanceof WidgetInfo && object.getParent() == DockLayoutPanelInfo.this) {
          String edgeName = getEdge((WidgetInfo) object);
          text[0] = edgeName + " - " + text[0];
        }
View Full Code Here

  public SplitPanelInfo(AstEditor editor,
      ComponentDescription description,
      CreationSupport creationSupport) throws Exception {
    super(editor, description, creationSupport);
    // decorate Widget's text with direction
    addBroadcastListener(new ObjectInfoPresentationDecorateText() {
      public void invoke(ObjectInfo object, String[] text) throws Exception {
        if (object instanceof WidgetInfo && object.getParent() == SplitPanelInfo.this) {
          String region = getRegion((WidgetInfo) object);
          text[0] = region + " - " + text[0];
        }
View Full Code Here

  //
  // Events
  //
  ////////////////////////////////////////////////////////////////////////////
  private void decorateWidgetText_withRegionName() {
    addBroadcastListener(new ObjectInfoPresentationDecorateText() {
      public void invoke(ObjectInfo object, String[] text) throws Exception {
        if (isManagedObject(object)) {
          WidgetInfo widget = (WidgetInfo) object;
          BorderLayoutDataInfo borderData = getBorderData(widget);
          String region = borderData.getRegion();
View Full Code Here

  /**
   * Sometimes widget has no text, so it is hard to identify in components tree. But if it has name,
   * would be nice to show it.
   */
  public static void decoratePresentationWithName(XmlObjectInfo root) {
    root.addBroadcastListener(new ObjectInfoPresentationDecorateText() {
      public void invoke(ObjectInfo object, String[] text) throws Exception {
        if (object instanceof XmlObjectInfo) {
          XmlObjectInfo xObject = (XmlObjectInfo) object;
          String name = getName(xObject);
          if (name != null) {
View Full Code Here

TOP

Related Classes of org.eclipse.wb.core.model.broadcast.ObjectInfoPresentationDecorateText

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.