SlideShare a Scribd company logo
Make a plugin of Random Clustering


               2012. 4




        http://www.mongkie.org


                                     1/33
CONTENTS

     CONTENTS
          • Objectives
          • Structure of Random Clustering Plugin
          • make a plugin
                  Package
                         – org.mongkie.clustering.plugins.random

                  Classes
                         – Random.java
                         – RandomBuilder.java
                         – RandomSettingUI.java

                  Others
                         – Bundle.properties

          • Build and Run

http://www.mongkie.org                                             2/33
Objectives

     Objectives
          • make a plugin of random clustering (add random algorithm)




                         Add Random Algorithm




http://www.mongkie.org                                                  3/33
Clutering Plugins

     Structure of Random Clustering
          • org.mongkie.clustering.plugins.random
                     Bundle.properties

                     Random.java

                     RandomBuilder.java

                     RandomSettingUI.java
                Clustering API                      Clustering Plugins                                 Clustering Plugins
          org.mongkie.clustering        org.mongkie.clustering.plugins                           org.mongkie.ui.clustering
          -ClusteringController                                                                  -ClusteringTopComponent
          -CluteringModel               org.mongkie.clustering.plugins.clustermaker
          -ClusteringModelListener                                                               org.mongkie.ui.clustering.explorer
          -DefaultClusterImpl           org.mongkie.clustering.plugins.clustermaker.converters   -ClusterChildFactory
                                                                                                 -ClusterNode
          org.mongkie.clustering.impl   org.mongkie.clustering.plugins.clustermaker.mcl          -ClusteringResultView
          -ClusteringControllerImpl
          -ClusteringModelImpl          org.mongkie.clustering.plugins.mcl                       org.mongkie.ui.clustering.explorer.actions
                                                                                                 -GroupAction
          org.mongkie.clustering.spi    org.mongkie.clustering.plugins.mcode                     -UngroupAction
          -Cluster
          -Clustering                                                                            org.mongkie.ui.clustering.resources
          -CluteringBuilder                                                                      - Image Files



http://www.mongkie.org                                                                                                                        4/33
Make a plugin - Package

     [New] –[Java Package]




http://www.mongkie.org        5/33
Make a plugin - Package

     Create a random pacakge
          • org.mongkie.clustering.plugins.random




http://www.mongkie.org                              6/33
Make a plugin - Package

     Create a random pacakge
          • org.mongkie.clustering.plugins.random




http://www.mongkie.org                              7/33
Make a plugin - Random

     Create a random class
          • Random.java




http://www.mongkie.org        8/33
Make a plugin - Random

     Create a random class
          • Random.java




http://www.mongkie.org        9/33
Make a plugin - Random

     Create a random class
          • Random.java




http://www.mongkie.org        10/33
Make a plugin - Random

     Random.java
          • Source Code

         package org.mongkie.clustering.plugins.random;

         import java.util.ArrayList;
         import java.util.Collection;
         import java.util.Collections;
         import java.util.Iterator;
         import java.util.List;
         import org.mongkie.clustering.spi.Cluster;
         import org.mongkie.clustering.DefaultClusterImpl;
         import org.mongkie.clustering.spi.Clustering;
         import org.mongkie.clustering.spi.ClusteringBuilder;
         import org.openide.util.Exceptions;
         import prefuse.data.Graph;
         import prefuse.data.Node;




http://www.mongkie.org                                          11/33
Make a plugin - Random

     Random.java
          • implements
                  Clustering

          • variables (global)
                  private final RandomBuilder builder;

                  private int clusterSize;

                  static final int MIN_CLUSTER_SIZE = 3;

                  private List<Cluster> clusters = new ArrayList<Cluster>();

          • Constructor
                Random(RandomBuilder builder) {
                  this.builder = builder;
                  this.clusterSize = MIN_CLUSTER_SIZE;
                }

http://www.mongkie.org                                                          12/33
Make a plugin - Random

     Random.java
              • source code
        public void execute(Graph g) {
            clearClusters();
            List<Node> nodes = new ArrayList<Node>(g.getNodeCount());
            Iterator<Node> nodesIter = g.nodes();
            while (nodesIter.hasNext()) {
                Node n = nodesIter.next();
                nodes.add(n);
            }
            Collections.shuffle(nodes);
            int i = 1, j = 1;
            DefaultClusterImpl c = new DefaultClusterImpl(g, "Random " + j);
            c.setRank(j - 1);
            for (Node n : nodes) {
                c.addNode(n);
                if (i >= clusterSize) {
                    clusters.add(c);
                    c = new DefaultClusterImpl(g, "Random " + ++j);
                    c.setRank(j - 1);
                    i = 1;
                } else {
                    i++;
                }
            }
            if (c.getNodesCount() > 0) {
                clusters.add(c);
            }

              try {
                 synchronized (this) {
                    wait(1000);
                 }
              } catch (InterruptedException ex) {
                 Exceptions.printStackTrace(ex);
              }
          }


