Package it.freedomotic.model.environment

Examples of it.freedomotic.model.environment.Zone


    public Canvas getCanvas() {
        return canvas;
    }

    public void fitArea() {
        Zone room = dr.getRoomObject();
        FreedomPolygon poly = room.getShape();
        Path2D envPath = new Path2D.Double();
        envPath = DrawingUtils.freedomPolygonToPath(poly);
        Rectangle2D bounds = envPath.getBounds2D();
        xScale = (CANVAS_WIDTH - (BORDER_X * 4)) / bounds.getWidth();
        yScale = (CANVAS_HEIGHT - (BORDER_Y * 4)) / bounds.getHeight();
View Full Code Here


        }
    }//GEN-LAST:event_mnuRenameRoomActionPerformed

    private void mnuAddRoomActionPerformed(java.awt.event.ActionEvent evt)    {//GEN-FIRST:event_mnuAddRoomActionPerformed

        Zone z = new Zone();
        z.init();
        z.setName(I18n.msg("room") + Math.random());

        Room room = new Room(z);
        room.getPojo().setTexture((new File(Info.getResourcesPath() + "/wood.jpg")).getName());
        room.init(drawer.getCurrEnv());
        drawer.getCurrEnv().addRoom(room);
View Full Code Here

    @RequiresPermissions({"environments:update", "zones:create"})
    public void addRoom(ZoneLogic zone) {
        //null and duplicate check
        if (zone == null) {
            zone = new ZoneLogic(new Zone());
        }

        if (zones.contains(zone)) {
            Freedomotic.logger.warning("Attempt to add a null or already existent room");
View Full Code Here

TOP

Related Classes of it.freedomotic.model.environment.Zone

Copyright © 2018 www.massapicom. 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.