Java Code Examples for javax.swing.JFrame.setGlassPane()

The following are Jave code examples for showing how to use setGlassPane() of the javax.swing.JFrame class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: incubator-netbeans   File: ModeResizer.java   View Source Code Vote up 7 votes
private void start() {
    Toolkit.getDefaultToolkit().addAWTEventListener( this, KeyEvent.KEY_EVENT_MASK );
    TopComponent.getRegistry().addPropertyChangeListener( this );
    
    Window w = SwingUtilities.getWindowAncestor( resizingComponent );
    if( w instanceof JFrame ) {
        frame = ( JFrame ) w;
        oldGlass = frame.getGlassPane();
        glass = new GlassPane( resizingComponent );
        frame.setGlassPane( glass );
        glass.setVisible( true );
        glass.invalidate();
        glass.revalidate();
        glass.repaint();
        glass.refresh();
        
    }
}
 
Example 2
Project: incubator-netbeans   File: AbstractWindowRunner.java   View Source Code Vote up 6 votes
private void ungrayMainWindow() {
    if (oldGlassPane != null) {
        JFrame jf = (JFrame) WindowManager.getDefault().getMainWindow();
        jf.setGlassPane(oldGlassPane);
        jf.getGlassPane().setVisible(false);          
        jf.invalidate();
        jf.repaint();
    }
}
 
Example 3
Project: QN-ACTR-Release   File: KFuzzyScatter.java   View Source Code Vote up 6 votes
public KFuzzyScatter(int x, int y, WorkloadAnalysisSession model, JFrame f, int clustering, int clust/*,double err*/) { //Passare il numero del clustering
	super();
	parent = f;
	//this.err = err;
	graph = new BufferedImage(WIDTH + 1, HEIGHT + 1, BufferedImage.TYPE_INT_RGB);
	valueFormat = new DecimalFormat("####.##E0");
	parent.setResizable(false);
	curClust = clust;
	this.clustering = clustering;
	//c1 = ((FuzzyKMean)(model.getListOfClustering().get(clustering))).getAssignment(curClust);
	c1 = ((ClusteringInfosFuzzy) ((FuzzyKMean) (model.getListOfClustering().get(clustering))).getClusteringInfos(curClust)).getAssignment();
	xVar = x;
	yVar = y;
	this.model = (ModelWorkloadAnalysis) model.getDataModel();
	this.session = model;
	this.model.addOnChangeVariableValue(new ChangeVariableListener() {
		public void onChangeVariableValues() {
			first = true;
			xMin = KFuzzyScatter.this.model.getMatrix().getVariables()[xVar].getUniStats().getMinValue();
			xMax = KFuzzyScatter.this.model.getMatrix().getVariables()[xVar].getUniStats().getMaxValue();
			yMin = KFuzzyScatter.this.model.getMatrix().getVariables()[yVar].getUniStats().getMinValue();
			yMax = KFuzzyScatter.this.model.getMatrix().getVariables()[yVar].getUniStats().getMaxValue();
			repaint();
		}
	});

	xMin = this.model.getMatrix().getVariables()[xVar].getUniStats().getMinValue();
	xMax = this.model.getMatrix().getVariables()[xVar].getUniStats().getMaxValue();
	yMin = this.model.getMatrix().getVariables()[yVar].getUniStats().getMinValue();
	yMax = this.model.getMatrix().getVariables()[yVar].getUniStats().getMaxValue();

	p = new GlassPanel();
	f.setGlassPane(p);
	p.setVisible(true);
	addMouseListener(p);
	addMouseMotionListener(p);

}
 
Example 4
Project: incubator-netbeans   File: PleaseWait.java   View Source Code Vote up 5 votes
public void install() {
    JFrame frame = (JFrame) WindowManagerImpl.getInstance().getMainWindow();
    oldGlass = frame.getGlassPane();
    if( oldGlass instanceof PleaseWait )
        oldGlass = null;
    frame.setGlassPane( this );
    setVisible(true);
    invalidate();
    revalidate();
    repaint();
    
}
 
