org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel Java Examples

The following examples show how to use org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: IntermediateErrorCatchEventEditPart.java    From bonita-studio with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @generated
 */
private void createContents() {

	WrappingLabel intermediateCatchErrorEventNameFigure0 = new WrappingLabel();

	intermediateCatchErrorEventNameFigure0.setText("");

	GridData constraintIntermediateCatchErrorEventNameFigure0 = new GridData();
	constraintIntermediateCatchErrorEventNameFigure0.verticalAlignment = GridData.CENTER;
	constraintIntermediateCatchErrorEventNameFigure0.horizontalAlignment = GridData.CENTER;
	constraintIntermediateCatchErrorEventNameFigure0.horizontalIndent = 0;
	constraintIntermediateCatchErrorEventNameFigure0.horizontalSpan = 1;
	constraintIntermediateCatchErrorEventNameFigure0.verticalSpan = 1;
	constraintIntermediateCatchErrorEventNameFigure0.grabExcessHorizontalSpace = true;
	constraintIntermediateCatchErrorEventNameFigure0.grabExcessVerticalSpace = true;
	this.add(intermediateCatchErrorEventNameFigure0, constraintIntermediateCatchErrorEventNameFigure0);

}
 
Example #2
Source File: StartMessageEventLabelEditPart.java    From bonita-studio with GNU General Public License v2.0 6 votes vote down vote up
/**
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
	EObject obj = resolveSemanticElement();
	if (obj != null && obj instanceof ThrowLinkEvent) {
		if (((ThrowLinkEvent) obj).getTo() != null) {
			text = ((ThrowLinkEvent) obj).getTo().getName();
			if (text == null) {
				text = "";
			}
		} else {
			text = "";
		}
	}
	if (figure instanceof WrappingLabel) {
		((WrappingLabel) figure).setText(text);
	} else {
		((Label) figure).setText(text);
	}
}
 
Example #3
Source File: TextAnnotationEditPart.java    From bonita-studio with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @generated
 */
private void createContents() {

	fFigureNoteMessage = new WrappingLabel();

	fFigureNoteMessage.setText("");

	GridData constraintFFigureNoteMessage = new GridData();
	constraintFFigureNoteMessage.verticalAlignment = GridData.CENTER;
	constraintFFigureNoteMessage.horizontalAlignment = GridData.CENTER;
	constraintFFigureNoteMessage.horizontalIndent = 0;
	constraintFFigureNoteMessage.horizontalSpan = 1;
	constraintFFigureNoteMessage.verticalSpan = 1;
	constraintFFigureNoteMessage.grabExcessHorizontalSpace = true;
	constraintFFigureNoteMessage.grabExcessVerticalSpace = true;
	this.add(fFigureNoteMessage, constraintFFigureNoteMessage);

}
 
Example #4
Source File: QueueEditPart.java    From scava with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * @generated
 */
private void createContents() {

	fFigureQueueLabelFigure = new WrappingLabel();

	fFigureQueueLabelFigure.setText("Queue");

	GridData constraintFFigureQueueLabelFigure = new GridData();
	constraintFFigureQueueLabelFigure.verticalAlignment = GridData.CENTER;
	constraintFFigureQueueLabelFigure.horizontalAlignment = GridData.CENTER;
	constraintFFigureQueueLabelFigure.horizontalIndent = 0;
	constraintFFigureQueueLabelFigure.horizontalSpan = 1;
	constraintFFigureQueueLabelFigure.verticalSpan = 1;
	constraintFFigureQueueLabelFigure.grabExcessHorizontalSpace = true;
	constraintFFigureQueueLabelFigure.grabExcessVerticalSpace = true;
	this.add(fFigureQueueLabelFigure, constraintFFigureQueueLabelFigure);

}
 
Example #5
Source File: TopicEditPart.java    From scava with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * @generated
 */
private void createContents() {

	fFigureTopicLabelFigure = new WrappingLabel();

	fFigureTopicLabelFigure.setText("Topic");

	GridData constraintFFigureTopicLabelFigure = new GridData();
	constraintFFigureTopicLabelFigure.verticalAlignment = GridData.CENTER;
	constraintFFigureTopicLabelFigure.horizontalAlignment = GridData.CENTER;
	constraintFFigureTopicLabelFigure.horizontalIndent = 0;
	constraintFFigureTopicLabelFigure.horizontalSpan = 1;
	constraintFFigureTopicLabelFigure.verticalSpan = 1;
	constraintFFigureTopicLabelFigure.grabExcessHorizontalSpace = true;
	constraintFFigureTopicLabelFigure.grabExcessVerticalSpace = true;
	this.add(fFigureTopicLabelFigure, constraintFFigureTopicLabelFigure);

}
 
Example #6
Source File: ServiceTaskEditPart.java    From bonita-studio with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @generated
 */
private void createContents() {

	fFigureActivityNameFigure = new WrappingLabel();

	fFigureActivityNameFigure.setText("");

	GridData constraintFFigureActivityNameFigure = new GridData();
	constraintFFigureActivityNameFigure.verticalAlignment = GridData.CENTER;
	constraintFFigureActivityNameFigure.horizontalAlignment = GridData.FILL;
	constraintFFigureActivityNameFigure.horizontalIndent = 0;
	constraintFFigureActivityNameFigure.horizontalSpan = 1;
	constraintFFigureActivityNameFigure.verticalSpan = 1;
	constraintFFigureActivityNameFigure.grabExcessHorizontalSpace = true;
	constraintFFigureActivityNameFigure.grabExcessVerticalSpace = true;
	this.add(fFigureActivityNameFigure, constraintFFigureActivityNameFigure);

}
 
