Package flyingdiamond.view.uicomponent

Examples of flyingdiamond.view.uicomponent.ArticleLabel


    articleMatrixPanel.setLayout(new GridLayout(ArticleMatrix.HEIGHT,ArticleMatrix.WIDTH));
    for(int i=ArticleMatrix.HEIGHT-1;i>=0;i--){
      for(int j=0;j<ArticleMatrix.WIDTH;j++){
        final int r = i;
        final int c = j;
        articleLabels[i][j]= new ArticleLabel(i,j);
        articleLabels[i][j].setPreferredSize(new Dimension(35,35));
        articleLabels[i][j].addMouseListener(this);
        articleLabels[i][j].addMouseMotionListener(this);
        articleMatrixPanel.add(articleLabels[i][j]);
      }
View Full Code Here


      //If during model's work,the UI need fresh,such like:view's update method which
      //call by notifyview methods,we then put the UI work in EDT!See update mehtod!
      new Thread() {
        @Override
        public void run() {
          ArticleLabel label = (ArticleLabel) e.getSource();       
          gameRunningController.removeActivatedArticles();
          //If last remove action make level passed,do not activate again!
          gameRunningController.activateArticle(label.getRow(), label.getCol());
        }
      }.start();
     
    }
  }
View Full Code Here

      //If during model's work,the UI need fresh,such like:view's update method which
      //call by notifyview methods,we then put the UI work in EDT!See update mehtod!
      new Thread() {
        @Override
        public void run() {
          ArticleLabel label = (ArticleLabel) e.getSource();
          gameRunningController.activateArticle(label.getRow(), label.getCol());
        }
      }.start();
    }
  }
View Full Code Here

TOP

Related Classes of flyingdiamond.view.uicomponent.ArticleLabel

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.