Example 5
Project: jmt   File: Scatter.java   View Source Code Vote up 5 votes
public Scatter(int x, int y, ModelWorkloadAnalysis model, JFrame f) {
	super();
	parent = f;
	graph = new BufferedImage(WIDTH + 1, HEIGHT + 1, BufferedImage.TYPE_INT_RGB);
	valueFormat = new DecimalFormat("####.##E0");
	parent.setResizable(false);

	xVar = x;
	yVar = y;
	this.model = model;
	this.model.addOnChangeVariableValue(new ChangeVariableListener() {
		public void onChangeVariableValues() {
			first = true;
			xMin = Scatter.this.model.getMatrix().getVariables()[xVar].getUniStats().getMinValue();
			xMax = Scatter.this.model.getMatrix().getVariables()[xVar].getUniStats().getMaxValue();
			yMin = Scatter.this.model.getMatrix().getVariables()[yVar].getUniStats().getMinValue();
			yMax = Scatter.this.model.getMatrix().getVariables()[yVar].getUniStats().getMaxValue();
			repaint();
		}
	});

	xMin = this.model.getMatrix().getVariables()[xVar].getUniStats().getMinValue();
	xMax = this.model.getMatrix().getVariables()[xVar].getUniStats().getMaxValue();
	yMin = this.model.getMatrix().getVariables()[yVar].getUniStats().getMinValue();
	yMax = this.model.getMatrix().getVariables()[yVar].getUniStats().getMaxValue();

	p = new GlassPanel();
	f.setGlassPane(p);
	p.setVisible(true);
	addMouseListener(p);
	addMouseMotionListener(p);
}
 
Example 6
Project: jmt   File: KFuzzyScatter.java   View Source Code Vote up 5 votes
public KFuzzyScatter(int x, int y, WorkloadAnalysisSession model, JFrame f, int clustering, int clust/*,double err*/) { //Passare il numero del clustering
	super();
	parent = f;
	//this.err = err;
	graph = new BufferedImage(WIDTH + 1, HEIGHT + 1, BufferedImage.TYPE_INT_RGB);
	valueFormat = new DecimalFormat("####.##E0");
	parent.setResizable(false);
	curClust = clust;
	this.clustering = clustering;
	//c1 = ((FuzzyKMean)(model.getListOfClustering().get(clustering))).getAssignment(curClust);
	c1 = ((ClusteringInfosFuzzy) ((FuzzyKMean) (model.getListOfClustering().get(clustering))).getClusteringInfos(curClust)).getAssignment();
	xVar = x;
	yVar = y;
	this.model = (ModelWorkloadAnalysis) model.getDataModel();
	this.session = model;
	this.model.addOnChangeVariableValue(new ChangeVariableListener() {
		public void onChangeVariableValues() {
			first = true;
			xMin = KFuzzyScatter.this.model.getMatrix().getVariables()[xVar].getUniStats().getMinValue();
			xMax = KFuzzyScatter.this.model.getMatrix().getVariables()[xVar].getUniStats().getMaxValue();
			yMin = KFuzzyScatter.this.model.getMatrix().getVariables()[yVar].getUniStats().getMinValue();
			yMax = KFuzzyScatter.this.model.getMatrix().getVariables()[yVar].getUniStats().getMaxValue();
			repaint();
		}
	});

	xMin = this.model.getMatrix().getVariables()[xVar].getUniStats().getMinValue();
	xMax = this.model.getMatrix().getVariables()[xVar].getUniStats().getMaxValue();
	yMin = this.model.getMatrix().getVariables()[yVar].getUniStats().getMinValue();
	yMax = this.model.getMatrix().getVariables()[yVar].getUniStats().getMaxValue();

	p = new GlassPanel();
	f.setGlassPane(p);
	p.setVisible(true);
	addMouseListener(p);
	addMouseMotionListener(p);

}
 