Example #7
Source File: BoundaryTimerEventLabel2EditPart.java    From bonita-studio with GNU General Public License v2.0 6 votes vote down vote up
/**
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
	EObject obj = resolveSemanticElement();
	if (obj != null && obj instanceof ThrowLinkEvent) {
		if (((ThrowLinkEvent) obj).getTo() != null) {
			text = ((ThrowLinkEvent) obj).getTo().getName();
			if (text == null) {
				text = "";
			}
		} else {
			text = "";
		}
	}
	if (figure instanceof WrappingLabel) {
		((WrappingLabel) figure).setText(text);
	} else {
		((Label) figure).setText(text);
	}
}
 
Example #8
Source File: BoundaryTimerEventLabelEditPart.java    From bonita-studio with GNU General Public License v2.0 6 votes vote down vote up
/**
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
	EObject obj = resolveSemanticElement();
	if (obj != null && obj instanceof ThrowLinkEvent) {
		if (((ThrowLinkEvent) obj).getTo() != null) {
			text = ((ThrowLinkEvent) obj).getTo().getName();
			if (text == null) {
				text = "";
			}
		} else {
			text = "";
		}
	}
	if (figure instanceof WrappingLabel) {
		((WrappingLabel) figure).setText(text);
	} else {
		((Label) figure).setText(text);
	}
}
 
Example #9
Source File: EndEventLabelEditPart.java    From bonita-studio with GNU General Public License v2.0 6 votes vote down vote up
/**
* @generated
*/
protected void setLabelTextHelper(IFigure figure, String text) {
	EObject obj = resolveSemanticElement();
	if (obj != null && obj instanceof ThrowLinkEvent) {
		if (((ThrowLinkEvent) obj).getTo() != null) {
			text = ((ThrowLinkEvent) obj).getTo().getName();
			if (text == null) {
				text = "";
			}
		} else {
			text = "";
		}
	}
	if (figure instanceof WrappingLabel) {
		((WrappingLabel) figure).setText(text);
	} else {
		((Label) figure).setText(text);
	}
}
 
Example #10
Source File: ScriptTaskLabel2EditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @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);
	}
}
 
Example #11
Source File: CommitmentTaskNameEditPart.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @generated
*/
public void setLabel(WrappingLabel figure) {
	unregisterVisuals();
	setFigure(figure);
	defaultText = getLabelTextHelper(figure);
	registerVisuals();
	refreshVisuals();
}
 
Example #12
Source File: FieldNameType3EditPart.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @generated
*/
public void setLabel(WrappingLabel figure) {
	unregisterVisuals();
	setFigure(figure);
	defaultText = getLabelTextHelper(figure);
	registerVisuals();
	refreshVisuals();
}
 
Example #13
Source File: TaskNameEditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @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);
	}
}
 
Example #14
Source File: StartMessageEventLabel2EditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @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);
	}
}
 
Example #15
Source File: SinkNameEditPart.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @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();
	}
}
 
Example #16
Source File: ActivityName2EditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @generated
*/
protected void refreshUnderline() {
	FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
	if (style != null && getFigure() instanceof WrappingLabel) {
		((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
	}
}
 
Example #17
Source File: TextAnnotationText2EditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @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();
	}
}
 
Example #18
Source File: ScriptTaskLabelEditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @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();
	}
}
 
Example #19
Source File: InclusiveGatewayLabelEditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @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();
	}
}
 
Example #20
Source File: WrappingLabel3EditPart.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @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);
	}
}
 
Example #21
Source File: EndMessageEventLabel2EditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @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);
	}
}
 
Example #22
Source File: EndTerminatedEventLabel2EditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @generated
*/
protected void refreshStrikeThrough() {
	FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
	if (style != null && getFigure() instanceof WrappingLabel) {
		((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
	}
}
 
Example #23
Source File: StartErrorEventLabel2EditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @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();
	}
}
 
Example #24
Source File: CsvSinkNameEditPart.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @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);
	}
}
 
Example #25
Source File: IntermediateCatchTimerEventLabel2EditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @generated
*/
protected void refreshStrikeThrough() {
	FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
	if (style != null && getFigure() instanceof WrappingLabel) {
		((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
	}
}
 
Example #26
Source File: IntermediateErrorCatchEventLabel4EditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @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();
	}
}
 
Example #27
Source File: BoundaryMessageEventLabel2EditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @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);
	}
}
 
Example #28
Source File: SendTaskLabelEditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @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);
	}
}
 
Example #29
Source File: SendTaskLabel2EditPart.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @generated
*/
public void setLabel(WrappingLabel figure) {
	unregisterVisuals();
	setFigure(figure);
	defaultText = getLabelTextHelper(figure);
	registerVisuals();
	refreshVisuals();
}
 
Example #30
Source File: SourceNameEditPart.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
* @generated
*/
public void setLabel(WrappingLabel figure) {
	unregisterVisuals();
	setFigure(figure);
	defaultText = getLabelTextHelper(figure);
	registerVisuals();
	refreshVisuals();
}