當前位置: 首頁>>代碼示例>>Java>>正文


Java JFrame.setGlassPane方法代碼示例

本文整理匯總了Java中javax.swing.JFrame.setGlassPane方法的典型用法代碼示例。如果您正苦於以下問題:Java JFrame.setGlassPane方法的具體用法?Java JFrame.setGlassPane怎麽用?Java JFrame.setGlassPane使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.swing.JFrame的用法示例。


在下文中一共展示了JFrame.setGlassPane方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: start

import javax.swing.JFrame; //導入方法依賴的package包/類
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();
        
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:19,代碼來源:ModeResizer.java

示例2: ungrayMainWindow

import javax.swing.JFrame; //導入方法依賴的package包/類
private void ungrayMainWindow() {
    if (oldGlassPane != null) {
        JFrame jf = (JFrame) WindowManager.getDefault().getMainWindow();
        jf.setGlassPane(oldGlassPane);
        jf.getGlassPane().setVisible(false);          
        jf.invalidate();
        jf.repaint();
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:10,代碼來源:AbstractWindowRunner.java

示例3: KFuzzyScatter

import javax.swing.JFrame; //導入方法依賴的package包/類
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);

}
 
開發者ID:HOMlab,項目名稱:QN-ACTR-Release,代碼行數:39,代碼來源:KFuzzyScatter.java

示例4: install

import javax.swing.JFrame; //導入方法依賴的package包/類
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();
    
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:13,代碼來源:PleaseWait.java

示例5: Scatter

import javax.swing.JFrame; //導入方法依賴的package包/類
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);
}
 
開發者ID:max6cn,項目名稱:jmt,代碼行數:33,代碼來源:Scatter.java

示例6: uninstall

import javax.swing.JFrame; //導入方法依賴的package包/類
public void uninstall() {
    setVisible(false);
    JFrame frame = (JFrame) WindowManagerImpl.getInstance().getMainWindow();
    frame.setGlassPane( oldGlass );
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:6,代碼來源:PleaseWait.java

示例7: KMeanScatter

import javax.swing.JFrame; //導入方法依賴的package包/類
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);
	}
}
 
開發者ID:max6cn,項目名稱:jmt,代碼行數:44,代碼來源:KMeanScatter.java

示例8: KMeanSingleClusterScatter

import javax.swing.JFrame; //導入方法依賴的package包/類
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);
	}
}
 
開發者ID:max6cn,項目名稱:jmt,代碼行數:45,代碼來源:KMeanSingleClusterScatter.java

示例9: FuzzyKSingleClusterScatter

import javax.swing.JFrame; //導入方法依賴的package包/類
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);
		}
	}
 
開發者ID:max6cn,項目名稱:jmt,代碼行數:46,代碼來源:FuzzyKSingleClusterScatter.java

示例10: FuzzyKSingleClusterScatter

import javax.swing.JFrame; //導入方法依賴的package包/類
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);
	}
}
 
開發者ID:HOMlab,項目名稱:QN-ACTR-Release,代碼行數:46,代碼來源:FuzzyKSingleClusterScatter.java


注:本文中的javax.swing.JFrame.setGlassPane方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。