Example 7
Project: QN-ACTR-Release   File: Scatter.java   View Source Code Vote up 5 votes
public Scatter(int x, int y, ModelWorkloadAnalysis model, JFrame f) {
	super();
	parent = f;
	graph = new BufferedImage(WIDTH + 1, HEIGHT + 1, BufferedImage.TYPE_INT_RGB);
	valueFormat = new DecimalFormat("####.##E0");
	parent.setResizable(false);

	xVar = x;
	yVar = y;
	this.model = model;
	this.model.addOnChangeVariableValue(new ChangeVariableListener() {
		public void onChangeVariableValues() {
			first = true;
			xMin = Scatter.this.model.getMatrix().getVariables()[xVar].getUniStats().getMinValue();
			xMax = Scatter.this.model.getMatrix().getVariables()[xVar].getUniStats().getMaxValue();
			yMin = Scatter.this.model.getMatrix().getVariables()[yVar].getUniStats().getMinValue();
			yMax = Scatter.this.model.getMatrix().getVariables()[yVar].getUniStats().getMaxValue();
			repaint();
		}
	});

	xMin = this.model.getMatrix().getVariables()[xVar].getUniStats().getMinValue();
	xMax = this.model.getMatrix().getVariables()[xVar].getUniStats().getMaxValue();
	yMin = this.model.getMatrix().getVariables()[yVar].getUniStats().getMinValue();
	yMax = this.model.getMatrix().getVariables()[yVar].getUniStats().getMaxValue();

	p = new GlassPanel();
	f.setGlassPane(p);
	p.setVisible(true);
	addMouseListener(p);
	addMouseMotionListener(p);
}
 
Example 8
Project: incubator-netbeans   File: PleaseWait.java   View Source Code Vote up 4 votes
public void uninstall() {
    setVisible(false);
    JFrame frame = (JFrame) WindowManagerImpl.getInstance().getMainWindow();
    frame.setGlassPane( oldGlass );
}
 
Example 9
Project: jmt   File: KMeanScatter.java   View Source Code Vote up 4 votes
public KMeanScatter(int x, int y, WorkloadAnalysisSession session, JFrame f, int clustering, int clust) { //Passare il numero del clustering
	super();
	parent = f;
	graph = new BufferedImage(WIDTH + 1, HEIGHT + 1, BufferedImage.TYPE_INT_RGB);
	valueFormat = new DecimalFormat("####.##E0");
	parent.setResizable(false);
	curClust = clust;
	this.clustering = clustering;
	//currClustering = (Vector)((KMean)(model.getListOfClustering().get(clustering))).getClusteringAssignment().get(curClust);
	c1 = ((KMean) (session.getListOfClustering().get(clustering))).getAsseg();
	xVar = x;
	yVar = y;
	this.model = (ModelWorkloadAnalysis) session.getDataModel();
	this.session = session;
	this.model.addOnChangeVariableValue(new ChangeVariableListener() {
		public void onChangeVariableValues() {
			first = true;
			xMin = KMeanScatter.this.model.getMatrix().getVariables()[xVar].getUniStats().getMinValue();
			xMax = KMeanScatter.this.model.getMatrix().getVariables()[xVar].getUniStats().getMaxValue();
			yMin = KMeanScatter.this.model.getMatrix().getVariables()[yVar].getUniStats().getMinValue();
			yMax = KMeanScatter.this.model.getMatrix().getVariables()[yVar].getUniStats().getMaxValue();
			repaint();
		}
	});

	xMin = this.model.getMatrix().getVariables()[xVar].getUniStats().getMinValue();
	xMax = this.model.getMatrix().getVariables()[xVar].getUniStats().getMaxValue();
	yMin = this.model.getMatrix().getVariables()[yVar].getUniStats().getMinValue();
	yMax = this.model.getMatrix().getVariables()[yVar].getUniStats().getMaxValue();

	p = new GlassPanel();
	f.setGlassPane(p);
	p.setVisible(true);
	addMouseListener(p);
	addMouseMotionListener(p);

	//Aggiunta menuItem del popup
	for (int i = 1; i < ((KMean) session.getListOfClustering().get(clustering)).getNumCluster(); i++) {
		JMenuItem m = new JMenuItem((i + 1) + " clusters");
		m.addActionListener(new KMScatterMenuChoose(i));
		popup.clusters.add(m);
	}
}
 