http://www.mongkie.org                                                         13/33
Make a plugin - Random

     Random.java
           • source code
        int getClusterSize() {
             return clusterSize;
          }

        void setClusterSize(int clusterSize) {
            this.clusterSize = clusterSize < MIN_CLUSTER_SIZE ? MIN_CLUSTER_SIZE : clusterSize;
          }

        public boolean cancel() {
            synchronized (this) {
               clearClusters();
               notifyAll();
            }
            return true;
          }

          @Override
          public Collection<Cluster> getClusters() {
            return clusters;
          }

          @Override
          public void clearClusters() {
            clusters.clear();
          }

          @Override
          public ClusteringBuilder getBuilder() {
            return builder;
          }




http://www.mongkie.org                                                                            14/33
Make a plugin - RandomBuilder

     RandomBuilder.java




http://www.mongkie.org            15/33
Make a plugin - RandomBuilder

     RandomBuilder




http://www.mongkie.org            16/33
Make a plugin - RandomBuilder

     RandomBuilder




http://www.mongkie.org            17/33
Make a plugin - RandomBuilder

     RandomBuilder




http://www.mongkie.org            18/33
Make a plugin - RandomBuilder

     RandomBuilder
          • implements
                  ClusteringBuilder

          • variable(Global)
                  private final Random random = new Random(this);

                  private final SettingUI settings = new RandomSettingUI();




http://www.mongkie.org                                                         19/33
Make a plugin - RandomBuilder

     RandomBuilder
           • source code
        package org.mongkie.clustering.plugins.random;

        import org.mongkie.clustering.spi.Clustering;
        import org.mongkie.clustering.spi.ClusteringBuilder;
        import org.mongkie.clustering.spi.ClusteringBuilder.SettingUI;
        import org.openide.util.NbBundle;
        import org.openide.util.lookup.ServiceProvider;




http://www.mongkie.org                                                   20/33
Make a plugin - RandomBuilder

     RandomBuilder
             • source code
        @ServiceProvider(service = ClusteringBuilder.class)
        public class RandomBuilder implements ClusteringBuilder {

            private final Random random = new Random(this);
            private final SettingUI settings = new RandomSettingUI();

            @Override
            public Clustering getClustering() {
              return random;
            }

            @Override
            public String getName() {
              return NbBundle.getMessage(RandomBuilder.class, "name");
            }

            @Override
            public String getDescription() {
              return NbBundle.getMessage(RandomBuilder.class, "description");
            }

            @Override
            public SettingUI getSettingUI() {
              return settings;
            }

            @Override
            public String toString() {
              return getName();
            }
        }




http://www.mongkie.org                                                          21/33
Make a plugin - RandomSettingUI

     RandomSettingUI




http://www.mongkie.org              22/33
Make a plugin - RandomSettingUI

     RandomSettingUI




http://www.mongkie.org              23/33
Make a plugin - RandomSettingUI

     RandomSettingUI




http://www.mongkie.org              24/33
Make a plugin - RandomSettingUI

     RandomSettingUI




http://www.mongkie.org              25/33
Make a plugin - RandomSettingUI

     RandomSettingUI
          • extends
                  javax.swing.JPanel

          • implements
                  ClusteringBuilder.SettingUI<Random>

          • variable(Global)
                  private SpinnerModel clusterSizeSpinnerModel;

          • Constructor
           RandomSettingUI() {
              clusterSizeSpinnerModel = new SpinnerNumberModel(
                   Integer.valueOf(Random.MIN_CLUSTER_SIZE),
                   Integer.valueOf(Random.MIN_CLUSTER_SIZE), null,
                   Integer.valueOf(1));
              initComponents();
           }


http://www.mongkie.org                                               26/33
Make a plugin - RandomSettingUI

     RandomSettingUI
           • source code
        package org.mongkie.clustering.plugins.random;

        import javax.swing.JPanel;
        import javax.swing.SpinnerModel;
        import javax.swing.SpinnerNumberModel;
        import org.mongkie.clustering.spi.ClusteringBuilder;

        public class RandomSettingUI extends javax.swing.JPanel implements ClusteringBuilder.SettingUI<Random> {

          private SpinnerModel clusterSizeSpinnerModel;

          /** Creates new form RandomSettingUI */
          RandomSettingUI() {
             clusterSizeSpinnerModel = new SpinnerNumberModel(
                  Integer.valueOf(Random.MIN_CLUSTER_SIZE),
                  Integer.valueOf(Random.MIN_CLUSTER_SIZE), null,
                  Integer.valueOf(1));
             initComponents();
          }
         @Override
          public JPanel getPanel() {
             return this;
          }
          @Override
          public void setup(Random random) {
             clusterSizeSpinner.setValue(random.getClusterSize());
          }
          @Override
          public void apply(Random random) {
             random.setClusterSize((Integer) clusterSizeSpinner.getValue());
          }
          // Variables declaration - do not modify
          private javax.swing.JLabel clusterSizeLabel;
          private javax.swing.JSpinner clusterSizeSpinner;
          // End of variables declaration
        }

