/** * Moves this layer one level up. * * @return Layer */ @SuppressWarnings("unchecked") @Override public Layer moveUp() { Node<?> parent = getParent(); if (null != parent) { IContainer<Layer> container = (IContainer<Layer>) parent.asContainer(); if (null != container) { container.moveUp(this); } } return this; }
/** * Moves this layer one level down. * * @return Layer */ @SuppressWarnings("unchecked") @Override public Layer moveDown() { Node<?> parent = getParent(); if (null != parent) { IContainer<Layer> container = (IContainer<Layer>) parent.asContainer(); if (null != container) { container.moveDown(this); } } return this; }
/** * Moves this layer to the top of the layer stack. * * @return Layer */ @SuppressWarnings("unchecked") @Override public Layer moveToTop() { Node<?> parent = getParent(); if (null != parent) { IContainer<Layer> container = (IContainer<Layer>) parent.asContainer(); if (null != container) { container.moveToTop(this); } } return this; }
/** * Moves this layer to the bottom of the layer stack. * * @return Layer */ @SuppressWarnings("unchecked") @Override public Layer moveToBottom() { Node<?> parent = getParent(); if (null != parent) { IContainer<Layer> container = (IContainer<Layer>) parent.asContainer(); if (null != container) { container.moveToBottom(this); } } return this; }
@Override public void onPictureLoaded(Picture picture) { Layer layer; if ((layer = picture.getLayer()) != null) { if (layer.getParent() != null) { LayerRedrawManager.get().schedule(layer); } } } });