Example 10
Project: jmt   File: KMeanSingleClusterScatter.java   View Source Code Vote up 4 votes
public KMeanSingleClusterScatter(int x, int y, WorkloadAnalysisSession model, JFrame f, int clustering, int clust, int match) { //Passare il numero del clustering
	super();
	parent = f;
	graph = new BufferedImage(WIDTH + 1, HEIGHT + 1, BufferedImage.TYPE_INT_RGB);
	valueFormat = new DecimalFormat("####.##E0");
	parent.setResizable(false);
	curClust = clust;
	//this.clustering = clustering;
	this.match = match;
	//currClustering = (Vector)((KMean)(model.getListOfClustering().get(clustering))).getClusteringAssignment().get(curClust);
	c1 = ((KMean) (model.getListOfClustering().get(clustering))).getAsseg();
	xVar = x;
	yVar = y;
	this.model = (ModelWorkloadAnalysis) model.getDataModel();
	this.session = model;
	this.model.addOnChangeVariableValue(new ChangeVariableListener() {
		public void onChangeVariableValues() {
			first = true;
			xMin = KMeanSingleClusterScatter.this.model.getMatrix().getVariables()[xVar].getUniStats().getMinValue();
			xMax = KMeanSingleClusterScatter.this.model.getMatrix().getVariables()[xVar].getUniStats().getMaxValue();
			yMin = KMeanSingleClusterScatter.this.model.getMatrix().getVariables()[yVar].getUniStats().getMinValue();
			yMax = KMeanSingleClusterScatter.this.model.getMatrix().getVariables()[yVar].getUniStats().getMaxValue();
			repaint();
		}
	});

	xMin = this.model.getMatrix().getVariables()[xVar].getUniStats().getMinValue();
	xMax = this.model.getMatrix().getVariables()[xVar].getUniStats().getMaxValue();
	yMin = this.model.getMatrix().getVariables()[yVar].getUniStats().getMinValue();
	yMax = this.model.getMatrix().getVariables()[yVar].getUniStats().getMaxValue();

	p = new GlassPanel();
	f.setGlassPane(p);
	p.setVisible(true);
	addMouseListener(p);
	addMouseMotionListener(p);

	//Aggiunta menuItem del popup
	for (int i = 1; i <= clust + 1; i++) {
		JMenuItem m = new JMenuItem("Cluster " + (i));
		m.addActionListener(new KMScatterMenuChoose(i - 1));
		popup.clusters.add(m);
	}
}
 
Example 11
Project: jmt   File: FuzzyKSingleClusterScatter.java   View Source Code Vote up 4 votes
public FuzzyKSingleClusterScatter(int x, int y, WorkloadAnalysisSession model, JFrame f, int clustering, int clust, int match) { //Passare il numero del clustering
		super();
		parent = f;
		//this.err = err;
		graph = new BufferedImage(WIDTH + 1, HEIGHT + 1, BufferedImage.TYPE_INT_RGB);
		valueFormat = new DecimalFormat("####.##E0");
		parent.setResizable(false);
		curClust = clust;
		this.match = match;
		//this.clustering = clustering;
		//c1 = ((FuzzyKMean)(model.getListOfClustering().get(clustering))).getAssignment(curClust);
		c1 = ((ClusteringInfosFuzzy) ((FuzzyKMean) (model.getListOfClustering().get(clustering))).getClusteringInfos(curClust)).getAssignment();
		xVar = x;
		yVar = y;
		this.model = (ModelWorkloadAnalysis) model.getDataModel();
//		this.session = session;
		this.model.addOnChangeVariableValue(new ChangeVariableListener() {
			public void onChangeVariableValues() {
				first = true;
				xMin = FuzzyKSingleClusterScatter.this.model.getMatrix().getVariables()[xVar].getUniStats().getMinValue();
				xMax = FuzzyKSingleClusterScatter.this.model.getMatrix().getVariables()[xVar].getUniStats().getMaxValue();
				yMin = FuzzyKSingleClusterScatter.this.model.getMatrix().getVariables()[yVar].getUniStats().getMinValue();
				yMax = FuzzyKSingleClusterScatter.this.model.getMatrix().getVariables()[yVar].getUniStats().getMaxValue();
				repaint();
			}
		});

		xMin = this.model.getMatrix().getVariables()[xVar].getUniStats().getMinValue();
		xMax = this.model.getMatrix().getVariables()[xVar].getUniStats().getMaxValue();
		yMin = this.model.getMatrix().getVariables()[yVar].getUniStats().getMinValue();
		yMax = this.model.getMatrix().getVariables()[yVar].getUniStats().getMaxValue();

		p = new GlassPanel();
		f.setGlassPane(p);
		p.setVisible(true);
		addMouseListener(p);
		addMouseMotionListener(p);

		//		Aggiunta menuItem del popup
		for (int i = 1; i <= clust + 2; i++) {
			JMenuItem m = new JMenuItem("Cluster " + (i));
			m.addActionListener(new KMScatterMenuChoose(i + 1));
			popup.clusters.add(m);
		}
	}
 
