当前位置: 首页>>代码示例>>Java>>正文


Java StyleRegistry类代码示例

本文整理汇总了Java中jetbrains.mps.openapi.editor.style.StyleRegistry的典型用法代码示例。如果您正苦于以下问题:Java StyleRegistry类的具体用法?Java StyleRegistry怎么用?Java StyleRegistry使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


StyleRegistry类属于jetbrains.mps.openapi.editor.style包,在下文中一共展示了StyleRegistry类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createProperty_ikqrmj_n0

import jetbrains.mps.openapi.editor.style.StyleRegistry; //导入依赖的package包/类
private EditorCell createProperty_ikqrmj_n0() {
  CellProviderWithRole provider = new PropertyCellProvider(myNode, getEditorContext());
  provider.setRole("default_number");
  provider.setNoTargetText("number");
  provider.setAllowsEmptyTarget(true);
  EditorCell editorCell;
  editorCell = provider.createEditorCell(getEditorContext());
  editorCell.setCellId("property_default_number");
  Style style = new StyleImpl();
  new GreetingStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
  style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
  style.set(StyleAttributes.FONT_STYLE, MPSFonts.ITALIC);
  style.set(StyleAttributes.NULL_TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.gray));
  editorCell.getStyle().putAll(style);
  editorCell.setSubstituteInfo(provider.createDefaultSubstituteInfo());
  SNode attributeConcept = provider.getRoleAttribute();
  if (attributeConcept != null) {
    EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
    return manager.createNodeRoleAttributeCell(attributeConcept, provider.getRoleAttributeKind(), editorCell);
  } else
  return editorCell;
}
 
开发者ID:vaclav,项目名称:voicemenu,代码行数:23,代码来源:WorkSpace_EditorBuilder_a.java

示例2: createCollection_pwfrmn_m0

import jetbrains.mps.openapi.editor.style.StyleRegistry; //导入依赖的package包/类
private EditorCell createCollection_pwfrmn_m0() {
  EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent());
  editorCell.setCellId("Collection_pwfrmn_m0");
  Style style = new StyleImpl();
  style.set(StyleAttributes.SELECTABLE, false);
  style.set(StyleAttributes.DRAW_BORDER, true);
  style.set(StyleAttributes.BACKGROUND_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.WHITE));
  style.set(StyleAttributes.INDENT_LAYOUT_INDENT, true);
  editorCell.getStyle().putAll(style);
  UitvoerenHandeling.setCellActions(editorCell, myNode, getEditorContext());
  editorCell.addEditorCell(createConstant_pwfrmn_a21a());
  return editorCell;
}
 
开发者ID:diederikd,项目名称:DeBrug,代码行数:14,代码来源:Venster_EditorBuilder_a.java

示例3: apply

import jetbrains.mps.openapi.editor.style.StyleRegistry; //导入依赖的package包/类
@Override
public void apply(Style style, EditorCell editorCell) {
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.black));
  style.set(StyleAttributes.FONT_STYLE, MPSFonts.ITALIC);
  style.set(StyleAttributes.SHOW_BOUNDARIES_IN, ShowBoundariesArea.GUTTER);
  style.set(StyleAttributes.FONT_SIZE, _StyleParameter_QueryFunction_kkd5s1_a3a());
}
 
开发者ID:vaclav,项目名称:voicemenu,代码行数:8,代码来源:Styles_StyleSheet.java

示例4: createConstant_stlc2q_h0

import jetbrains.mps.openapi.editor.style.StyleRegistry; //导入依赖的package包/类
private EditorCell createConstant_stlc2q_h0() {
  EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "Number:");
  editorCell.setCellId("Constant_stlc2q_h0");
  Style style = new StyleImpl();
  new HardCodedTextStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
  style.set(StyleAttributes.SELECTABLE, false);
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.black));
  style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD_ITALIC);
  editorCell.getStyle().putAll(style);
  editorCell.setDefaultText("");
  return editorCell;
}
 
开发者ID:vaclav,项目名称:voicemenu,代码行数:13,代码来源:DirectCall_EditorBuilder_a.java

