本文整理汇总了Java中org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel类的典型用法代码示例。如果您正苦于以下问题:Java WrappingLabel类的具体用法?Java WrappingLabel怎么用?Java WrappingLabel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WrappingLabel类属于org.eclipse.gmf.runtime.draw2d.ui.figures包,在下文中一共展示了WrappingLabel类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: hookListeners
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; //导入依赖的package包/类
protected void hookListeners() {
super.hookListeners();
// TODO: This gets around the problem of the cell editor not growing big
// enough when in autosize mode because it doesn't listen to textflow
// size changes. The superclass should be modified to not assume we want
// to listen to the editpart's figure.
ILabelDelegate label = (ILabelDelegate) getEditPart().getAdapter(ILabelDelegate.class);
if (label != null && getEditPart().getFigure() instanceof WrappingLabel) {
textFigureListener = new AncestorListener.Stub() {
public void ancestorMoved(IFigure ancestor) {
getLocator().relocate(getCellEditor());
}
};
((IFigure) ((WrappingLabel) getEditPart().getFigure()).getTextFigure().getChildren().get(0))
.addAncestorListener(textFigureListener);
}
}
开发者ID:Yakindu,项目名称:statecharts,代码行数:21,代码来源:XtextDirectEditManager.java
示例2: getLabelTextHelper
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; //导入依赖的package包/类
/**
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
if (figure instanceof WrappingLabel) {
return ((WrappingLabel) figure).getText();
} else if (figure instanceof Label) {
return ((Label) figure).getText();
} else {
return getLabelDelegate().getText();
}
}
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:13,代码来源:StateNameEditPart.java
示例3: setLabelTextHelper
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; //导入依赖的package包/类
/**
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
if (figure instanceof WrappingLabel) {
((WrappingLabel) figure).setText(text);
} else if (figure instanceof Label) {
((Label) figure).setText(text);
} else {
getLabelDelegate().setText(text);
}
}
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:13,代码来源:StateNameEditPart.java
示例4: getLabelIconHelper
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; //导入依赖的package包/类
/**
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
if (figure instanceof WrappingLabel) {
return ((WrappingLabel) figure).getIcon();
} else if (figure instanceof Label) {
return ((Label) figure).getIcon();
} else {
return getLabelDelegate().getIcon(0);
}
}
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:13,代码来源:StateNameEditPart.java
示例5: setLabelIconHelper
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; //导入依赖的package包/类
/**
* @generated
*/
protected void setLabelIconHelper(IFigure figure, Image icon) {
if (figure instanceof WrappingLabel) {
((WrappingLabel) figure).setIcon(icon);
return;
} else if (figure instanceof Label) {
((Label) figure).setIcon(icon);
return;
} else {
getLabelDelegate().setIcon(icon, 0);
}
}
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:15,代码来源:StateNameEditPart.java
示例6: setLabel
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; //导入依赖的package包/类
/**
* @generated
*/
public void setLabel(WrappingLabel figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
registerVisuals();
refreshVisuals();
}
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:11,代码来源:StateNameEditPart.java
示例7: refreshUnderline
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; //导入依赖的package包/类
/**
* @generated
*/
protected void refreshUnderline() {
FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
}
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:11,代码来源:StateNameEditPart.java
示例8: refreshStrikeThrough
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; //导入依赖的package包/类
/**
* @generated
*/
protected void refreshStrikeThrough() {
FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style
.isStrikeThrough());
}
}
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:12,代码来源:StateNameEditPart.java
示例9: showPrimarySelection
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; //导入依赖的package包/类
/**
* @generated
*/
protected void showPrimarySelection() {
if (getHostFigure() instanceof WrappingLabel) {
((WrappingLabel) getHostFigure()).setSelected(true);
((WrappingLabel) getHostFigure()).setFocus(true);
} else {
showSelection();
showFocus();
}
}
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:13,代码来源:StatemachineTextNonResizableEditPolicy.java
示例10: showSelection
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; //导入依赖的package包/类
/**
* @generated
*/
protected void showSelection() {
if (getHostFigure() instanceof WrappingLabel) {
((WrappingLabel) getHostFigure()).setSelected(true);
((WrappingLabel) getHostFigure()).setFocus(false);
} else {
hideSelection();
addFeedback(selectionFeedbackFigure = createSelectionFeedbackFigure());
getHostFigure().addFigureListener(getHostPositionListener());
refreshSelectionFeedback();
hideFocus();
}
}
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:16,代码来源:StatemachineTextNonResizableEditPolicy.java
示例11: hideSelection
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; //导入依赖的package包/类
/**
* @generated
*/
protected void hideSelection() {
if (getHostFigure() instanceof WrappingLabel) {
((WrappingLabel) getHostFigure()).setSelected(false);
((WrappingLabel) getHostFigure()).setFocus(false);
} else {
if (selectionFeedbackFigure != null) {
removeFeedback(selectionFeedbackFigure);
getHostFigure().removeFigureListener(getHostPositionListener());
selectionFeedbackFigure = null;
}
hideFocus();
}
}
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:17,代码来源:StatemachineTextNonResizableEditPolicy.java
示例12: showFocus
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; //导入依赖的package包/类
/**
* @generated
*/
protected void showFocus() {
if (getHostFigure() instanceof WrappingLabel) {
((WrappingLabel) getHostFigure()).setFocus(true);
} else {
hideFocus();
addFeedback(focusFeedbackFigure = createFocusFeedbackFigure());
refreshFocusFeedback();
}
}
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:13,代码来源:StatemachineTextNonResizableEditPolicy.java
示例13: hideFocus
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; //导入依赖的package包/类
/**
* @generated
*/
protected void hideFocus() {
if (getHostFigure() instanceof WrappingLabel) {
((WrappingLabel) getHostFigure()).setFocus(false);
} else {
if (focusFeedbackFigure != null) {
removeFeedback(focusFeedbackFigure);
focusFeedbackFigure = null;
}
}
}
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:14,代码来源:StatemachineTextNonResizableEditPolicy.java
示例14: createFigure
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; //导入依赖的package包/类
@Override
protected IFigure createFigure() {
final WrappingLabel label = new SyntaxColoringLabel();
label.setTextWrap(true);
label.setAlignment(PositionConstants.LEFT | PositionConstants.TOP);
return label;
}
开发者ID:Yakindu,项目名称:statecharts,代码行数:8,代码来源:ExternalXtextLabelEditPart.java
示例15: unhookListeners
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; //导入依赖的package包/类
protected void unhookListeners() {
if (listenersAttached) {
listenersAttached = false;
super.unhookListeners();
ILabelDelegate label = (ILabelDelegate) getEditPart().getAdapter(ILabelDelegate.class);
if (label != null && textFigureListener != null) {
((IFigure) ((WrappingLabel) getEditPart().getFigure()).getTextFigure().getChildren().get(0))
.removeAncestorListener(textFigureListener);
textFigureListener = null;
}
}
}
开发者ID:Yakindu,项目名称:statecharts,代码行数:14,代码来源:XtextDirectEditManager.java
示例16: getAdapter
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; //导入依赖的package包/类
@Override
public Object getAdapter(@SuppressWarnings("rawtypes") Class key) {
if (key.equals(ILabelDelegate.class)) {
WrappingLabel wrappingLabel = getWrappingLabel();
if (wrappingLabel == null)
return super.getAdapter(key);
return new WrappingLabelDelegate(wrappingLabel);
}
return super.getAdapter(key);
}
开发者ID:Yakindu,项目名称:statecharts,代码行数:11,代码来源:TextAwareExternalLabelEditPart.java
示例17: getLabelIconHelper
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; //导入依赖的package包/类
/**
* @generated
*/
protected Image getLabelIconHelper(IFigure figure) {
if (figure instanceof WrappingLabel) {
return ((WrappingLabel) figure).getIcon();
} else {
return ((Label) figure).getIcon();
}
}
开发者ID:road-framework,项目名称:ROADDesigner,代码行数:11,代码来源:WrappingLabelEditPart.java
示例18: setLabelTextHelper
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; //导入依赖的package包/类
/**
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
if (figure instanceof WrappingLabel) {
((WrappingLabel) figure).setText(text);
} else {
((Label) figure).setText(text);
}
}
开发者ID:road-framework,项目名称:ROADDesigner,代码行数:11,代码来源:SMCNameEditPart.java
注:本文中的org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论