Example 12
Project: QN-ACTR-Release   File: KMeanScatter.java   View Source Code Vote up 4 votes
public KMeanScatter(int x, int y, WorkloadAnalysisSession session, JFrame f, int clustering, int clust) { //Passare il numero del clustering
	super();
	parent = f;
	graph = new BufferedImage(WIDTH + 1, HEIGHT + 1, BufferedImage.TYPE_INT_RGB);
	valueFormat = new DecimalFormat("####.##E0");
	parent.setResizable(false);
	curClust = clust;
	this.clustering = clustering;
	//currClustering = (Vector)((KMean)(model.getListOfClustering().get(clustering))).getClusteringAssignment().get(curClust);
	c1 = ((KMean) (session.getListOfClustering().get(clustering))).getAsseg();
	xVar = x;
	yVar = y;
	this.model = (ModelWorkloadAnalysis) session.getDataModel();
	this.session = session;
	this.model.addOnChangeVariableValue(new ChangeVariableListener() {
		public void onChangeVariableValues() {
			first = true;
			xMin = KMeanScatter.this.model.getMatrix().getVariables()[xVar].getUniStats().getMinValue();
			xMax = KMeanScatter.this.model.getMatrix().getVariables()[xVar].getUniStats().getMaxValue();
			yMin = KMeanScatter.this.model.getMatrix().getVariables()[yVar].getUniStats().getMinValue();
			yMax = KMeanScatter.this.model.getMatrix().getVariables()[yVar].getUniStats().getMaxValue();
			repaint();
		}
	});

	xMin = this.model.getMatrix().getVariables()[xVar].getUniStats().getMinValue();
	xMax = this.model.getMatrix().getVariables()[xVar].getUniStats().getMaxValue();
	yMin = this.model.getMatrix().getVariables()[yVar].getUniStats().getMinValue();
	yMax = this.model.getMatrix().getVariables()[yVar].getUniStats().getMaxValue();

	p = new GlassPanel();
	f.setGlassPane(p);
	p.setVisible(true);
	addMouseListener(p);
	addMouseMotionListener(p);

	//Aggiunta menuItem del popup
	for (int i = 1; i < ((KMean) session.getListOfClustering().get(clustering)).getNumCluster(); i++) {
		JMenuItem m = new JMenuItem((i + 1) + " clusters");
		m.addActionListener(new KMScatterMenuChoose(i));
		popup.clusters.add(m);
	}
}
 