http://www.mongkie.org                                                                                             27/33
Make a plugin - RandomSettingUI

     RandomSettingUI
           • source code
        private void initComponents() {

            clusterSizeLabel = new javax.swing.JLabel();
            clusterSizeSpinner = new javax.swing.JSpinner();

            clusterSizeLabel.setText(org.openide.util.NbBundle.getMessage(RandomSettingUI.class, "RandomSettingUI.clusterSizeLabel.text")); // NOI18N

            clusterSizeSpinner.setModel(clusterSizeSpinnerModel);
            clusterSizeSpinner.setPreferredSize(new java.awt.Dimension(50, 26));

            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
            this.setLayout(layout);
            layout.setHorizontalGroup(
               layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
               .addGroup(layout.createSequentialGroup()
                  .addContainerGap()
                  .addComponent(clusterSizeLabel)
                  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                  .addComponent(clusterSizeSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFER
        RED_SIZE)
                  .addContainerGap(16, Short.MAX_VALUE))
            );
            layout.setVerticalGroup(
               layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
               .addGroup(layout.createSequentialGroup()
                  .addContainerGap()
                  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                     .addComponent(clusterSizeLabel)
                     .addComponent(clusterSizeSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFE
        RRED_SIZE))
                  .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            );
          }



http://www.mongkie.org                                                                                                                                        28/33
Make a plugin - Bundle.properties

     Bundle.properties

       name=Random
       description=Clusterize nodes randomly according to given size of a cluster
       RandomSettingUI.clusterSizeLabel.text=Size of a cluster :




http://www.mongkie.org                                                              29/33
Build and Run

     Clean and Build




http://www.mongkie.org   30/33
Build and Run

     Run




http://www.mongkie.org   31/33
Build and Run

     Run




http://www.mongkie.org   32/33
Q&A
Homepage : http://www.mongkie.org
  Forum : http://forum.mongkie.org
    wiki : http://wiki.mongkie.org




                                     33/33

More Related Content

What's hot

Got Logs? Get Answers with Elasticsearch ELK - PuppetConf 2014
Got Logs? Get Answers with Elasticsearch ELK - PuppetConf 2014Got Logs? Get Answers with Elasticsearch ELK - PuppetConf 2014
Got Logs? Get Answers with Elasticsearch ELK - PuppetConf 2014
Puppet
 
JavaScript APIs - The Web is the Platform - .toster conference, Moscow
JavaScript APIs - The Web is the Platform - .toster conference, MoscowJavaScript APIs - The Web is the Platform - .toster conference, Moscow
JavaScript APIs - The Web is the Platform - .toster conference, MoscowRobert Nyman
 
Node.js in action
Node.js in actionNode.js in action
Node.js in action
Simon Su
 
Sequelize
SequelizeSequelize
Sequelize
Tarek Raihan
 
Spring 3.0 dependancy injection
Spring 3.0 dependancy injectionSpring 3.0 dependancy injection
Spring 3.0 dependancy injection
Rajiv Gupta
 
Ejemplo radio
Ejemplo radioEjemplo radio
Ejemplo radio
lupe ga
 
Aligning Continuous Integration Deployment: Automated Validation of OpenStack...
Aligning Continuous Integration Deployment: Automated Validation of OpenStack...Aligning Continuous Integration Deployment: Automated Validation of OpenStack...
Aligning Continuous Integration Deployment: Automated Validation of OpenStack...
Atlassian
 
Real Time Web with Node
Real Time Web with NodeReal Time Web with Node
Real Time Web with NodeTim Caswell
 
Node Powered Mobile
Node Powered MobileNode Powered Mobile
Node Powered MobileTim Caswell
 
Elastic search 검색
Elastic search 검색Elastic search 검색
Elastic search 검색
HyeonSeok Choi
 
Deep Dive into Zone.JS
Deep Dive into Zone.JSDeep Dive into Zone.JS
Deep Dive into Zone.JS
Ilia Idakiev
 
[Hatsune Miku] Shoot Frieza with Amazon Kinesis ! [EN]
[Hatsune Miku] Shoot Frieza with Amazon Kinesis ! [EN][Hatsune Miku] Shoot Frieza with Amazon Kinesis ! [EN]
[Hatsune Miku] Shoot Frieza with Amazon Kinesis ! [EN]崇之 清水
 
