/***********************************************
底岩岩岩岩岩岩岩岩岩岩岩岩岩岩岩岩岩岩岩岩岩弧
岱 埭 鎢 乾 疑 氪 岱
怪岩岩岩岩岩岩岩岩岩岩岩岩岩岩岩岩岩岩岩岩岩戕
岱 岱
岱 枑鼎埭鎢楷票迵狟婥 岱
岱 岱
岱 http://www.codefans.net 岱
岱 岱
岱 誑翑﹜煦砅﹜枑詢 岱
彿岩岩岩岩岩岩岩岩岩岩岩岩岩岩岩岩岩岩岩岩岩忽
************************************************/
import java.awt.*;
/**
*
* 珆尨ん聆彸最唗
*
* @author fubin www.cujava.com
*
*/
public class Disp_Prop extends javax.swing.JFrame {
/** Creates new form Disp_Prop */
int i,j,xpos,ypos;
Disp_Mode dm;
DisplayMode tmode;
public Disp_Prop() {
GraphicsEnvironment GEn = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice GDevs[] = GEn.getScreenDevices();
for(i=0;i<1;i++)
{
dm = new Disp_Mode(GDevs[i]);
dm.addMode();
}
initComponents();
setSliders(0);
setSliders(1);
setSliders(2);
jLabel_Resolution.setText("Width x Height : "+dm.res.get(0).toString());
jLabel_Depth.setText("Depth : "+dm.bits[0].get(0).toString()+" bpp");
jLabel_Rate.setText("Rate : "+dm.rrates[0].get(0).toString()+" Hz");
jLabel_Available.setText("["+dm.res.get(jSlider_Resolution.getValue()).toString()+"] ["+dm.bits[0].get(jSlider_Depth.getValue()).toString()+" bpp] ["+dm.rrates[0].get(jSlider_Rate.getValue()).toString()+" Hz]");
jLabel_System.setText("["+dm.orgDm.getWidth()+" x "+dm.orgDm.getHeight()+"] ["+dm.orgDm.getBitDepth()+" bpp] ["+dm.orgDm.getRefreshRate()+" Hz]");
dm.GDev.setFullScreenWindow(this);
this.setIconImage(new javax.swing.ImageIcon(getClass().getResource("/Ico.png")).getImage());
//this.setLocation(200,150);
this.setSize(391,453+35);
//this.setExtendedState(java.awt.Frame.NORMAL);
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
jSlider_Resolution = new javax.swing.JSlider();
jLabel_Resolution = new javax.swing.JLabel();
jLabel13 = new javax.swing.JLabel();
jPanel2 = new javax.swing.JPanel();
jSlider_Depth = new javax.swing.JSlider();
jLabel_Depth = new javax.swing.JLabel();
jLabel14 = new javax.swing.JLabel();
jPanel3 = new javax.swing.JPanel();
jSlider_Rate = new javax.swing.JSlider();
jLabel_Rate = new javax.swing.JLabel();
jLabel15 = new javax.swing.JLabel();
jButton_Test = new javax.swing.JButton();
jButton_Exit = new javax.swing.JButton();
jPanel4 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
jButton_Reset = new javax.swing.JButton();
jPanel5 = new javax.swing.JPanel();
jLabel9 = new javax.swing.JLabel();
jLabel10 = new javax.swing.JLabel();
jLabel11 = new javax.swing.JLabel();
jLabel12 = new javax.swing.JLabel();
jLabel_Available = new javax.swing.JLabel();
jLabel_Applied = new javax.swing.JLabel();
jLabel_System = new javax.swing.JLabel();
getContentPane().setLayout(null);
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Show Test www.cujava.com");
setResizable(false);
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowActivated(java.awt.event.WindowEvent evt) {
formWindowActivated(evt);
}
public void windowDeactivated(java.awt.event.WindowEvent evt) {
formWindowDeactivated(evt);
}
});
jPanel1.setLayout(null);
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED), "Resolution", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11)));
jSlider_Resolution.setMajorTickSpacing(1);
jSlider_Resolution.setMaximum(1);
jSlider_Resolution.setPaintTicks(true);
jSlider_Resolution.setSnapToTicks(true);
jSlider_Resolution.setValue(0);
jSlider_Resolution.addChangeListener(new javax.swing.event.ChangeListener() {
public void stateChanged(javax.swing.event.ChangeEvent evt) {
jSlider_ResolutionStateChanged(evt);
}
});
jPanel1.add(jSlider_Resolution);
jSlider_Resolution.setBounds(80, 40, 230, 30);
jLabel_Resolution.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
jLabel_Resolution.setText("Width x Height : ");
jPanel1.add(jLabel_Resolution);
jLabel_Resolution.setBounds(80, 20, 210, 20);
jLabel13.setFont(new java.awt.Font("Tahoma", 0, 12));
jLabel13.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
jLabel13.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Resolution.png")));
jLabel13.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
jLabel13.setIconTextGap(0);
jPanel1.add(jLabel13);
jLabel13.setBounds(10, 20, 60, 50);
getContentPane().add(jPanel1);
jPanel1.setBounds(30, 130, 330, 80);
jPanel2.setLayout(null);
jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED), "Bit Depth", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11)));
jSlider_Depth.setMajorTickSpacing(1);
jSlider_Depth.setMaximum(0);
jSlider_Depth.setPaintTicks(true);
jSlider_Depth.setSnapToTicks(true);
jSlider_Depth.addChangeListener(new javax.swing.event.ChangeListener() {
public void stateChanged(javax.swing.event.ChangeEvent evt) {
jSlider_DepthStateChanged(evt);
}
});
jPanel2.add(jSlider_Depth);
jSlider_Depth.setBounds(60, 40, 80, 30);
jLabel_Depth.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
jLabel_Depth.setText("Depth :");
jPanel2.add(jLabel_Depth);
jLabel_Depth.setBounds(60, 20, 80, 20);
jLabel14.setFont(new java.awt.Font("Tahoma", 0, 12));
jLabel14.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
jLabel14.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Bit.png")));
jLabel14.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
jLabel14.setIconTextGap(0);
jPanel2.add(jLabel14);
jLabel14.setBounds(10, 20, 40, 50);
getContentPane().add(jPanel2);
jPanel2.setBounds(30, 220, 150, 80);
jPanel3.setLayout(null);
jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED), "Refresh Rate", jav