Пример #1
0
  /**
   * House
   *
   * @param listener
   * @return
   */
  private Group loadPaletteImg3(Gui.Listener.EditorChoosePaletteListener listener) {
    Group pGroup = new Group();
    pGroup.setVisible(false);
    pGroup.setLayoutX(0);
    pGroup.setLayoutY(650);

    ImageView ivBorder = new ImageView(Objekte.getImgMapEditor().getSingleBorder());
    listener.setBorder(ivBorder);

    ImageView ivGrasBunch01 = new Data.Overwrite.ImageView(Objekte.getImgMap().getGrasBunch01());
    listener.setId(2, 0, 201);
    ivGrasBunch01.setLayoutX(0);
    ImageView ivGrasBunch02 = new Data.Overwrite.ImageView(Objekte.getImgMap().getGrasBunch02());
    listener.setId(2, 1, 202);
    ivGrasBunch02.setLayoutX(25);
    ImageView ivGrasFlower01 = new Data.Overwrite.ImageView(Objekte.getImgMap().getGrasFlower01());
    listener.setId(2, 2, 203);
    ivGrasFlower01.setLayoutX(50);
    ImageView ivGrasFlowerBunch01 =
        new Data.Overwrite.ImageView(Objekte.getImgMap().getGrasFlowerBunch01());
    listener.setId(2, 3, 204);
    ivGrasFlowerBunch01.setLayoutX(75);

    ivGrasBunch01.setOnMouseClicked(listener);
    ivGrasBunch02.setOnMouseClicked(listener);
    ivGrasFlower01.setOnMouseClicked(listener);
    ivGrasFlowerBunch01.setOnMouseClicked(listener);
    pGroup.getChildren().add(ivGrasBunch01);
    pGroup.getChildren().add(ivGrasBunch02);
    pGroup.getChildren().add(ivGrasFlower01);
    pGroup.getChildren().add(ivGrasFlowerBunch01);
    pGroup.getChildren().add(ivBorder);
    return pGroup;
  }
Пример #2
0
  private void loadForest() {
    Image plant01 = new Image(LoadImagesMap.class.getResourceAsStream("map\\forest\\plant01.png"));
    Objekte.getImgMap().setPlant01(plant01);
    Image zaunH01 = new Image(LoadImagesMap.class.getResourceAsStream("map\\forest\\zaunH01.png"));
    Objekte.getImgMap().setZaunH01(zaunH01);
    Image zaunV01 = new Image(LoadImagesMap.class.getResourceAsStream("map\\forest\\zaunV01.png"));
    Objekte.getImgMap().setZaunV01(zaunV01);
    Image zaunOL_UR01 =
        new Image(LoadImagesMap.class.getResourceAsStream("map\\forest\\zaunOL_UR01.png"));
    Objekte.getImgMap().setZaunOL_UR01(zaunOL_UR01);
    Image zaunUL_OR01 =
        new Image(LoadImagesMap.class.getResourceAsStream("map\\forest\\zaunUL_OR01.png"));
    Objekte.getImgMap().setZaunUL_OR01(zaunUL_OR01);
    Image zaunOM_RM01 =
        new Image(LoadImagesMap.class.getResourceAsStream("map\\forest\\zaunOM_RM01.png"));
    Objekte.getImgMap().setZaunOM_RM01(zaunOM_RM01);
    Image zaunLM_UM01 =
        new Image(LoadImagesMap.class.getResourceAsStream("map\\forest\\zaunLM_UM01.png"));
    Objekte.getImgMap().setZaunLM_UM01(zaunLM_UM01);

    Image crystal_kl =
        new Image(LoadImagesMap.class.getResourceAsStream("map\\forest\\crystal_kl.png"));
    Objekte.getImgMap().setCrystal_kl(crystal_kl);

    Image tree01 = new Image(LoadImagesMap.class.getResourceAsStream("map\\forest\\tree01.png"));
    Objekte.getImgMap().setTree01(tree01);
  }