Mythbusting: Understanding How We Measure the Performance of MongoDB
Mythbusting: Understanding How We Measure the Performance of MongoDBMythbusting: Understanding How We Measure the Performance of MongoDB
Mythbusting: Understanding How We Measure the Performance of MongoDB
MongoDB
 
groovy databases
groovy databasesgroovy databases
groovy databases
Paul King
 
JavaScript & HTML5 - Brave New World
JavaScript & HTML5 - Brave New WorldJavaScript & HTML5 - Brave New World
JavaScript & HTML5 - Brave New World
Robert Nyman
 
연구자 및 교육자를 위한 계산 및 분석 플랫폼 설계 - PyCon KR 2015
연구자 및 교육자를 위한 계산 및 분석 플랫폼 설계 - PyCon KR 2015연구자 및 교육자를 위한 계산 및 분석 플랫폼 설계 - PyCon KR 2015
연구자 및 교육자를 위한 계산 및 분석 플랫폼 설계 - PyCon KR 2015
Jeongkyu Shin
 
Advanced GORM - Performance, Customization and Monitoring
Advanced GORM - Performance, Customization and MonitoringAdvanced GORM - Performance, Customization and Monitoring
Advanced GORM - Performance, Customization and Monitoring
Burt Beckwith
 

What's hot (20)

Backbone intro
Backbone introBackbone intro
Backbone intro
 
Got Logs? Get Answers with Elasticsearch ELK - PuppetConf 2014
Got Logs? Get Answers with Elasticsearch ELK - PuppetConf 2014Got Logs? Get Answers with Elasticsearch ELK - PuppetConf 2014
Got Logs? Get Answers with Elasticsearch ELK - PuppetConf 2014
 
JavaScript APIs - The Web is the Platform - .toster conference, Moscow
JavaScript APIs - The Web is the Platform - .toster conference, MoscowJavaScript APIs - The Web is the Platform - .toster conference, Moscow
JavaScript APIs - The Web is the Platform - .toster conference, Moscow
 
Node.js in action
Node.js in actionNode.js in action
Node.js in action
 
Sequelize
SequelizeSequelize
Sequelize
 
Spock and Geb in Action
Spock and Geb in ActionSpock and Geb in Action
Spock and Geb in Action
 
Spring 3.0 dependancy injection
Spring 3.0 dependancy injectionSpring 3.0 dependancy injection
Spring 3.0 dependancy injection
 
java
javajava
java
 
Ejemplo radio
Ejemplo radioEjemplo radio
Ejemplo radio
 
Aligning Continuous Integration Deployment: Automated Validation of OpenStack...
Aligning Continuous Integration Deployment: Automated Validation of OpenStack...Aligning Continuous Integration Deployment: Automated Validation of OpenStack...
Aligning Continuous Integration Deployment: Automated Validation of OpenStack...
 
Real Time Web with Node
Real Time Web with NodeReal Time Web with Node
Real Time Web with Node
 
Node Powered Mobile
Node Powered MobileNode Powered Mobile
Node Powered Mobile
 
Elastic search 검색
Elastic search 검색Elastic search 검색
Elastic search 검색
 
Deep Dive into Zone.JS
Deep Dive into Zone.JSDeep Dive into Zone.JS
Deep Dive into Zone.JS
 
[Hatsune Miku] Shoot Frieza with Amazon Kinesis ! [EN]
[Hatsune Miku] Shoot Frieza with Amazon Kinesis ! [EN][Hatsune Miku] Shoot Frieza with Amazon Kinesis ! [EN]
[Hatsune Miku] Shoot Frieza with Amazon Kinesis ! [EN]
 
Mythbusting: Understanding How We Measure the Performance of MongoDB
Mythbusting: Understanding How We Measure the Performance of MongoDBMythbusting: Understanding How We Measure the Performance of MongoDB
Mythbusting: Understanding How We Measure the Performance of MongoDB
 
groovy databases
groovy databasesgroovy databases
groovy databases
 
JavaScript & HTML5 - Brave New World
JavaScript & HTML5 - Brave New WorldJavaScript & HTML5 - Brave New World
JavaScript & HTML5 - Brave New World
 
연구자 및 교육자를 위한 계산 및 분석 플랫폼 설계 - PyCon KR 2015
연구자 및 교육자를 위한 계산 및 분석 플랫폼 설계 - PyCon KR 2015연구자 및 교육자를 위한 계산 및 분석 플랫폼 설계 - PyCon KR 2015
연구자 및 교육자를 위한 계산 및 분석 플랫폼 설계 - PyCon KR 2015
 
Advanced GORM - Performance, Customization and Monitoring
Advanced GORM - Performance, Customization and MonitoringAdvanced GORM - Performance, Customization and Monitoring
Advanced GORM - Performance, Customization and Monitoring
 

