• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java SVGResource类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.vectomatic.dom.svg.ui.SVGResource的典型用法代码示例。如果您正苦于以下问题:Java SVGResource类的具体用法?Java SVGResource怎么用?Java SVGResource使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SVGResource类属于org.vectomatic.dom.svg.ui包,在下文中一共展示了SVGResource类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: displayMachineOutput

import org.vectomatic.dom.svg.ui.SVGResource; //导入依赖的package包/类
protected void displayMachineOutput(DisplayMachineOutputEvent event) {
  String machineName = event.getMachineName();
  OutputConsole outputConsole = consoles.get(machineName);

  if (outputConsole == null) {
    return;
  }

  outputConsole.go(
      widget -> {
        String title = outputConsole.getTitle();
        SVGResource icon = outputConsole.getTitleIcon();
        view.addWidget(machineName, title, icon, widget, true);
        ProcessTreeNode node = view.getNodeById(machineName);
        view.selectNode(node);
        notifyTreeNodeSelected(node);
      });

  outputConsole.addActionDelegate(this);
}
 
开发者ID:eclipse,项目名称:che,代码行数:21,代码来源:ProcessesPanelPresenter.java


示例2: NewClikeResourceAction

import org.vectomatic.dom.svg.ui.SVGResource; //导入依赖的package包/类
/**
 * Creates new action.
 *
 * @param title action's title
 * @param description action's description
 * @param svgIcon
 */
public NewClikeResourceAction(
    String title,
    String description,
    SVGResource svgIcon,
    DialogFactory dialogFactory,
    CoreLocalizationConstant coreLocalizationConstant,
    EventBus eventBus,
    AppContext appContext,
    NotificationManager notificationManager,
    Provider<EditorAgent> editorAgentProvider) {
  super(
      title,
      description,
      svgIcon,
      dialogFactory,
      coreLocalizationConstant,
      eventBus,
      appContext,
      notificationManager,
      editorAgentProvider);
  this.appContext = appContext;
}
 
开发者ID:eclipse,项目名称:che,代码行数:30,代码来源:NewClikeResourceAction.java


示例3: GoalPopUpGroup

import org.vectomatic.dom.svg.ui.SVGResource; //导入依赖的package包/类
@Inject
GoalPopUpGroup(
    @Assisted String goalId,
    ActionManager actionManager,
    CommandGoalRegistry goalRegistry,
    IconRegistry iconRegistry) {
  super(actionManager);

  this.iconRegistry = iconRegistry;
  commandGoal = goalRegistry.getGoalForId(goalId);

  setPopup(true);

  // set icon
  final SVGResource commandTypeIcon = getCommandGoalIcon();
  if (commandTypeIcon != null) {
    getTemplatePresentation().setImageElement(new SVGImage(commandTypeIcon).getElement());
  }
}
 
开发者ID:eclipse,项目名称:che,代码行数:20,代码来源:GoalPopUpGroup.java


示例4: getCommandGoalIcon

import org.vectomatic.dom.svg.ui.SVGResource; //导入依赖的package包/类
/** Returns the icon for the given command goal ID or {@code null} if none. */
@Nullable
public SVGResource getCommandGoalIcon(String goalId) {
  final Optional<CommandGoal> goalOptional = goalRegistry.getPredefinedGoalById(goalId);

  if (goalOptional.isPresent()) {
    final Icon icon = iconRegistry.getIconIfExist("command.goal." + goalOptional.get().getId());

    if (icon != null) {
      final SVGImage svgImage = icon.getSVGImage();

      if (svgImage != null) {
        return icon.getSVGResource();
      }
    }
  }

  return null;
}
 
开发者ID:eclipse,项目名称:che,代码行数:20,代码来源:CommandUtils.java


示例5: NewCSharplikeResourceAction

import org.vectomatic.dom.svg.ui.SVGResource; //导入依赖的package包/类
/**
 * Creates new action.
 *
 * @param title action's title
 * @param description action's description
 * @param svgIcon
 */