Пример #3
0
 private void loadGroundEnv() {
   Image grasBunch01 =
       new Image(LoadImagesMap.class.getResourceAsStream("map\\gEnv\\grasBunch01.png"));
   Objekte.getImgMap().setGrasBunch01(grasBunch01);
   Image grasBunch02 =
       new Image(LoadImagesMap.class.getResourceAsStream("map\\gEnv\\grasBunch02.png"));
   Objekte.getImgMap().setGrasBunch02(grasBunch02);
   Image grasFlower01 =
       new Image(LoadImagesMap.class.getResourceAsStream("map\\gEnv\\grasFlower01.png"));
   Objekte.getImgMap().setGrasFlower01(grasFlower01);
   Image grasFlowerBunch01 =
       new Image(LoadImagesMap.class.getResourceAsStream("map\\gEnv\\grasFlowerBunch01.png"));
   Objekte.getImgMap().setGrasFlowerBunch01(grasFlowerBunch01);
 }
Пример #4
0
  private void loadGround() {
    Image gras = new Image(LoadImagesMap.class.getResourceAsStream("map\\ground\\gras.png"));
    Objekte.getImgMap().setGras(gras);

    Image groundWalk01 =
        new Image(LoadImagesMap.class.getResourceAsStream("map\\ground\\groundWalk01.png"));
    Objekte.getImgMap().setGroundWalk01(groundWalk01);

    Image groundWalkRB01 =
        new Image(LoadImagesMap.class.getResourceAsStream("map\\ground\\groundWalkRB01.png"));
    Objekte.getImgMap().setGroundWalkRB01(groundWalkRB01);
    Image groundWalkRT01 =
        new Image(LoadImagesMap.class.getResourceAsStream("map\\ground\\groundWalkRT01.png"));
    Objekte.getImgMap().setGroundWalkRT01(groundWalkRT01);
    Image groundWalkRR01 =
        new Image(LoadImagesMap.class.getResourceAsStream("map\\ground\\groundWalkRR01.png"));
    Objekte.getImgMap().setGroundWalkRR01(groundWalkRR01);
    Image groundWalkRL01 =
        new Image(LoadImagesMap.class.getResourceAsStream("map\\ground\\groundWalkRL01.png"));
    Objekte.getImgMap().setGroundWalkRL01(groundWalkRL01);

    Image groundWalkOL_UR_L =
        new Image(LoadImagesMap.class.getResourceAsStream("map\\ground\\groundWalkOL_UR_L.png"));
    Objekte.getImgMap().setGroundWalkOL_UR_L(groundWalkOL_UR_L);
    Image groundWalkOL_UR_R =
        new Image(LoadImagesMap.class.getResourceAsStream("map\\ground\\groundWalkOL_UR_R.png"));
    Objekte.getImgMap().setGroundWalkOL_UR_R(groundWalkOL_UR_R);
    Image groundWalkUL_OR_L =
        new Image(LoadImagesMap.class.getResourceAsStream("map\\ground\\groundWalkUL_OR_L.png"));
    Objekte.getImgMap().setGroundWalkUL_OR_L(groundWalkUL_OR_L);
    Image groundWalkUL_OR_R =
        new Image(LoadImagesMap.class.getResourceAsStream("map\\ground\\groundWalkUL_OR_R.png"));
    Objekte.getImgMap().setGroundWalkUL_OR_R(groundWalkUL_OR_R);

    Image groundWalkE_B =
        new Image(LoadImagesMap.class.getResourceAsStream("map\\ground\\groundWalkE_B.png"));
    Objekte.getImgMap().setGroundWalkE_B(groundWalkE_B);
    Image groundWalkE_T =
        new Image(LoadImagesMap.class.getResourceAsStream("map\\ground\\groundWalkE_T.png"));
    Objekte.getImgMap().setGroundWalkE_T(groundWalkE_T);
    Image groundWalkE_R =
        new Image(LoadImagesMap.class.getResourceAsStream("map\\ground\\groundWalkE_R.png"));
    Objekte.getImgMap().setGroundWalkE_R(groundWalkE_R);
    Image groundWalkE_L =
        new Image(LoadImagesMap.class.getResourceAsStream("map\\ground\\groundWalkE_L.png"));
    Objekte.getImgMap().setGroundWalkE_L(groundWalkE_L);
  }
