Changeset 93

Show
Ignore:
Timestamp:
30/01/08 13:04:03 (10 months ago)
Author:
altglass
Message:

Finished the GUI for the 1st step in the SliderBG Generator

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/vlcskineditor/SliderBGGen.java

    r71 r93  
    4444  JPanel card_step1; 
    4545  JRadioButton ltr_rb, btt_rb; 
     46  JTextField width_tf, height_tf; 
     47  JTextField margin_l_tf, margin_r_tf, margin_t_tf, margin_b_tf; 
    4648   
    4749  JSeparator step1_horz_s; 
    4850  JButton step1_next_btn, step1_cancel_btn; 
    49   JTextField width_tf, height_tf; 
    50    
     51     
    5152  JPanel card_step2; 
    5253   
     
    7374  ImageIcon editor_icon = createIcon("icons/editor.png"); 
    7475  ImageIcon ltr_icon = createIcon("icons/sliderbg_ltr.png"); 
    75   ImageIcon btt_icon = createIcon("icons/sliderbg_btt.png");   
     76  ImageIcon btt_icon = createIcon("icons/sliderbg_btt.png"); 
     77  ImageIcon width_i = createIcon("icons/sbg_width.png"); 
     78  ImageIcon height_i = createIcon("icons/sbg_height.png"); 
     79  ImageIcon margin_l_i = createIcon("icons/sbg_margin_l.png"); 
     80  ImageIcon margin_r_i = createIcon("icons/sbg_margin_r.png"); 
     81  ImageIcon margin_t_i = createIcon("icons/sbg_margin_t.png"); 
     82  ImageIcon margin_b_i = createIcon("icons/sbg_margin_b.png"); 
    7683   
    7784  /** 
     
    8895    setLayout(layout); 
    8996     
    90     Color header_bgc = getBackground().darker().darker();     
     97    Color header_bgc = getBackground().darker().darker(); //Adapts to the system style     
    9198    String header_bgh = "#"; 
    9299    if(header_bgc.getRed()<16) header_bgh+="0"; 
     
    133140    horz2_s.setBounds(5,215,525,215);     
    134141     
    135     JLabel width_l = new JLabel("Width:"); 
     142    JLabel width_l = new JLabel("Width:",width_i,JLabel.RIGHT); 
    136143    width_tf = new JTextField();     
    137144    width_tf.setDocument(new NumbersOnlyDocument(false)); 
     145    width_l.setLabelFor(width_tf); 
    138146     
    139147    card_step1.add(width_l); 
    140     width_l.setBounds(5,230,75,25); 
     148    width_l.setBounds(5,230,80,25); 
    141149    card_step1.add(width_tf); 
    142     width_tf.setBounds(80,230,150,25);     
    143      
    144     JLabel height_l = new JLabel("Height:"); 
     150    width_tf.setBounds(90,230,50,25);     
     151     
     152    JLabel height_l = new JLabel("Height:",height_i,JLabel.RIGHT); 
    145153    height_tf = new JTextField(); 
    146154    height_tf.setDocument(new NumbersOnlyDocument(false)); 
     155    height_l.setLabelFor(height_tf); 
    147156     
    148157    card_step1.add(height_l); 
    149     height_l.setBounds(5,265,75,25); 
     158    height_l.setBounds(5,265,80,25); 
    150159    card_step1.add(height_tf); 
    151     height_tf.setBounds(80,265,150,25); 
     160    height_tf.setBounds(90,265,50,25); 
     161     
     162    JLabel margin_l_l = new JLabel("Left margin:", margin_l_i, JLabel.RIGHT); 
     163    margin_l_tf = new JTextField(); 
     164    margin_l_tf.setDocument(new NumbersOnlyDocument(false)); 
     165    margin_l_l.setLabelFor(margin_l_tf); 
     166    JLabel margin_r_l = new JLabel("Right margin:", margin_r_i, JLabel.RIGHT); 
     167    margin_r_tf = new JTextField(); 
     168    margin_r_tf.setDocument(new NumbersOnlyDocument(false)); 
     169    margin_r_l.setLabelFor(margin_r_tf); 
     170    JLabel margin_t_l = new JLabel("Top margin:", margin_t_i, JLabel.RIGHT); 
     171    margin_t_tf = new JTextField(); 
     172    margin_t_tf.setDocument(new NumbersOnlyDocument(false)); 
     173    margin_t_l.setLabelFor(margin_t_tf); 
     174    JLabel margin_b_l = new JLabel("Bottom margin:", margin_b_i, JLabel.RIGHT); 
     175    margin_b_tf = new JTextField(); 
     176    margin_b_tf.setDocument(new NumbersOnlyDocument(false)); 
     177    margin_b_l.setLabelFor(margin_b_tf); 
     178     
     179    card_step1.add(margin_l_l); 
     180    card_step1.add(margin_l_tf); 
     181    margin_l_l.setBounds(150,230,115,25); 
     182    margin_l_tf.setBounds(270,230,50,25); 
     183    card_step1.add(margin_r_l); 
     184    card_step1.add(margin_r_tf); 
     185    margin_r_l.setBounds(150,265,115,25); 
     186    margin_r_tf.setBounds(270,265,50,25); 
     187    card_step1.add(margin_t_l); 
     188    card_step1.add(margin_t_tf); 
     189    margin_t_l.setBounds(325,230,115,25); 
     190    margin_t_tf.setBounds(445,230,50,25); 
     191    card_step1.add(margin_b_l); 
     192    card_step1.add(margin_b_tf); 
     193    margin_b_l.setBounds(325,265,115,25); 
     194    margin_b_tf.setBounds(445,265,50,25); 
    152195     
    153196    step1_horz_s = new JSeparator(JSeparator.HORIZONTAL);    
     
    245288    SliderBGGen sbgg = new SliderBGGen(null,null); 
    246289    sbgg.setVisible(true); 
    247     sbgg.setDefaultCloseOperation(sbgg.EXIT_ON_CLOSE); 
     290    sbgg.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 
    248291  } 
    249292}