Examples of DTPicture


Examples of client.views.swing.common.DTPicture

    }

    @Override
    public void tileMovedFromRackToRackWithShift(TileFromRackToRackWithShiftEvent event) {
        panelRack sourceParent = (panelRack) rack.getInnerRack().getComponent(event.getSourcePosition());
        DTPicture DTPtmp = (DTPicture) sourceParent.getComponent(0);
        rack.shiftTiles(event.getSourcePosition(), event.getTargetPosition());
        panelRack targetParent = (panelRack) rack.getInnerRack().getComponent(event.getTargetPosition());
        targetParent.addDTElement(DTPtmp);
    }
View Full Code Here

Examples of client.views.swing.common.DTPicture

    /**
     * * Method used to load tiles on rack **
     */
    public void loadTilesOnRack(String[][] newTiles, Game scrabble, JLayeredPane jlp) {
        for (int i = 0; i < newTiles.length; i++) {
            putTile(new DTPicture(getTileImage(newTiles[i][0], newTiles[i][1]), scrabble, jlp));
        }
    }
View Full Code Here

Examples of client.views.swing.common.DTPicture

     * located on the target position for drop the dragged tile.
     *
     * @param posStart, posStop
     */
    protected void shiftTiles(int startPos, int stopPos) {
        DTPicture DTPtmp = null;
        // STEP 1 : Check the direction of shift and set index
        int DEC = (startPos - stopPos < 0) ? 1 : -1;

        // STEP 2 : Save the first element in a temp variable
        panelRack tmpParent = (panelRack) innerRack.getComponent(startPos);
View Full Code Here
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.