Viewers also liked

Farw
FarwFarw
Farwfarw
 
netbeansplatform overview
netbeansplatform overviewnetbeansplatform overview
netbeansplatform overviewpluskjw
 
20120315 netbeansplatform overview
20120315 netbeansplatform overview20120315 netbeansplatform overview
20120315 netbeansplatform overview
pluskjw
 
201204 cloning a repository from github
201204 cloning a repository from github201204 cloning a repository from github
201204 cloning a repository from github
pluskjw
 
201204 create a project and module
201204 create a project and module201204 create a project and module
201204 create a project and module
pluskjw
 
201204quickstartguide
201204quickstartguide201204quickstartguide
201204quickstartguide
pluskjw
 
201204 cloning a repository from github
201204 cloning a repository from github201204 cloning a repository from github
201204 cloning a repository from github
pluskjw
 
ATS Overview For Linked In
ATS Overview For Linked InATS Overview For Linked In
ATS Overview For Linked Inpaltenbe
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
Luminary Labs
 

Viewers also liked (10)

Farw
FarwFarw
Farw
 
Available paintings 2012
Available paintings 2012Available paintings 2012
Available paintings 2012
 
netbeansplatform overview
netbeansplatform overviewnetbeansplatform overview
netbeansplatform overview
 
20120315 netbeansplatform overview
20120315 netbeansplatform overview20120315 netbeansplatform overview
20120315 netbeansplatform overview
 
201204 cloning a repository from github
201204 cloning a repository from github201204 cloning a repository from github
201204 cloning a repository from github
 
201204 create a project and module
201204 create a project and module201204 create a project and module
201204 create a project and module
 
201204quickstartguide
201204quickstartguide201204quickstartguide
201204quickstartguide
 
201204 cloning a repository from github
201204 cloning a repository from github201204 cloning a repository from github
201204 cloning a repository from github
 
ATS Overview For Linked In
ATS Overview For Linked InATS Overview For Linked In
ATS Overview For Linked In
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
 

Similar to 201204 random clustering

In the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: GradleIn the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: Gradle
Skills Matter
 
An introduction to maven gradle and sbt
An introduction to maven gradle and sbtAn introduction to maven gradle and sbt
An introduction to maven gradle and sbt
Fabio Fumarola
 
Mastering Grails 3 Plugins - G3 Summit 2016
Mastering Grails 3 Plugins - G3 Summit 2016Mastering Grails 3 Plugins - G3 Summit 2016
Mastering Grails 3 Plugins - G3 Summit 2016
Alvaro Sanchez-Mariscal
 
Construire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradleConstruire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradle
Thierry Wasylczenko
 
Code Splitting in Practice - Shanghai JS Meetup May 2016
Code Splitting in Practice - Shanghai JS Meetup May 2016Code Splitting in Practice - Shanghai JS Meetup May 2016
Code Splitting in Practice - Shanghai JS Meetup May 2016
Wiredcraft
 
Js tacktalk team dev js testing performance
Js tacktalk team dev js testing performanceJs tacktalk team dev js testing performance
Js tacktalk team dev js testing performance
Артем Захарченко
 
Pragmatische Plone Projekte
Pragmatische Plone ProjektePragmatische Plone Projekte
Pragmatische Plone Projekte
Andreas Jung
 
Pragmatic plone projects
Pragmatic plone projectsPragmatic plone projects
Pragmatic plone projects
Andreas Jung
 
Java EE 6 CDI Integrates with Spring & JSF
Java EE 6 CDI Integrates with Spring & JSFJava EE 6 CDI Integrates with Spring & JSF
Java EE 6 CDI Integrates with Spring & JSFJiayun Zhou
 
Gradle
GradleGradle
Everything as a Code / Александр Тарасов (Одноклассники)
Everything as a Code / Александр Тарасов (Одноклассники)Everything as a Code / Александр Тарасов (Одноклассники)
Everything as a Code / Александр Тарасов (Одноклассники)
Ontico
 
Everything as a code
Everything as a codeEverything as a code
Everything as a code
Aleksandr Tarasov
 
Atlassian Groovy Plugins
Atlassian Groovy PluginsAtlassian Groovy Plugins
Atlassian Groovy Plugins
Paul King
 
The Naked Bundle - Tryout
The Naked Bundle - TryoutThe Naked Bundle - Tryout
The Naked Bundle - Tryout
Matthias Noback
 
Introduction to OSGGi
Introduction to OSGGiIntroduction to OSGGi
Introduction to OSGGi
Marek Koniew
 
