本文整理汇总了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();
}
}
示例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();
}
}
示例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);
}
示例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();
}
示例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);
}
示例6: uninstall
import javax.swing.JFrame; //导入方法依赖的package包/类
public void uninstall() {
setVisible(false);
JFrame frame = (JFrame) WindowManagerImpl.getInstance().getMainWindow();
frame.setGlassPane( oldGlass );
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}