Пример #5
0
  /**
   * Forest
   *
   * @param listener
   * @return
   */
  private Group loadPaletteImg2(Gui.Listener.EditorChoosePaletteListener listener) {
    Group pGroup = new Group();
    pGroup.setVisible(false);
    pGroup.setLayoutX(0);
    pGroup.setLayoutY(650);

    ImageView ivBorder = new ImageView(Objekte.getImgMapEditor().getSingleBorderHover());
    listener.setBorder(ivBorder);

    ImageView ivPlant01 = new Data.Overwrite.ImageView(Objekte.getImgMap().getPlant01());
    listener.setId(1, 0, 101);
    ImageView ivZaunH01 = new Data.Overwrite.ImageView(Objekte.getImgMap().getZaunH01());
    listener.setId(1, 1, 102);
    ivZaunH01.setLayoutX(25);
    ImageView ivZaunV01 = new Data.Overwrite.ImageView(Objekte.getImgMap().getZaunV01());
    listener.setId(1, 2, 103);
    ivZaunV01.setLayoutX(50);
    ImageView ivZaunOL_UR01 = new Data.Overwrite.ImageView(Objekte.getImgMap().getZaunOL_UR01());
    listener.setId(1, 3, 104);
    ivZaunOL_UR01.setLayoutX(75);
    ImageView ivZaunUL_OR01 = new Data.Overwrite.ImageView(Objekte.getImgMap().getZaunUL_OR01());
    listener.setId(1, 4, 105);
    ivZaunUL_OR01.setLayoutX(100);
    ImageView ivZaunOM_RM01 = new Data.Overwrite.ImageView(Objekte.getImgMap().getZaunOM_RM01());
    listener.setId(1, 5, 106);
    ivZaunOM_RM01.setLayoutX(125);
    ImageView ivZaunLM_UM01 = new Data.Overwrite.ImageView(Objekte.getImgMap().getZaunLM_UM01());
    listener.setId(1, 6, 107);
    ivZaunLM_UM01.setLayoutX(150);

    ImageView ivCrystal_kl = new Data.Overwrite.ImageView(Objekte.getImgMap().getCrystal_kl());
    listener.setId(1, 7, 120);
    ivCrystal_kl.setLayoutX(175);

    ImageView ivTree01 = new Data.Overwrite.ImageView(Objekte.getImgMap().getTree01());
    listener.setId(1, 8, 150);
    ivTree01.setLayoutX(200);

    // listener
    ivPlant01.setOnMouseClicked(listener);
    ivZaunH01.setOnMouseClicked(listener);
    ivZaunV01.setOnMouseClicked(listener);
    ivZaunOL_UR01.setOnMouseClicked(listener);
    ivZaunUL_OR01.setOnMouseClicked(listener);
    ivZaunOM_RM01.setOnMouseClicked(listener);
    ivZaunLM_UM01.setOnMouseClicked(listener);

    ivCrystal_kl.setOnMouseClicked(listener);

    ivTree01.setOnMouseClicked(listener);

    // group
    pGroup.getChildren().add(ivPlant01);
    pGroup.getChildren().add(ivZaunH01);
    pGroup.getChildren().add(ivZaunV01);
    pGroup.getChildren().add(ivZaunOL_UR01);
    pGroup.getChildren().add(ivZaunUL_OR01);
    pGroup.getChildren().add(ivZaunOM_RM01);
    pGroup.getChildren().add(ivZaunLM_UM01);
    pGroup.getChildren().add(ivBorder);

    pGroup.getChildren().add(ivCrystal_kl);

    pGroup.getChildren().add(ivTree01);
    return pGroup;
  }
