Package net.alteiar.campaign.player.gui.centerViews.map.drawable

Examples of net.alteiar.campaign.player.gui.centerViews.map.drawable.MapElementDrawable


            filterChanged();
          }
        });

    for (UniqueID elementId : this.map.getElements()) {
      MapElementDrawable drawable = new MapElementDrawable(elementId);
      drawable.addDrawableListener(this);
      drawableElements.add(drawable);
    }

    this.setOpaque(false);
View Full Code Here


  @Override
  public void propertyChange(PropertyChangeEvent evt) {
    if (MapBean.METH_ADD_ELEMENT_METHOD.equals(evt.getPropertyName())) {
      final UniqueID mapElementId = ((UniqueID) evt.getNewValue());
      addDrawable(new MapElementDrawable(mapElementId));
    } else if (MapBean.PROP_FILTER_PROPERTY.equals(evt.getPropertyName())) {
      Threads.execute(new MyRunnable() {
        @Override
        public void run() {
          filterChanged();
View Full Code Here

  private boolean notifyMapElements(MouseEvent orgEvent, MouseEvent e,
      Point mapPosition) {
    boolean mapElementFound = false;

    List<MapElementDrawable> drawables = new ArrayList<MapElementDrawable>();
    MapElementDrawable selected = null;
    for (MapElementDrawable draw : drawableElements) {
      if (draw.contain(mapPosition)) {
        if (draw.isSelected()) {
          selected = draw;
        }
        if (!draw.getMapElement().isHiddenForPlayer()) {
          // if visible add it
          drawables.add(draw);
        } else if (CampaignClient.getInstance().getCurrentPlayer()
            .isDm()) {
          // if is mj add it
          drawables.add(draw);
        }
      }
    }

    if (!drawables.isEmpty()) {
      if (selected != null) {
        selected.fireMouseClicked(e);
      } else {
        selectElementDrawable(orgEvent, e, drawables);
      }
      mapElementFound = true;
    }
View Full Code Here

TOP

Related Classes of net.alteiar.campaign.player.gui.centerViews.map.drawable.MapElementDrawable

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.