示例5: createConstant_vmvky_c0

import jetbrains.mps.openapi.editor.style.StyleRegistry; //导入依赖的package包/类
private EditorCell createConstant_vmvky_c0() {
  EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "Replay");
  editorCell.setCellId("Constant_vmvky_c0");
  Style style = new StyleImpl();
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.black));
  style.set(StyleAttributes.FONT_STYLE, MPSFonts.ITALIC);
  editorCell.getStyle().putAll(style);
  editorCell.setTransformationMenuLookup(new DefaultTransformationMenuLookup(LanguageRegistry.getInstance(getEditorContext().getRepository()), MetaAdapterFactory.getConcept(0x4bc750d756884f52L, 0xb7d5b263a3393a24L, 0x6b5142eafd54f3f9L, "jetbrains.mps.samples.VoiceMenu.structure.Replay")));
  editorCell.setDefaultText("");
  editorCell.setSubstituteInfo(new SChildSubstituteInfo(editorCell));
  return editorCell;
}
 
开发者ID:vaclav,项目名称:voicemenu,代码行数:13,代码来源:Replay_EditorBuilder_a.java

示例6: createConstant_tbvjtx_f0

import jetbrains.mps.openapi.editor.style.StyleRegistry; //导入依赖的package包/类
private EditorCell createConstant_tbvjtx_f0() {
  EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "File: ");
  editorCell.setCellId("Constant_tbvjtx_f0");
  Style style = new StyleImpl();
  new HardCodedTextStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
  style.set(StyleAttributes.SELECTABLE, false);
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.black));
  style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD_ITALIC);
  editorCell.getStyle().putAll(style);
  editorCell.setDefaultText("");
  return editorCell;
}
 
开发者ID:vaclav,项目名称:voicemenu,代码行数:13,代码来源:Timeout_EditorBuilder_a.java

示例7: createConstant_tbvjtx_g0

import jetbrains.mps.openapi.editor.style.StyleRegistry; //导入依赖的package包/类
private EditorCell createConstant_tbvjtx_g0() {
  EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "Text: ");
  editorCell.setCellId("Constant_tbvjtx_g0");
  Style style = new StyleImpl();
  new HardCodedTextStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.black));
  style.set(StyleAttributes.SELECTABLE, false);
  style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD_ITALIC);
  editorCell.getStyle().putAll(style);
  editorCell.setDefaultText("");
  return editorCell;
}
 
开发者ID:vaclav,项目名称:voicemenu,代码行数:13,代码来源:Timeout_EditorBuilder_a.java

示例8: createConstant_luypn2_h0a

import jetbrains.mps.openapi.editor.style.StyleRegistry; //导入依赖的package包/类
private EditorCell createConstant_luypn2_h0a() {
  EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "File: ");
  editorCell.setCellId("Constant_luypn2_h0a");
  Style style = new StyleImpl();
  new HardCodedTextStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
  style.set(StyleAttributes.SELECTABLE, false);
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.black));
  style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD_ITALIC);
  editorCell.getStyle().putAll(style);
  RemoveGreeting.setCellActions(editorCell, myNode, getEditorContext());
  editorCell.setDefaultText("");
  return editorCell;
}
 
开发者ID:vaclav,项目名称:voicemenu,代码行数:14,代码来源:Activity_EditorBuilder_a.java

示例9: createConstant_luypn2_i0a

import jetbrains.mps.openapi.editor.style.StyleRegistry; //导入依赖的package包/类
private EditorCell createConstant_luypn2_i0a() {
  EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "Text: ");
  editorCell.setCellId("Constant_luypn2_i0a");
  Style style = new StyleImpl();
  new HardCodedTextStyleClass(getEditorContext(), getNode()).apply(style, editorCell);
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.black));
  style.set(StyleAttributes.SELECTABLE, false);
  style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD_ITALIC);
  editorCell.getStyle().putAll(style);
  RemoveGreeting.setCellActions(editorCell, myNode, getEditorContext());
  editorCell.setDefaultText("");
  return editorCell;
}
 
