本文整理汇总了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;
}
示例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;
}
示例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());
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}