Singletons in PHP - Why they are bad and how you can eliminate them from your...
Singletons in PHP - Why they are bad and how you can eliminate them from your...Singletons in PHP - Why they are bad and how you can eliminate them from your...
Singletons in PHP - Why they are bad and how you can eliminate them from your...
go_oh
 
Implementing Quality on Java projects
Implementing Quality on Java projectsImplementing Quality on Java projects
Implementing Quality on Java projects
Vincent Massol
 
10 Cool Facts about Gradle
10 Cool Facts about Gradle10 Cool Facts about Gradle
10 Cool Facts about GradleEvgeny Goldin
 
Design patterns - Common Solutions to Common Problems - Brad Wood
Design patterns -  Common Solutions to Common Problems - Brad WoodDesign patterns -  Common Solutions to Common Problems - Brad Wood
Design patterns - Common Solutions to Common Problems - Brad Wood
Ortus Solutions, Corp
 
BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...
BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...
BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...
Mark A
 

Similar to 201204 random clustering (20)

In the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: GradleIn the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: Gradle
 
An introduction to maven gradle and sbt
An introduction to maven gradle and sbtAn introduction to maven gradle and sbt
An introduction to maven gradle and sbt
 
Mastering Grails 3 Plugins - G3 Summit 2016
Mastering Grails 3 Plugins - G3 Summit 2016Mastering Grails 3 Plugins - G3 Summit 2016
Mastering Grails 3 Plugins - G3 Summit 2016
 
Construire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradleConstruire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradle
 
Code Splitting in Practice - Shanghai JS Meetup May 2016
Code Splitting in Practice - Shanghai JS Meetup May 2016Code Splitting in Practice - Shanghai JS Meetup May 2016
Code Splitting in Practice - Shanghai JS Meetup May 2016
 
Js tacktalk team dev js testing performance
Js tacktalk team dev js testing performanceJs tacktalk team dev js testing performance
Js tacktalk team dev js testing performance
 
Pragmatische Plone Projekte
Pragmatische Plone ProjektePragmatische Plone Projekte
Pragmatische Plone Projekte
 
Pragmatic plone projects
Pragmatic plone projectsPragmatic plone projects
Pragmatic plone projects
 
Java EE 6 CDI Integrates with Spring & JSF
Java EE 6 CDI Integrates with Spring & JSFJava EE 6 CDI Integrates with Spring & JSF
Java EE 6 CDI Integrates with Spring & JSF
 
Gradle
GradleGradle
Gradle
 
Everything as a Code / Александр Тарасов (Одноклассники)
Everything as a Code / Александр Тарасов (Одноклассники)Everything as a Code / Александр Тарасов (Одноклассники)
Everything as a Code / Александр Тарасов (Одноклассники)
 
Everything as a code
Everything as a codeEverything as a code
Everything as a code
 
Atlassian Groovy Plugins
Atlassian Groovy PluginsAtlassian Groovy Plugins
Atlassian Groovy Plugins
 
The Naked Bundle - Tryout
The Naked Bundle - TryoutThe Naked Bundle - Tryout
The Naked Bundle - Tryout
 
Introduction to OSGGi
Introduction to OSGGiIntroduction to OSGGi
Introduction to OSGGi
 
Singletons in PHP - Why they are bad and how you can eliminate them from your...
Singletons in PHP - Why they are bad and how you can eliminate them from your...Singletons in PHP - Why they are bad and how you can eliminate them from your...
Singletons in PHP - Why they are bad and how you can eliminate them from your...
 
Implementing Quality on Java projects
Implementing Quality on Java projectsImplementing Quality on Java projects
Implementing Quality on Java projects
 
10 Cool Facts about Gradle
10 Cool Facts about Gradle10 Cool Facts about Gradle
10 Cool Facts about Gradle
 
Design patterns - Common Solutions to Common Problems - Brad Wood
Design patterns -  Common Solutions to Common Problems - Brad WoodDesign patterns -  Common Solutions to Common Problems - Brad Wood
Design patterns - Common Solutions to Common Problems - Brad Wood
 
BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...
BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...
BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...
 

Recently uploaded

Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 

Recently uploaded (20)

Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 