Пример #6
0
  /**
   * Ground
   *
   * @param listener
   * @return
   */
  private Group loadPaletteImg1(Gui.Listener.EditorChoosePaletteListener listener) {
    Group pGroup = new Group();
    pGroup.setVisible(false);
    pGroup.setLayoutX(0);
    pGroup.setLayoutY(650);

    ImageView ivBorder = new ImageView(Objekte.getImgMapEditor().getSingleBorder());
    listener.setBorder(ivBorder);

    ImageView gras01 = new Data.Overwrite.ImageView(Objekte.getImgMap().getGras());
    listener.setId(0, 0, 1);
    gras01.setLayoutX(0);

    ImageView groundWalk01 = new Data.Overwrite.ImageView(Objekte.getImgMap().getGroundWalk01());
    listener.setId(0, 1, 20);
    groundWalk01.setLayoutX(25);
    ImageView groundWalkRB01 =
        new Data.Overwrite.ImageView(Objekte.getImgMap().getGroundWalkRB01());
    listener.setId(0, 2, 21);
    groundWalkRB01.setLayoutX(50);
    ImageView groundWalkRT01 =
        new Data.Overwrite.ImageView(Objekte.getImgMap().getGroundWalkRT01());
    listener.setId(0, 3, 22);
    groundWalkRT01.setLayoutX(75);
    ImageView groundWalkRR01 =
        new Data.Overwrite.ImageView(Objekte.getImgMap().getGroundWalkRR01());
    listener.setId(0, 4, 23);
    groundWalkRR01.setLayoutX(100);
    ImageView groundWalkRL01 =
        new Data.Overwrite.ImageView(Objekte.getImgMap().getGroundWalkRL01());
    listener.setId(0, 5, 24);
    groundWalkRL01.setLayoutX(125);

    ImageView groundWalkOL_UR_L =
        new Data.Overwrite.ImageView(Objekte.getImgMap().getGroundWalkOL_UR_L());
    listener.setId(0, 6, 25);
    groundWalkOL_UR_L.setLayoutX(150);
    ImageView groundWalkOL_UR_R =
        new Data.Overwrite.ImageView(Objekte.getImgMap().getGroundWalkOL_UR_R());
    listener.setId(0, 7, 26);
    groundWalkOL_UR_R.setLayoutX(175);
    ImageView groundWalkUL_OR_L =
        new Data.Overwrite.ImageView(Objekte.getImgMap().getGroundWalkUL_OR_L());
    listener.setId(0, 8, 27);
    groundWalkUL_OR_L.setLayoutX(200);
    ImageView groundWalkUL_OR_R =
        new Data.Overwrite.ImageView(Objekte.getImgMap().getGroundWalkUL_OR_R());
    listener.setId(0, 9, 28);
    groundWalkUL_OR_R.setLayoutX(225);

    ImageView groundWalkE_B = new Data.Overwrite.ImageView(Objekte.getImgMap().getGroundWalkE_B());
    listener.setId(0, 10, 29);
    groundWalkE_B.setLayoutX(250);
    ImageView groundWalkE_T = new Data.Overwrite.ImageView(Objekte.getImgMap().getGroundWalkE_T());
    listener.setId(0, 11, 30);
    groundWalkE_T.setLayoutX(275);
    ImageView groundWalkE_R = new Data.Overwrite.ImageView(Objekte.getImgMap().getGroundWalkE_R());
    listener.setId(0, 12, 31);
    groundWalkE_R.setLayoutX(300);
    ImageView groundWalkE_L = new Data.Overwrite.ImageView(Objekte.getImgMap().getGroundWalkE_L());
    listener.setId(0, 13, 32);
    groundWalkE_L.setLayoutX(325);

    // Listener
    gras01.setOnMouseClicked(listener);

    groundWalk01.setOnMouseClicked(listener);
    groundWalkRB01.setOnMouseClicked(listener);
    groundWalkRT01.setOnMouseClicked(listener);
    groundWalkRR01.setOnMouseClicked(listener);
    groundWalkRL01.setOnMouseClicked(listener);

    groundWalkOL_UR_L.setOnMouseClicked(listener);
    groundWalkOL_UR_R.setOnMouseClicked(listener);
    groundWalkUL_OR_L.setOnMouseClicked(listener);
    groundWalkUL_OR_R.setOnMouseClicked(listener);

    groundWalkE_B.setOnMouseClicked(listener);
    groundWalkE_T.setOnMouseClicked(listener);
    groundWalkE_R.setOnMouseClicked(listener);
    groundWalkE_L.setOnMouseClicked(listener);

    // Gruppe adden
    pGroup.getChildren().add(gras01);

    pGroup.getChildren().add(groundWalk01);
    pGroup.getChildren().add(groundWalkRB01);
    pGroup.getChildren().add(groundWalkRT01);
    pGroup.getChildren().add(groundWalkRR01);
    pGroup.getChildren().add(groundWalkRL01);

    pGroup.getChildren().add(groundWalkOL_UR_L);
    pGroup.getChildren().add(groundWalkOL_UR_R);
    pGroup.getChildren().add(groundWalkUL_OR_L);
    pGroup.getChildren().add(groundWalkUL_OR_R);

    pGroup.getChildren().add(groundWalkE_B);
    pGroup.getChildren().add(groundWalkE_T);
    pGroup.getChildren().add(groundWalkE_R);
    pGroup.getChildren().add(groundWalkE_L);

    pGroup.getChildren().add(ivBorder);
    return pGroup;
  }