public NewCSharplikeResourceAction(
    String title,
    String description,
    SVGResource svgIcon,
    DialogFactory dialogFactory,
    CoreLocalizationConstant coreLocalizationConstant,
    EventBus eventBus,
    AppContext appContext,
    NotificationManager notificationManager,
    Provider<EditorAgent> editorAgentProvider) {
  super(
      title,
      description,
      svgIcon,
      dialogFactory,
      coreLocalizationConstant,
      eventBus,
      appContext,
      notificationManager,
      editorAgentProvider);
  this.appContext = appContext;
}
 
开发者ID:eclipse,项目名称:che,代码行数:30,代码来源:NewCSharplikeResourceAction.java


示例6: NewPhplikeResourceAction

import org.vectomatic.dom.svg.ui.SVGResource; //导入依赖的package包/类
/**
 * Creates new action.
 *
 * @param title action's title
 * @param description action's description
 * @param svgIcon
 */
public NewPhplikeResourceAction(
    String title,
    String description,
    SVGResource svgIcon,
    DialogFactory dialogFactory,
    CoreLocalizationConstant coreLocalizationConstant,
    EventBus eventBus,
    AppContext appContext,
    NotificationManager notificationManager,
    Provider<EditorAgent> editorAgentProvider) {
  super(
      title,
      description,
      svgIcon,
      dialogFactory,
      coreLocalizationConstant,
      eventBus,
      appContext,
      notificationManager,
      editorAgentProvider);
  this.appContext = appContext;
}
 
开发者ID:eclipse,项目名称:che,代码行数:30,代码来源:NewPhplikeResourceAction.java


示例7: NodeWidget

import org.vectomatic.dom.svg.ui.SVGResource; //导入依赖的package包/类
public NodeWidget(
    String nodeName, ProjectClasspathResources resources, int nodeKind, SVGResource nodeIcon) {
  this.resources = resources;
  this.nodeName = nodeName;
  this.nodeKind = nodeKind;

  initWidget(UI_BINDER.createAndBindUi(this));

  SVGImage icon = new SVGImage(nodeIcon.getSvg());
  this.icon.getElement().appendChild(icon.getSvgElement().getElement());
  this.removeButton.getElement().appendChild(resources.removeNode().getSvg().getElement());

  name.setText(nodeName);

  removeButton.addDomHandler(
      new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
          delegate.onRemoveButtonClicked(NodeWidget.this);
        }
      },
      ClickEvent.getType());
  addDomHandler(this, ClickEvent.getType());
}
 
开发者ID:eclipse,项目名称:che,代码行数:25,代码来源:NodeWidget.java


示例8: JsonExampleProjectAction

import org.vectomatic.dom.svg.ui.SVGResource; //导入依赖的package包/类
/**
 * Constructor.
 *
 * @param appContext the IDE application context
 * @param text the text of the action
 * @param description the description of the action
 * @param svgResource the icon of the resource
 */
public JsonExampleProjectAction(
    AppContext appContext,
    @NotNull String text,
    @NotNull String description,
    @Nullable SVGResource svgResource) {
  super(Collections.singletonList(PROJECT_PERSPECTIVE_ID), text, description, null, svgResource);
  this.appContext = appContext;
}
 
开发者ID:eclipse,项目名称:che-archetypes,代码行数:17,代码来源:JsonExampleProjectAction.java


示例9: temporaryButton

import org.vectomatic.dom.svg.ui.SVGResource; //导入依赖的package包/类
@Source("temporary/temporary.svg")
SVGResource temporaryButton();
 
开发者ID:codenvy,项目名称:codenvy,代码行数:3,代码来源:HostedResources.java


示例10: updatePresentation

import org.vectomatic.dom.svg.ui.SVGResource; //导入依赖的package包/类
@Override
public void updatePresentation(NodePresentation presentation) {
  presentation.setPresentableText(getName().toUpperCase() + " (" + commands.size() + ")");
  presentation.setPresentableTextCss("font-weight: bold;");

  final SVGResource goalIcon = commandUtils.getCommandGoalIcon(getData().getId());
  if (goalIcon != null) {
    presentation.setPresentableIcon(goalIcon);
  }
}
 
开发者ID:eclipse,项目名称:che,代码行数:11,代码来源:CommandGoalNode.java


