本文整理了Java中com.ait.lienzo.client.core.shape.Text.getText()
方法的一些代码示例,展示了Text.getText()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Text.getText()
方法的具体详情如下:
包路径:com.ait.lienzo.client.core.shape.Text
类名称:Text
方法名:getText
[英]Returns the Text String
[中]返回文本字符串
代码示例来源:origin: ahome-it/lienzo-core
@Override
public String get()
{
return text.getText();
}
}, new Supplier<Double>()
代码示例来源:origin: org.dashbuilder/dashbuilder-lienzo-core
@Override
public BoundingBox getBoundingBox()
{
return getBoundingBox(getText(), getFontSize(), getFontStyle(), getFontFamily(), getTextUnit(), getTextBaseLine(), getTextAlign());
}
代码示例来源:origin: kiegroup/appformer
text.setText("Text");
bounding = new Text(text.getText(),
text.getFontFamily(),
text.getFontSize());
代码示例来源:origin: com.ahome-it/lienzo-core
final String text = getText();
代码示例来源:origin: ahome-it/lienzo-core
@Override
public String get()
{
return text.getText();
}
}, new Supplier<Double>()
代码示例来源:origin: ahome-it/lienzo-core
final String text = getText();
代码示例来源:origin: com.ahome-it/lienzo-core
@Override
public String get()
{
return text.getText();
}
}, new Supplier<Double>()
代码示例来源:origin: org.dashbuilder/dashbuilder-lienzo-core
final String text = getText();
代码示例来源:origin: kiegroup/appformer
public String getText() {
return text.getText();
}
代码示例来源:origin: ahome-it/lienzo-core
final String text = getText();
代码示例来源:origin: org.uberfire/uberfire-wires-core-scratchpad
public String getText() {
return text.getText();
}
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-lienzo
private boolean hasText() {
final String text = this.text.getText();
return null != text && text.trim().length() > 0;
}
代码示例来源:origin: org.dashbuilder/dashbuilder-lienzo-charts
@Override
public void onNodeMouseEnter(NodeMouseEnterEvent event) {
GWT.log("label mouse enter at " + label.getLabel().getText());
highlight(label, text, cutText, originalRotation);
}
});
代码示例来源:origin: org.dashbuilder/dashbuilder-lienzo-charts
@Override
public void onNodeMouseExit(NodeMouseExitEvent event) {
GWT.log("label mouse exit at " + label.getLabel().getText());
unhighlight(label, text, cutText, originalRotation);
}
});
代码示例来源:origin: org.dashbuilder/dashbuilder-lienzo-charts
/**
* Formats the label Text shapes in the given axis by cutting text value.
*/
private void cut(BarChartLabel label, double maxWidth, double maxHeight, double rotation)
{
String text = label.getLabel().getText();
// Cut text.
cutLabelText(label, maxWidth - 5, maxHeight - 5, rotation);
String cutText = label.getLabel().getText();
// If text is cut, add suffix characters.
if (text.length() != cutText.length()) {
label.getLabel().setText(label.getLabel().getText() + "...");
}
// TODO: Animate.
// animate(label, text, cutText, originalRotation);
// Move label to top.
label.getLabelContainer().moveToTop();
}
代码示例来源:origin: com.ahome-it/lienzo-charts
/**
* Formats the label Text shapes in the given axis by cutting text value.
*/
private void cut(XYChartLabel label, double maxWidth, double maxHeight, double rotation)
{
String text = label.getLabel().getText();
// Cut text.
cutLabelText(label, maxWidth - 5, maxHeight - 5, rotation);
String cutText = label.getLabel().getText();
// If text is cut, add suffix characters.
if (text.length() != cutText.length())
{
label.getLabel().setText(label.getLabel().getText() + "...");
}
// TODO: Animate.
// animate(label, text, cutText, originalRotation);
// Move label to top.
label.getLabelContainer().moveToTop();
}
代码示例来源:origin: org.dashbuilder/dashbuilder-lienzo-charts
private void cutLabelText(BarChartLabel label, double maxWidth, double maxHeight, double rotation) {
String text = label.getLabel().getText();
if (text != null && text.length() > 1 && label.getLabel().getBoundingBox().getWidth() > maxWidth) {
int cutLength = text.length() - 2;
String cuttedText = text.substring(0, cutLength);
label.getLabel().setText(cuttedText);
cutLabelText(label, maxWidth, maxHeight, rotation);
}
if (text != null && rotation > 0 && text.length() > 1 && label.getLabel().getBoundingBox().getHeight() > maxHeight) {
int cutLength = text.length() - 2;
String cuttedText = text.substring(0, cutLength);
label.getLabel().setText(cuttedText);
cutLabelText(label, maxWidth, maxHeight, rotation);
}
}
代码示例来源:origin: com.ahome-it/lienzo-charts
private void cutLabelText(XYChartLabel label, double maxWidth, double maxHeight, double rotation)
{
String text = label.getLabel().getText();
if (text != null && text.length() > 1 && label.getLabel().getBoundingBox().getWidth() > maxWidth)
{
int cutLength = text.length() - 2;
String cuttedText = text.substring(0, cutLength);
label.getLabel().setText(cuttedText);
cutLabelText(label, maxWidth, maxHeight, rotation);
}
if (text != null && rotation > 0 && text.length() > 1 && label.getLabel().getBoundingBox().getHeight() > maxHeight)
{
int cutLength = text.length() - 2;
String cuttedText = text.substring(0, cutLength);
label.getLabel().setText(cuttedText);
cutLabelText(label, maxWidth, maxHeight, rotation);
}
}
代码示例来源:origin: kiegroup/appformer
@Override
public void onNodeMouseDoubleClick(final NodeMouseDoubleClickEvent nodeMouseDoubleClickEvent) {
editTextBox.setText(text.getText());
editTextBox.getElement().getStyle().setPosition(Style.Position.FIXED);
editTextBox.getElement().getStyle().setLeft(getX() + getLayer().getCanvasElement().getAbsoluteLeft(),
Style.Unit.PX);
editTextBox.getElement().getStyle().setTop(getY() + getLayer().getCanvasElement().getAbsoluteTop(),
Style.Unit.PX);
RootPanel.get().add(editTextBox);
editTextBox.setFocus(true);
}
});
代码示例来源:origin: org.uberfire/uberfire-wires-core-scratchpad
@Override
public void onNodeMouseDoubleClick(final NodeMouseDoubleClickEvent nodeMouseDoubleClickEvent) {
editTextBox.setText(text.getText());
editTextBox.getElement().getStyle().setPosition(Style.Position.FIXED);
editTextBox.getElement().getStyle().setLeft(getX() + getLayer().getCanvasElement().getAbsoluteLeft(),
Style.Unit.PX);
editTextBox.getElement().getStyle().setTop(getY() + getLayer().getCanvasElement().getAbsoluteTop(),
Style.Unit.PX);
RootPanel.get().add(editTextBox);
editTextBox.setFocus(true);
}
});
内容来源于网络,如有侵权,请联系作者删除!