Search in sources :

Example 1 with IDockingAcceptor

use of com.ait.lienzo.client.core.shape.wires.IDockingAcceptor in project lienzo-core by ahome-it.

the class WiresDockingControlImpl method isAllow.

@Override
public boolean isAllow() {
    final WiresLayer layer = getParentPickerControl().getWiresLayer();
    final WiresManager wiresManager = layer.getWiresManager();
    final IDockingAcceptor dockingAcceptor = wiresManager.getDockingAcceptor();
    return !isEnabled() || ((null != getParent()) && (null != getParentShapePart()) && (getParent() instanceof WiresShape) && (getParentShapePart() == PickerPart.ShapePart.BORDER) && (dockingAcceptor.dockingAllowed(getParent(), getShape())));
}
Also used : WiresShape(com.ait.lienzo.client.core.shape.wires.WiresShape) IDockingAcceptor(com.ait.lienzo.client.core.shape.wires.IDockingAcceptor) WiresManager(com.ait.lienzo.client.core.shape.wires.WiresManager) WiresLayer(com.ait.lienzo.client.core.shape.wires.WiresLayer)

Example 2 with IDockingAcceptor

use of com.ait.lienzo.client.core.shape.wires.IDockingAcceptor in project lienzo-core by ahome-it.

the class WiresDockingControlImpl method _isAccept.

private boolean _isAccept() {
    final WiresLayer layer = getParentPickerControl().getWiresLayer();
    final WiresManager wiresManager = layer.getWiresManager();
    final IDockingAcceptor dockingAcceptor = wiresManager.getDockingAcceptor();
    return (null != getParent()) && (null != getParentShapePart()) && (getParentShapePart() == PickerPart.ShapePart.BORDER) && dockingAcceptor.acceptDocking(getParent(), getShape());
}
Also used : IDockingAcceptor(com.ait.lienzo.client.core.shape.wires.IDockingAcceptor) WiresManager(com.ait.lienzo.client.core.shape.wires.WiresManager) WiresLayer(com.ait.lienzo.client.core.shape.wires.WiresLayer)

Aggregations

IDockingAcceptor (com.ait.lienzo.client.core.shape.wires.IDockingAcceptor)2 WiresLayer (com.ait.lienzo.client.core.shape.wires.WiresLayer)2 WiresManager (com.ait.lienzo.client.core.shape.wires.WiresManager)2 WiresShape (com.ait.lienzo.client.core.shape.wires.WiresShape)1