use of com.ait.lienzo.client.core.shape.Layer in project drools-wb by kiegroup.
the class NodeLabel method setLabel.
public void setLabel(final String label) {
final Layer scratchLayer = new Layer();
final LienzoPanel scratchPanel = new LienzoPanel(100, 100);
scratchPanel.add(scratchLayer);
text.setText(label);
final TextMetrics tm = text.measure(scratchLayer.getContext());
final double cw = tm.getWidth() + 10;
final double ch = tm.getHeight() + 10;
container.setWidth(cw);
container.setHeight(ch);
container.setLocation(new Point2D(-cw / 2, -ch / 2));
}
use of com.ait.lienzo.client.core.shape.Layer in project lienzo-core by ahome-it.
the class ImageProxy method setColorKey.
public final void setColorKey(final String ckey) {
if (null == ckey) {
m_k_color = ckey;
m_ignores = new ClearFilter();
} else if (false == ckey.equals(m_k_color)) {
m_k_color = ckey;
m_ignores = new RGBIgnoreAlphaImageDataFilter(m_k_color);
} else {
return;
}
if (isLoaded()) {
doFiltering(m_filterImage, m_selectImage, m_ignores);
if (m_image.isVisible()) {
final Layer layer = m_image.getLayer();
if (null != layer) {
layer.batch();
}
}
}
}
Aggregations