Example 13
Project: QN-ACTR-Release   File: KMeanSingleClusterScatter.java   View Source Code Vote up 4 votes
public KMeanSingleClusterScatter(int x, int y, WorkloadAnalysisSession model, JFrame f, int clustering, int clust, int match) { //Passare il numero del clustering
	super();
	parent = f;
	graph = new BufferedImage(WIDTH + 1, HEIGHT + 1, BufferedImage.TYPE_INT_RGB);
	valueFormat = new DecimalFormat("####.##E0");
	parent.setResizable(false);
	curClust = clust;
	//this.clustering = clustering;
	this.match = match;
	//currClustering = (Vector)((KMean)(model.getListOfClustering().get(clustering))).getClusteringAssignment().get(curClust);
	c1 = ((KMean) (model.getListOfClustering().get(clustering))).getAsseg();
	xVar = x;
	yVar = y;
	this.model = (ModelWorkloadAnalysis) model.getDataModel();
	this.session = model;
	this.model.addOnChangeVariableValue(new ChangeVariableListener() {
		public void onChangeVariableValues() {
			first = true;
			xMin = KMeanSingleClusterScatter.this.model.getMatrix().getVariables()[xVar].getUniStats().getMinValue();
			xMax = KMeanSingleClusterScatter.this.model.getMatrix().getVariables()[xVar].getUniStats().getMaxValue();
			yMin = KMeanSingleClusterScatter.this.model.getMatrix().getVariables()[yVar].getUniStats().getMinValue();
			yMax = KMeanSingleClusterScatter.this.model.getMatrix().getVariables()[yVar].getUniStats().getMaxValue();
			repaint();
		}
	});

	xMin = this.model.getMatrix().getVariables()[xVar].getUniStats().getMinValue();
	xMax = this.model.getMatrix().getVariables()[xVar].getUniStats().getMaxValue();
	yMin = this.model.getMatrix().getVariables()[yVar].getUniStats().getMinValue();
	yMax = this.model.getMatrix().getVariables()[yVar].getUniStats().getMaxValue();

	p = new GlassPanel();
	f.setGlassPane(p);
	p.setVisible(true);
	addMouseListener(p);
	addMouseMotionListener(p);

	//Aggiunta menuItem del popup
	for (int i = 1; i <= clust + 1; i++) {
		JMenuItem m = new JMenuItem("Cluster " + (i));
		m.addActionListener(new KMScatterMenuChoose(i - 1));
		popup.clusters.add(m);
	}
}
 
Example 14
Project: QN-ACTR-Release   File: FuzzyKSingleClusterScatter.java   View Source Code Vote up 4 votes
public FuzzyKSingleClusterScatter(int x, int y, WorkloadAnalysisSession model, JFrame f, int clustering, int clust, int match) { //Passare il numero del clustering
	super();
	parent = f;
	//this.err = err;
	graph = new BufferedImage(WIDTH + 1, HEIGHT + 1, BufferedImage.TYPE_INT_RGB);
	valueFormat = new DecimalFormat("####.##E0");
	parent.setResizable(false);
	curClust = clust;
	this.match = match;
	//this.clustering = clustering;
	//c1 = ((FuzzyKMean)(model.getListOfClustering().get(clustering))).getAssignment(curClust);
	c1 = ((ClusteringInfosFuzzy) ((FuzzyKMean) (model.getListOfClustering().get(clustering))).getClusteringInfos(curClust)).getAssignment();
	xVar = x;
	yVar = y;
	this.model = (ModelWorkloadAnalysis) model.getDataModel();
	this.session = session;
	this.model.addOnChangeVariableValue(new ChangeVariableListener() {
		public void onChangeVariableValues() {
			first = true;
			xMin = FuzzyKSingleClusterScatter.this.model.getMatrix().getVariables()[xVar].getUniStats().getMinValue();
			xMax = FuzzyKSingleClusterScatter.this.model.getMatrix().getVariables()[xVar].getUniStats().getMaxValue();
			yMin = FuzzyKSingleClusterScatter.this.model.getMatrix().getVariables()[yVar].getUniStats().getMinValue();
			yMax = FuzzyKSingleClusterScatter.this.model.getMatrix().getVariables()[yVar].getUniStats().getMaxValue();
			repaint();
		}
	});

	xMin = this.model.getMatrix().getVariables()[xVar].getUniStats().getMinValue();
	xMax = this.model.getMatrix().getVariables()[xVar].getUniStats().getMaxValue();
	yMin = this.model.getMatrix().getVariables()[yVar].getUniStats().getMinValue();
	yMax = this.model.getMatrix().getVariables()[yVar].getUniStats().getMaxValue();

	p = new GlassPanel();
	f.setGlassPane(p);
	p.setVisible(true);
	addMouseListener(p);
	addMouseMotionListener(p);

	//		Aggiunta menuItem del popup
	for (int i = 1; i <= clust + 2; i++) {
		JMenuItem m = new JMenuItem("Cluster " + (i));
		m.addActionListener(new KMScatterMenuChoose(i + 1));
		popup.clusters.add(m);
	}
}