201204 random clustering

  • 1. Make a plugin of Random Clustering 2012. 4 http://www.mongkie.org 1/33
  • 2. CONTENTS  CONTENTS • Objectives • Structure of Random Clustering Plugin • make a plugin  Package – org.mongkie.clustering.plugins.random  Classes – Random.java – RandomBuilder.java – RandomSettingUI.java  Others – Bundle.properties • Build and Run http://www.mongkie.org 2/33
  • 3. Objectives  Objectives • make a plugin of random clustering (add random algorithm) Add Random Algorithm http://www.mongkie.org 3/33
  • 4. Clutering Plugins  Structure of Random Clustering • org.mongkie.clustering.plugins.random  Bundle.properties  Random.java  RandomBuilder.java  RandomSettingUI.java Clustering API Clustering Plugins Clustering Plugins org.mongkie.clustering org.mongkie.clustering.plugins org.mongkie.ui.clustering -ClusteringController -ClusteringTopComponent -CluteringModel org.mongkie.clustering.plugins.clustermaker -ClusteringModelListener org.mongkie.ui.clustering.explorer -DefaultClusterImpl org.mongkie.clustering.plugins.clustermaker.converters -ClusterChildFactory -ClusterNode org.mongkie.clustering.impl org.mongkie.clustering.plugins.clustermaker.mcl -ClusteringResultView -ClusteringControllerImpl -ClusteringModelImpl org.mongkie.clustering.plugins.mcl org.mongkie.ui.clustering.explorer.actions -GroupAction org.mongkie.clustering.spi org.mongkie.clustering.plugins.mcode -UngroupAction -Cluster -Clustering org.mongkie.ui.clustering.resources -CluteringBuilder - Image Files http://www.mongkie.org 4/33
  • 5. Make a plugin - Package  [New] –[Java Package] http://www.mongkie.org 5/33
  • 6. Make a plugin - Package  Create a random pacakge • org.mongkie.clustering.plugins.random http://www.mongkie.org 6/33
  • 7. Make a plugin - Package  Create a random pacakge • org.mongkie.clustering.plugins.random http://www.mongkie.org 7/33
  • 8. Make a plugin - Random  Create a random class • Random.java http://www.mongkie.org 8/33
  • 9. Make a plugin - Random  Create a random class • Random.java http://www.mongkie.org 9/33
  • 10. Make a plugin - Random  Create a random class • Random.java http://www.mongkie.org 10/33
  • 11. Make a plugin - Random  Random.java • Source Code package org.mongkie.clustering.plugins.random; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Iterator; import java.util.List; import org.mongkie.clustering.spi.Cluster; import org.mongkie.clustering.DefaultClusterImpl; import org.mongkie.clustering.spi.Clustering; import org.mongkie.clustering.spi.ClusteringBuilder; import org.openide.util.Exceptions; import prefuse.data.Graph; import prefuse.data.Node; http://www.mongkie.org 11/33
  • 12. Make a plugin - Random  Random.java • implements  Clustering • variables (global)  private final RandomBuilder builder;  private int clusterSize;  static final int MIN_CLUSTER_SIZE = 3;  private List<Cluster> clusters = new ArrayList<Cluster>(); • Constructor Random(RandomBuilder builder) { this.builder = builder; this.clusterSize = MIN_CLUSTER_SIZE; } http://www.mongkie.org 12/33
  • 13. Make a plugin - Random  Random.java • source code public void execute(Graph g) { clearClusters(); List<Node> nodes = new ArrayList<Node>(g.getNodeCount()); Iterator<Node> nodesIter = g.nodes(); while (nodesIter.hasNext()) { Node n = nodesIter.next(); nodes.add(n); } Collections.shuffle(nodes); int i = 1, j = 1; DefaultClusterImpl c = new DefaultClusterImpl(g, "Random " + j); c.setRank(j - 1); for (Node n : nodes) { c.addNode(n); if (i >= clusterSize) { clusters.add(c); c = new DefaultClusterImpl(g, "Random " + ++j); c.setRank(j - 1); i = 1; } else { i++; } } if (c.getNodesCount() > 0) { clusters.add(c); } try { synchronized (this) { wait(1000); } } catch (InterruptedException ex) { Exceptions.printStackTrace(ex); } } http://www.mongkie.org 13/33
  • 14. Make a plugin - Random  Random.java • source code int getClusterSize() { return clusterSize; } void setClusterSize(int clusterSize) { this.clusterSize = clusterSize < MIN_CLUSTER_SIZE ? MIN_CLUSTER_SIZE : clusterSize; } public boolean cancel() { synchronized (this) { clearClusters(); notifyAll(); } return true; } @Override public Collection<Cluster> getClusters() { return clusters; } @Override public void clearClusters() { clusters.clear(); } @Override public ClusteringBuilder getBuilder() { return builder; } http://www.mongkie.org 14/33
  • 15. Make a plugin - RandomBuilder  RandomBuilder.java http://www.mongkie.org 15/33
  • 16. Make a plugin - RandomBuilder  RandomBuilder http://www.mongkie.org 16/33
  • 17. Make a plugin - RandomBuilder  RandomBuilder http://www.mongkie.org 17/33
  • 18. Make a plugin - RandomBuilder  RandomBuilder http://www.mongkie.org 18/33
  • 19. Make a plugin - RandomBuilder  RandomBuilder • implements  ClusteringBuilder • variable(Global)  private final Random random = new Random(this);  private final SettingUI settings = new RandomSettingUI(); http://www.mongkie.org 19/33
  • 20. Make a plugin - RandomBuilder  RandomBuilder • source code package org.mongkie.clustering.plugins.random; import org.mongkie.clustering.spi.Clustering; import org.mongkie.clustering.spi.ClusteringBuilder; import org.mongkie.clustering.spi.ClusteringBuilder.SettingUI; import org.openide.util.NbBundle; import org.openide.util.lookup.ServiceProvider; http://www.mongkie.org 20/33
  • 21. Make a plugin - RandomBuilder  RandomBuilder • source code @ServiceProvider(service = ClusteringBuilder.class) public class RandomBuilder implements ClusteringBuilder { private final Random random = new Random(this); private final SettingUI settings = new RandomSettingUI(); @Override public Clustering getClustering() { return random; } @Override public String getName() { return NbBundle.getMessage(RandomBuilder.class, "name"); } @Override public String getDescription() { return NbBundle.getMessage(RandomBuilder.class, "description"); } @Override public SettingUI getSettingUI() { return settings; } @Override public String toString() { return getName(); } } http://www.mongkie.org 21/33
  • 22. Make a plugin - RandomSettingUI  RandomSettingUI http://www.mongkie.org 22/33
  • 23. Make a plugin - RandomSettingUI  RandomSettingUI http://www.mongkie.org 23/33
  • 24. Make a plugin - RandomSettingUI  RandomSettingUI http://www.mongkie.org 24/33
  • 25. Make a plugin - RandomSettingUI  RandomSettingUI http://www.mongkie.org 25/33
  • 26. Make a plugin - RandomSettingUI  RandomSettingUI • extends  javax.swing.JPanel • implements  ClusteringBuilder.SettingUI<Random> • variable(Global)  private SpinnerModel clusterSizeSpinnerModel; • Constructor RandomSettingUI() { clusterSizeSpinnerModel = new SpinnerNumberModel( Integer.valueOf(Random.MIN_CLUSTER_SIZE), Integer.valueOf(Random.MIN_CLUSTER_SIZE), null, Integer.valueOf(1)); initComponents(); } http://www.mongkie.org 26/33
  • 27. Make a plugin - RandomSettingUI  RandomSettingUI • source code package org.mongkie.clustering.plugins.random; import javax.swing.JPanel; import javax.swing.SpinnerModel; import javax.swing.SpinnerNumberModel; import org.mongkie.clustering.spi.ClusteringBuilder; public class RandomSettingUI extends javax.swing.JPanel implements ClusteringBuilder.SettingUI<Random> { private SpinnerModel clusterSizeSpinnerModel; /** Creates new form RandomSettingUI */ RandomSettingUI() { clusterSizeSpinnerModel = new SpinnerNumberModel( Integer.valueOf(Random.MIN_CLUSTER_SIZE), Integer.valueOf(Random.MIN_CLUSTER_SIZE), null, Integer.valueOf(1)); initComponents(); } @Override public JPanel getPanel() { return this; } @Override public void setup(Random random) { clusterSizeSpinner.setValue(random.getClusterSize()); } @Override public void apply(Random random) { random.setClusterSize((Integer) clusterSizeSpinner.getValue()); } // Variables declaration - do not modify private javax.swing.JLabel clusterSizeLabel; private javax.swing.JSpinner clusterSizeSpinner; // End of variables declaration } http://www.mongkie.org 27/33
  • 28. Make a plugin - RandomSettingUI  RandomSettingUI • source code private void initComponents() { clusterSizeLabel = new javax.swing.JLabel(); clusterSizeSpinner = new javax.swing.JSpinner(); clusterSizeLabel.setText(org.openide.util.NbBundle.getMessage(RandomSettingUI.class, "RandomSettingUI.clusterSizeLabel.text")); // NOI18N clusterSizeSpinner.setModel(clusterSizeSpinnerModel); clusterSizeSpinner.setPreferredSize(new java.awt.Dimension(50, 26)); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(clusterSizeLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(clusterSizeSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFER RED_SIZE) .addContainerGap(16, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(clusterSizeLabel) .addComponent(clusterSizeSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFE RRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); } http://www.mongkie.org 28/33
  • 29. Make a plugin - Bundle.properties  Bundle.properties name=Random description=Clusterize nodes randomly according to given size of a cluster RandomSettingUI.clusterSizeLabel.text=Size of a cluster : http://www.mongkie.org 29/33
  • 30. Build and Run  Clean and Build http://www.mongkie.org 30/33
  • 31. Build and Run  Run http://www.mongkie.org 31/33
  • 32. Build and Run  Run http://www.mongkie.org 32/33
  • 33. Q&A Homepage : http://www.mongkie.org Forum : http://forum.mongkie.org wiki : http://wiki.mongkie.org 33/33