开发者ID:vaclav,项目名称:voicemenu,代码行数:14,代码来源:Activity_EditorBuilder_a.java

示例10: createConstant_5glmts_b0

import jetbrains.mps.openapi.editor.style.StyleRegistry; //导入依赖的package包/类
private EditorCell createConstant_5glmts_b0() {
  EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "BUTTON");
  editorCell.setCellId("Constant_5glmts_b0");
  Style style = new StyleImpl();
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.black));
  style.set(StyleAttributes.SELECTABLE, false);
  editorCell.getStyle().putAll(style);
  editorCell.setDefaultText("");
  return editorCell;
}
 
开发者ID:vaclav,项目名称:voicemenu,代码行数:11,代码来源:Name_EditorBuilder_a.java

示例11: createConstant_5glmts_e0

import jetbrains.mps.openapi.editor.style.StyleRegistry; //导入依赖的package包/类
private EditorCell createConstant_5glmts_e0() {
  EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, " ACTIVITY");
  editorCell.setCellId("Constant_5glmts_e0");
  Style style = new StyleImpl();
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.black));
  style.set(StyleAttributes.SELECTABLE, false);
  editorCell.getStyle().putAll(style);
  editorCell.setDefaultText("");
  return editorCell;
}
 
开发者ID:vaclav,项目名称:voicemenu,代码行数:11,代码来源:Name_EditorBuilder_a.java

示例12: createConstant_rijbc_a0

import jetbrains.mps.openapi.editor.style.StyleRegistry; //导入依赖的package包/类
private EditorCell createConstant_rijbc_a0() {
  EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "> Render Below Editor To");
  editorCell.setCellId("Constant_rijbc_a0");
  Style style = new StyleImpl();
  style.set(StyleAttributes.BACKGROUND_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.orange));
  editorCell.getStyle().putAll(style);
  editorCell.setDefaultText("");
  return editorCell;
}
 
开发者ID:CampagneLaboratory,项目名称:Editor2PDF,代码行数:10,代码来源:EditorAnnotation_EditorBuilder_a.java

示例13: createConstant_rijbc_g0

import jetbrains.mps.openapi.editor.style.StyleRegistry; //导入依赖的package包/类
private EditorCell createConstant_rijbc_g0() {
  EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "<");
  editorCell.setCellId("Constant_rijbc_g0");
  Style style = new StyleImpl();
  style.set(StyleAttributes.INDENT_LAYOUT_NEW_LINE, true);
  style.set(StyleAttributes.BACKGROUND_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.orange));
  editorCell.getStyle().putAll(style);
  editorCell.setDefaultText("");
  return editorCell;
}
 
开发者ID:CampagneLaboratory,项目名称:Editor2PDF,代码行数:11,代码来源:EditorAnnotation_EditorBuilder_a.java

示例14: createCollection_rijbc_h0

import jetbrains.mps.openapi.editor.style.StyleRegistry; //导入依赖的package包/类
private EditorCell createCollection_rijbc_h0() {
  EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Vertical());
  editorCell.setCellId("Collection_rijbc_h0");
  Style style = new StyleImpl();
  style.set(StyleAttributes.SELECTABLE, false);
  style.set(StyleAttributes.BRACKETS_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.blue));
  editorCell.getStyle().putAll(style);
  editorCell.addEditorCell(createAttributedNodeCell_rijbc_a7a());
  editorCell.setUsesBraces(true);
  return editorCell;
}
 
开发者ID:CampagneLaboratory,项目名称:Editor2PDF,代码行数:12,代码来源:EditorAnnotation_EditorBuilder_a.java

示例15: apply

import jetbrains.mps.openapi.editor.style.StyleRegistry; //导入依赖的package包/类
@Override
public void apply(Style style, EditorCell editorCell) {
  style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.blue));
  style.set(StyleAttributes.UNDERLINED, true);
  style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD);
}
 
开发者ID:diederikd,项目名称:DeBrug,代码行数:7,代码来源:GN_StyleSheet.java


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