示例11: shouldFireEventWhenSelectionInActivePartChanged

import org.vectomatic.dom.svg.ui.SVGResource; //导入依赖的package包/类
/** If selection chang in active part, Selection Agent should fire an Event */
@Test
public void shouldFireEventWhenSelectionInActivePartChanged() {

  AbstractPartPresenter part =
      new AbstractPartPresenter() {
        @Override
        public void go(AcceptsOneWidget container) {}

        @Override
        public String getTitleToolTip() {
          return null;
        }

        @Override
        public SVGResource getTitleImage() {
          return null;
        }

        @Override
        public String getTitle() {
          return null;
        }

        @Override
        public IsWidget getView() {
          return null;
        }
      };

  // fire event, for agent to get information about active part
  eventBus.fireEvent(new ActivePartChangedEvent(part));
  SelectionChangedHandler handler = mock(SelectionChangedHandler.class);
  eventBus.addHandler(SelectionChangedEvent.TYPE, handler);

  part.setSelection(mock(Selection.class));

  verify(handler).onSelectionChanged((SelectionChangedEvent) any());
}
 
开发者ID:eclipse,项目名称:che,代码行数:40,代码来源:TestSelectionAgent.java


示例12: updatePresentation

import org.vectomatic.dom.svg.ui.SVGResource; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void updatePresentation(@NotNull NodePresentation presentation) {
  StringBuilder presentableName = new StringBuilder(field.getElementName());
  if (isShowInheritedMembers) {
    String path = field.getRootPath();
    String className =
        field.isBinary()
            ? path.substring(path.lastIndexOf('.') + 1)
            : path.substring(path.lastIndexOf('/') + 1, path.indexOf('.'));
    presentableName.append(" -> ").append(className);
  }

  updatePresentationField(isFromSuper, presentation, presentableName.toString(), resources);

  int flag = field.getFlags();
  SVGResource icon;
  if (Flags.isPublic(flag)) {
    icon = resources.publicMethod();
  } else if (Flags.isPrivate(flag)) {
    icon = resources.privateMethod();
  } else if (Flags.isProtected(flag)) {
    icon = resources.protectedMethod();
  } else {
    icon = resources.publicMethod();
  }
  presentation.setPresentableIcon(icon);
}
 
开发者ID:eclipse,项目名称:che,代码行数:29,代码来源:FieldNode.java


示例13: Icon

import org.vectomatic.dom.svg.ui.SVGResource; //导入依赖的package包/类
/**
 * Create a new icon based on the specified {@link SVGResource}.
 *
 * @param id icon id
 * @param svgResource resource that contains SVG
 */
public Icon(String id, SVGResource svgResource) {
  this.id = id;
  this.sourcePath = null;
  this.svgResource = svgResource;
  this.imageResource = null;
}
 
开发者ID:eclipse,项目名称:che,代码行数:13,代码来源:Icon.java


示例14: Annotation

import org.vectomatic.dom.svg.ui.SVGResource; //导入依赖的package包/类
/**
 * Creates a new annotation with the given properties.
 *
 * @param type the unique name of this annotation type
 * @param isPersistent <code>true</code> if this annotation is persistent, <code>false</code>
 *     otherwise
 * @param text the text associated with this annotation
 * @param layer annotation draw layer
 * @param image image associated with this annotation
 * @param imageSVG image associated with this annotation
 */
public Annotation(
    String type,
    boolean isPersistent,
    String text,
    int layer,
    ImageResource image,
    SVGResource imageSVG) {
  this.type = type;
  this.isPersistent = isPersistent;
  this.text = text;
  this.layer = layer;
  this.image = image;
  this.imageSVG = imageSVG;
}
 
开发者ID:eclipse,项目名称:che,代码行数:26,代码来源:Annotation.java


示例15: updatePresentation

