Package net.cis.client.game.ui.hud.ctrl

Source Code of net.cis.client.game.ui.hud.ctrl.PEDraggableControl

/**
*
*/
package net.cis.client.game.ui.hud.ctrl;

import net.cis.client.game.ui.util.Property;
import net.cis.client.game.ui.util.ResourceConstants;
import de.lessvoid.nifty.controls.dragndrop.DraggableControl;

/**
* @author SchaeckerM PropertyExtendedDraggableControl which stores after Drag its new Position to the UserProperties.
* @see DraggableControl
*/
public class PEDraggableControl extends DraggableControl {

  @Override
  public void dragStop() {
    super.dragStop();
    ResourceConstants.storeUIProperties(
        new Property(getElement().getId() + ".x", Integer.toString(getElement().getX())),
        new Property(getElement().getId() + ".y", Integer.toString(getElement().getY())),
        new Property(getElement().getId() + ".length", Integer.toString(getElement().getY() + getElement().getHeight())));
  }
}
TOP

Related Classes of net.cis.client.game.ui.hud.ctrl.PEDraggableControl

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.