@ -38,9 +38,15 @@ import org.openide.filesystems.FileChooserBuilder;
public final class CodelessProjectWizardVisualPanel1 extends JPanel {
public final class CodelessProjectWizardVisualPanel1 extends JPanel {
/** Creates new form CodelessProjectWizardVisualPanel1 */
private final CodelessProjectWizardWizardPanel1 panel ;
public CodelessProjectWizardVisualPanel1 ( ) {
/ * *
* Creates new form CodelessProjectWizardVisualPanel1
* /
public CodelessProjectWizardVisualPanel1 ( CodelessProjectWizardWizardPanel1 panel ) {
initComponents ( ) ;
initComponents ( ) ;
this . panel = panel ;
enableAssetsPath ( false ) ;
}
}
@Override
@Override
@ -61,19 +67,19 @@ public final class CodelessProjectWizardVisualPanel1 extends JPanel {
jTextField2 . addActionListener ( listener ) ;
jTextField2 . addActionListener ( listener ) ;
}
}
/ * * This method is called from within the constructor to
public void enableAssetsPath ( boolean enable ) {
* initialize the form .
jButton2 . setEnabled ( enable ) ;
* WARNING : Do NOT modify this code . The content of this method is
jTextField2 . setEnabled ( enable ) ;
* always regenerated by the Form Editor .
}
/ * *
* 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
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents ( ) {
private void initComponents ( ) {
jPanel1 = new javax . swing . JPanel ( ) ;
jLabel5 = new javax . swing . JLabel ( ) ;
jLabel6 = new javax . swing . JLabel ( ) ;
jLabel7 = new javax . swing . JLabel ( ) ;
jLabel8 = new javax . swing . JLabel ( ) ;
jLabel3 = new javax . swing . JLabel ( ) ;
jLabel3 = new javax . swing . JLabel ( ) ;
jToolBar1 = new javax . swing . JToolBar ( ) ;
jToolBar1 = new javax . swing . JToolBar ( ) ;
jLabel1 = new javax . swing . JLabel ( ) ;
jLabel1 = new javax . swing . JLabel ( ) ;
@ -86,44 +92,10 @@ public final class CodelessProjectWizardVisualPanel1 extends JPanel {
jTextField2 = new javax . swing . JTextField ( ) ;
jTextField2 = new javax . swing . JTextField ( ) ;
jButton2 = new javax . swing . JButton ( ) ;
jButton2 = new javax . swing . JButton ( ) ;
jLabel4 = new javax . swing . JLabel ( ) ;
jLabel4 = new javax . swing . JLabel ( ) ;
jScrollPane1 = new javax . swing . JScrollPane ( ) ;
jTextArea1 = new javax . swing . JTextArea ( ) ;
jPanel1 . setBorder ( javax . swing . BorderFactory . createTitledBorder ( org . openide . util . NbBundle . getMessage ( CodelessProjectWizardVisualPanel1 . class , "CodelessProjectWizardVisualPanel1.jPanel1.border.title" ) ) ) ; // NOI18N
jLabel3 . setFont ( new java . awt . Font ( "Lucida Grande" , 0 , 12 ) ) ; // NOI18N
org . openide . awt . Mnemonics . setLocalizedText ( jLabel5 , org . openide . util . NbBundle . getMessage ( CodelessProjectWizardVisualPanel1 . class , "CodelessProjectWizardVisualPanel1.jLabel5.text" ) ) ; // NOI18N
org . openide . awt . Mnemonics . setLocalizedText ( jLabel6 , org . openide . util . NbBundle . getMessage ( CodelessProjectWizardVisualPanel1 . class , "CodelessProjectWizardVisualPanel1.jLabel6.text" ) ) ; // NOI18N
org . openide . awt . Mnemonics . setLocalizedText ( jLabel7 , org . openide . util . NbBundle . getMessage ( CodelessProjectWizardVisualPanel1 . class , "CodelessProjectWizardVisualPanel1.jLabel7.text" ) ) ; // NOI18N
org . openide . awt . Mnemonics . setLocalizedText ( jLabel8 , org . openide . util . NbBundle . getMessage ( CodelessProjectWizardVisualPanel1 . class , "CodelessProjectWizardVisualPanel1.jLabel8.text" ) ) ; // NOI18N
javax . swing . GroupLayout jPanel1Layout = new javax . swing . GroupLayout ( jPanel1 ) ;
jPanel1 . setLayout ( jPanel1Layout ) ;
jPanel1Layout . setHorizontalGroup (
jPanel1Layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
. addGroup ( jPanel1Layout . createSequentialGroup ( )
. addContainerGap ( )
. addGroup ( jPanel1Layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
. addComponent ( jLabel6 )
. addComponent ( jLabel7 )
. addComponent ( jLabel5 )
. addComponent ( jLabel8 ) )
. addContainerGap ( 22 , Short . MAX_VALUE ) )
) ;
jPanel1Layout . setVerticalGroup (
jPanel1Layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
. addGroup ( jPanel1Layout . createSequentialGroup ( )
. addComponent ( jLabel6 )
. addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . RELATED )
. addComponent ( jLabel7 )
. addGap ( 18 , 18 , 18 )
. addComponent ( jLabel5 )
. addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . RELATED , 23 , Short . MAX_VALUE )
. addComponent ( jLabel8 )
. addContainerGap ( ) )
) ;
jLabel3 . setFont ( new java . awt . Font ( "Lucida Grande" , 0 , 12 ) ) ;
org . openide . awt . Mnemonics . setLocalizedText ( jLabel3 , org . openide . util . NbBundle . getMessage ( CodelessProjectWizardVisualPanel1 . class , "CodelessProjectWizardVisualPanel1.jLabel3.text" ) ) ; // NOI18N
org . openide . awt . Mnemonics . setLocalizedText ( jLabel3 , org . openide . util . NbBundle . getMessage ( CodelessProjectWizardVisualPanel1 . class , "CodelessProjectWizardVisualPanel1.jLabel3.text" ) ) ; // NOI18N
jToolBar1 . setFloatable ( false ) ;
jToolBar1 . setFloatable ( false ) ;
@ -146,6 +118,11 @@ public final class CodelessProjectWizardVisualPanel1 extends JPanel {
jToolBar1 . add ( jPanel2 ) ;
jToolBar1 . add ( jPanel2 ) ;
jTextField1 . setText ( org . openide . util . NbBundle . getMessage ( CodelessProjectWizardVisualPanel1 . class , "CodelessProjectWizardVisualPanel1.jTextField1.text" ) ) ; // NOI18N
jTextField1 . setText ( org . openide . util . NbBundle . getMessage ( CodelessProjectWizardVisualPanel1 . class , "CodelessProjectWizardVisualPanel1.jTextField1.text" ) ) ; // NOI18N
jTextField1 . addKeyListener ( new java . awt . event . KeyAdapter ( ) {
public void keyReleased ( java . awt . event . KeyEvent evt ) {
checkInput ( evt ) ;
}
} ) ;
jToolBar1 . add ( jTextField1 ) ;
jToolBar1 . add ( jTextField1 ) ;
org . openide . awt . Mnemonics . setLocalizedText ( jButton1 , org . openide . util . NbBundle . getMessage ( CodelessProjectWizardVisualPanel1 . class , "CodelessProjectWizardVisualPanel1.jButton1.text" ) ) ; // NOI18N
org . openide . awt . Mnemonics . setLocalizedText ( jButton1 , org . openide . util . NbBundle . getMessage ( CodelessProjectWizardVisualPanel1 . class , "CodelessProjectWizardVisualPanel1.jButton1.text" ) ) ; // NOI18N
@ -178,6 +155,11 @@ public final class CodelessProjectWizardVisualPanel1 extends JPanel {
jToolBar2 . add ( jPanel3 ) ;
jToolBar2 . add ( jPanel3 ) ;
jTextField2 . setText ( org . openide . util . NbBundle . getMessage ( CodelessProjectWizardVisualPanel1 . class , "CodelessProjectWizardVisualPanel1.jTextField2.text" ) ) ; // NOI18N
jTextField2 . setText ( org . openide . util . NbBundle . getMessage ( CodelessProjectWizardVisualPanel1 . class , "CodelessProjectWizardVisualPanel1.jTextField2.text" ) ) ; // NOI18N
jTextField2 . addKeyListener ( new java . awt . event . KeyAdapter ( ) {
public void keyReleased ( java . awt . event . KeyEvent evt ) {
checkInput ( evt ) ;
}
} ) ;
jToolBar2 . add ( jTextField2 ) ;
jToolBar2 . add ( jTextField2 ) ;
org . openide . awt . Mnemonics . setLocalizedText ( jButton2 , org . openide . util . NbBundle . getMessage ( CodelessProjectWizardVisualPanel1 . class , "CodelessProjectWizardVisualPanel1.jButton2.text" ) ) ; // NOI18N
org . openide . awt . Mnemonics . setLocalizedText ( jButton2 , org . openide . util . NbBundle . getMessage ( CodelessProjectWizardVisualPanel1 . class , "CodelessProjectWizardVisualPanel1.jButton2.text" ) ) ; // NOI18N
@ -188,9 +170,18 @@ public final class CodelessProjectWizardVisualPanel1 extends JPanel {
} ) ;
} ) ;
jToolBar2 . add ( jButton2 ) ;
jToolBar2 . add ( jButton2 ) ;
jLabel4 . setFont ( new java . awt . Font ( "Lucida Grande" , 0 , 12 ) ) ;
jLabel4 . setFont ( new java . awt . Font ( "Lucida Grande" , 0 , 12 ) ) ; // NOI18N
org . openide . awt . Mnemonics . setLocalizedText ( jLabel4 , org . openide . util . NbBundle . getMessage ( CodelessProjectWizardVisualPanel1 . class , "CodelessProjectWizardVisualPanel1.jLabel4.text" ) ) ; // NOI18N
org . openide . awt . Mnemonics . setLocalizedText ( jLabel4 , org . openide . util . NbBundle . getMessage ( CodelessProjectWizardVisualPanel1 . class , "CodelessProjectWizardVisualPanel1.jLabel4.text" ) ) ; // NOI18N
jTextArea1 . setEditable ( false ) ;
jTextArea1 . setColumns ( 20 ) ;
jTextArea1 . setLineWrap ( true ) ;
jTextArea1 . setRows ( 5 ) ;
jTextArea1 . setText ( org . openide . util . NbBundle . getMessage ( CodelessProjectWizardVisualPanel1 . class , "CodelessProjectWizardVisualPanel1.jTextArea1.text" ) ) ; // NOI18N
jTextArea1 . setWrapStyleWord ( true ) ;
jTextArea1 . setDisabledTextColor ( new java . awt . Color ( 0 , 0 , 0 ) ) ;
jScrollPane1 . setViewportView ( jTextArea1 ) ;
javax . swing . GroupLayout layout = new javax . swing . GroupLayout ( this ) ;
javax . swing . GroupLayout layout = new javax . swing . GroupLayout ( this ) ;
this . setLayout ( layout ) ;
this . setLayout ( layout ) ;
layout . setHorizontalGroup (
layout . setHorizontalGroup (
@ -198,11 +189,14 @@ public final class CodelessProjectWizardVisualPanel1 extends JPanel {
. addGroup ( javax . swing . GroupLayout . Alignment . TRAILING , layout . createSequentialGroup ( )
. addGroup ( javax . swing . GroupLayout . Alignment . TRAILING , layout . createSequentialGroup ( )
. addContainerGap ( )
. addContainerGap ( )
. addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . TRAILING )
. addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . TRAILING )
. addComponent ( jPanel1 , javax . swing . GroupLayout . Alignment . LEADING , javax . swing . GroupLayout . DEFAULT_SIZE , javax . swing . GroupLayout . DEFAULT_SIZE , Short . MAX_VALUE )
. addComponent ( jScrollPane1 )
. addComponent ( jToolBar1 , javax . swing . GroupLayout . Alignment . LEADING , javax . swing . GroupLayout . DEFAULT_SIZE , javax . swing . GroupLayout . DEFAULT_SIZE , Short . MAX_VALUE )
. addComponent ( jToolBar2 , javax . swing . GroupLayout . DEFAULT_SIZE , javax . swing . GroupLayout . DEFAULT_SIZE , Short . MAX_VALUE )
. addGroup ( javax . swing . GroupLayout . Alignment . LEADING , layout . createSequentialGroup ( )
. addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . TRAILING )
. addComponent ( jLabel3 , javax . swing . GroupLayout . Alignment . LEADING , javax . swing . GroupLayout . PREFERRED_SIZE , 447 , javax . swing . GroupLayout . PREFERRED_SIZE )
. addComponent ( jLabel3 , javax . swing . GroupLayout . Alignment . LEADING , javax . swing . GroupLayout . PREFERRED_SIZE , 447 , javax . swing . GroupLayout . PREFERRED_SIZE )
. addComponent ( jToolBar1 , javax . swing . GroupLayout . Alignment . LEADING , javax . swing . GroupLayout . DEFAULT_SIZE , 447 , Short . MAX_VALUE )
. addComponent ( jLabel4 , javax . swing . GroupLayout . Alignment . LEADING , javax . swing . GroupLayout . PREFERRED_SIZE , 300 , javax . swing . GroupLayout . PREFERRED_SIZE ) )
. addComponent ( jLabel4 , javax . swing . GroupLayout . Alignment . LEADING , javax . swing . GroupLayout . PREFERRED_SIZE , 300 , javax . swing . GroupLayout . PREFERRED_SIZE )
. addGap ( 0 , 0 , Short . MAX_VALUE ) ) )
. addComponent ( jToolBar2 , javax . swing . GroupLayout . DEFAULT_SIZE , 447 , Short . MAX_VALUE ) )
. addContainerGap ( ) )
. addContainerGap ( ) )
) ;
) ;
layout . setVerticalGroup (
layout . setVerticalGroup (
@ -216,38 +210,46 @@ public final class CodelessProjectWizardVisualPanel1 extends JPanel {
. addComponent ( jLabel4 )
. addComponent ( jLabel4 )
. addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . RELATED )
. addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . RELATED )
. addComponent ( jToolBar2 , javax . swing . GroupLayout . PREFERRED_SIZE , 25 , javax . swing . GroupLayout . PREFERRED_SIZE )
. addComponent ( jToolBar2 , javax . swing . GroupLayout . PREFERRED_SIZE , 25 , javax . swing . GroupLayout . PREFERRED_SIZE )
. addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . RELATED , 44 , Short . MAX_VALUE )
. addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . RELATED )
. addComponent ( jPanel1 , javax . swing . GroupLayout . PREFERRED_SIZE , javax . swing . GroupLayout . DEFAULT_SIZE , javax . swing . GroupLayout . PREFERRED_SIZ E)
. addComponent ( jScrollPane1 , javax . swing . GroupLayout . DEFAULT_SIZE , 227 , Short . MAX_VALU E)
. addContainerGap ( ) )
. addContainerGap ( ) )
) ;
) ;
} // </editor-fold>//GEN-END:initComponents
} // </editor-fold>//GEN-END:initComponents
private void jButton1ActionPerformed ( java . awt . event . ActionEvent evt ) { //GEN-FIRST:event_jButton1ActionPerformed
private void jButton1ActionPerformed ( java . awt . event . ActionEvent evt ) { //GEN-FIRST:event_jButton1ActionPerformed
FileChooserBuilder builder = new FileChooserBuilder ( System . getProperty ( "user.home" ) ) ;
FileChooserBuilder builder = new FileChooserBuilder ( getClass ( ) ) ;
builder . setDefaultWorkingDirectory ( new File ( System . getProperty ( "user.dir" ) ) ) ;
builder . setDirectoriesOnly ( true ) ;
builder . setDirectoriesOnly ( true ) ;
builder . setTitle ( "Select Project Folder" ) ;
builder . setTitle ( "Select Project Folder" ) ;
File file = builder . showOpenDialog ( ) ;
File file = builder . showOpenDialog ( ) ;
if ( file ! = null ) {
if ( file ! = null ) {
jTextField1 . setText ( file . getPath ( ) ) ;
jTextField1 . setText ( file . getAbsolutePath ( ) + File . separator ) ;
panel . fireChangeEvent ( ) ;
}
}
} //GEN-LAST:event_jButton1ActionPerformed
} //GEN-LAST:event_jButton1ActionPerformed
private void jButton2ActionPerformed ( java . awt . event . ActionEvent evt ) { //GEN-FIRST:event_jButton2ActionPerformed
private void jButton2ActionPerformed ( java . awt . event . ActionEvent evt ) { //GEN-FIRST:event_jButton2ActionPerformed
File path = new File ( jTextField1 . getText ( ) ) ;
String pathName = jTextField1 . getText ( ) ;
File path = new File ( pathName ) ;
if ( path . isDirectory ( ) ) {
if ( path . isDirectory ( ) ) {
FileChooserBuilder builder = new FileChooserBuilder ( path . getAbsolutePath ( ) . replaceAll ( "\\" , "/" ) ) ;
FileChooserBuilder builder = new FileChooserBuilder ( getClass ( ) ) ;
builder . setDefaultWorkingDirectory ( path ) ;
builder . setDirectoriesOnly ( true ) ;
builder . setDirectoriesOnly ( true ) ;
builder . setTitle ( "Select Assets Folder" ) ;
builder . setTitle ( "Select Assets Folder" ) ;
File file = builder . showOpenDialog ( ) ;
File file = builder . showOpenDialog ( ) ;
if ( file ! = null ) {
if ( file ! = null ) {
try {
try {
jTextField2 . setText ( file . getAbsolutePath ( ) . substring ( path . getAbsolutePath ( ) . length ( ) , file . getAbsolutePath ( ) . length ( ) ) . replaceAll ( "\\" , "/" ) ) ;
jTextField2 . setText ( file . getAbsolutePath ( ) . substring ( pathName . length ( ) , file . getAbsolutePath ( ) . length ( ) ) ) ;
panel . fireChangeEvent ( ) ;
} catch ( Exception e ) {
} catch ( Exception e ) {
}
}
}
}
}
}
} //GEN-LAST:event_jButton2ActionPerformed
} //GEN-LAST:event_jButton2ActionPerformed
private void checkInput ( java . awt . event . KeyEvent evt ) { //GEN-FIRST:event_checkInput
panel . fireChangeEvent ( ) ;
} //GEN-LAST:event_checkInput
// Variables declaration - do not modify//GEN-BEGIN:variables
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax . swing . JButton jButton1 ;
private javax . swing . JButton jButton1 ;
private javax . swing . JButton jButton2 ;
private javax . swing . JButton jButton2 ;
@ -255,13 +257,10 @@ public final class CodelessProjectWizardVisualPanel1 extends JPanel {
private javax . swing . JLabel jLabel2 ;
private javax . swing . JLabel jLabel2 ;
private javax . swing . JLabel jLabel3 ;
private javax . swing . JLabel jLabel3 ;
private javax . swing . JLabel jLabel4 ;
private javax . swing . JLabel jLabel4 ;
private javax . swing . JLabel jLabel5 ;
private javax . swing . JLabel jLabel6 ;
private javax . swing . JLabel jLabel7 ;
private javax . swing . JLabel jLabel8 ;
private javax . swing . JPanel jPanel1 ;
private javax . swing . JPanel jPanel2 ;
private javax . swing . JPanel jPanel2 ;
private javax . swing . JPanel jPanel3 ;
private javax . swing . JPanel jPanel3 ;
private javax . swing . JScrollPane jScrollPane1 ;
private javax . swing . JTextArea jTextArea1 ;
private javax . swing . JTextField jTextField1 ;
private javax . swing . JTextField jTextField1 ;
private javax . swing . JTextField jTextField2 ;
private javax . swing . JTextField jTextField2 ;
private javax . swing . JToolBar jToolBar1 ;
private javax . swing . JToolBar jToolBar1 ;