import org.vectomatic.dom.svg.ui.SVGResource; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void updatePresentation(@NotNull NodePresentation presentation) {
  StringBuilder presentableName = new StringBuilder(type.getLabel());
  if (isShowInheritedMembers && !type.isPrimary()) {
    String path = type.getRootPath();
    String className =
        type.isBinary()
            ? path.substring(path.lastIndexOf('.') + 1)
            : path.substring(path.lastIndexOf('/') + 1, path.indexOf('.'));

    presentableName.append(" -> ").append(className);
  }

  updatePresentationField(isFromSuper, presentation, presentableName.toString(), resources);

  int flags = type.getFlags();
  SVGResource icon;
  if (Flags.isInterface(flags)) {
    icon = resources.interfaceItem();
  } else if (Flags.isEnum(flags)) {
    icon = resources.enumItem();
  } else if (Flags.isAnnotation(flags)) {
    icon = resources.annotationItem();
  } else {
    icon = resources.javaFile();
  }
  presentation.setPresentableIcon(icon);
}
 
开发者ID:eclipse,项目名称:che,代码行数:30,代码来源:TypeNode.java


示例16: JavaEditorAction

import org.vectomatic.dom.svg.ui.SVGResource; //导入依赖的package包/类
public JavaEditorAction(
    String text,
    String description,
    SVGResource svgIcon,
    EditorAgent editorAgent,
    FileTypeRegistry fileTypeRegistry) {
  super(text, description, svgIcon);
  this.editorAgent = editorAgent;
  this.fileTypeRegistry = fileTypeRegistry;
}
 
开发者ID:eclipse,项目名称:che,代码行数:11,代码来源:JavaEditorAction.java


示例17: AbstractJUnitTestAction

import org.vectomatic.dom.svg.ui.SVGResource; //导入依赖的package包/类
public AbstractJUnitTestAction(
    TestDetector testDetector,
    TestResultPresenter testResultPresenter,
    TestingHandler testingHandler,
    DebugConfigurationsManager debugConfigurationsManager,
    TestServiceClient client,
    DtoFactory dtoFactory,
    AppContext appContext,
    NotificationManager notificationManager,
    List<String> perspectives,
    String description,
    String text,
    SVGResource icon) {
  super(
      testDetector,
      testResultPresenter,
      testingHandler,
      debugConfigurationsManager,
      client,
      dtoFactory,
      appContext,
      notificationManager,
      perspectives,
      description,
      text,
      icon);
  this.testDetector = testDetector;
  this.appContext = appContext;
}
 
开发者ID:eclipse,项目名称:che,代码行数:30,代码来源:AbstractJUnitTestAction.java


示例18: getSvgImage

import org.vectomatic.dom.svg.ui.SVGResource; //导入依赖的package包/类
private SVGImage getSvgImage(int flag) {
  SVGResource icon;
  if (Flags.isInterface(flag)) {
    icon = javaResources.interfaceItem();
  } else if (Flags.isEnum(flag)) {
    icon = javaResources.enumItem();
  } else if (Flags.isAnnotation(flag)) {
    icon = javaResources.annotationItem();
  } else {
    icon = javaResources.javaFile();
  }
  return new SVGImage(icon);
}
 
开发者ID:eclipse,项目名称:che,代码行数:14,代码来源:NoImplementationWidget.java


示例19: getIcon

import org.vectomatic.dom.svg.ui.SVGResource; //导入依赖的package包/类
@Override
public SVGResource getIcon(Resource resource) {

  if (resource.getResourceType() != Resource.FILE) {
    return null;
  }

  FileType fileType = fileTypeRegistry.getFileTypeByFile((File) resource);

  return fileType.equals(unknownFileType) ? null : fileType.getImage();
}
 
开发者ID:eclipse,项目名称:che,代码行数:12,代码来源:FileIconProvider.java


示例20: CompositeOutputConsole

import org.vectomatic.dom.svg.ui.SVGResource; //导入依赖的package包/类
@Inject
public CompositeOutputConsole(
    @Assisted Widget widget, @Assisted String title, @Assisted SVGResource icon) {
  this.widget = widget;
  this.title = title;
  this.icon = icon;
}
 
开发者ID:eclipse,项目名称:che,代码行数:8,代码来源:CompositeOutputConsole.java



注:本文中的org.vectomatic.dom.svg.ui.SVGResource类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Type类代码示例发布时间:2022-05-23
下一篇:
Java PMMLManager类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap