ch.sahits.phpclassgenerator.wizards
Class PhpClassWizardDBPage

java.lang.Object
  extended by org.eclipse.jface.dialogs.DialogPage
      extended by org.eclipse.jface.wizard.WizardPage
          extended by ch.sahits.phpclassgenerator.wizards.PhpClassWizardDBPage
All Implemented Interfaces:
org.eclipse.jface.dialogs.IDialogPage, org.eclipse.jface.dialogs.IMessageProvider, org.eclipse.jface.wizard.IWizardPage

public class PhpClassWizardDBPage
extends org.eclipse.jface.wizard.WizardPage

The "New" wizard page allows setting the container for the new file as well as the file name. The page will only accept file name without the extension OR with the extension that matches the expected one (php). $Revision: 1.4 $ changed by $Author: hotzst $ at $Date: 2007/12/31 13:20:23 $


Field Summary
private  org.eclipse.swt.widgets.Text db
           
private  org.eclipse.swt.widgets.Combo dbProduct
           
private  org.eclipse.swt.widgets.Text host
           
private  org.eclipse.swt.widgets.Text password
           
private  boolean sel
           
private  org.eclipse.jface.viewers.ISelection selection
           
private  org.eclipse.swt.widgets.Text table
           
private  org.eclipse.swt.widgets.Text user
           
private  org.eclipse.swt.widgets.Button withDB
           
private  org.eclipse.swt.widgets.Button withoutDB
           
 
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
ERROR, INFORMATION, NONE, WARNING
 
Constructor Summary
PhpClassWizardDBPage(org.eclipse.jface.viewers.ISelection selection)
          Constructor for SampleNewWizardPage.
 
Method Summary
 void createControl(org.eclipse.swt.widgets.Composite parent)
           
private  void dialogChanged()
          Ensures that both text fields are set.
private  void enableInput(boolean enabled)
          Enable or disable all input fields at once
 java.lang.String getDb()
           
 java.lang.String getDbProduct()
           
 java.lang.String getHost()
           
 java.lang.String getPassword()
           
 java.lang.String getTable()
           
 java.lang.String getUser()
           
private  void initialize()
          Tests if the current workbench selection is a suitable container to use.
private  void updateStatus(java.lang.String message)
           
 boolean withDBSelected()
          Check if the selection is on with DB or on without
 
Methods inherited from class org.eclipse.jface.wizard.WizardPage
canFlipToNextPage, getContainer, getDialogSettings, getImage, getName, getNextPage, getPreviousPage, getShell, getWizard, isCurrentPage, isPageComplete, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toString
 
Methods inherited from class org.eclipse.jface.dialogs.DialogPage
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessage, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage
dispose, getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp, setVisible
 

Field Detail

dbProduct

private org.eclipse.swt.widgets.Combo dbProduct

host

private org.eclipse.swt.widgets.Text host

db

private org.eclipse.swt.widgets.Text db

user

private org.eclipse.swt.widgets.Text user

password

private org.eclipse.swt.widgets.Text password

table

private org.eclipse.swt.widgets.Text table

withDB

private org.eclipse.swt.widgets.Button withDB

withoutDB

private org.eclipse.swt.widgets.Button withoutDB

sel

private boolean sel

selection

private org.eclipse.jface.viewers.ISelection selection
Constructor Detail

PhpClassWizardDBPage

public PhpClassWizardDBPage(org.eclipse.jface.viewers.ISelection selection)
Constructor for SampleNewWizardPage.

Parameters:
selection - selection
Method Detail

createControl

public void createControl(org.eclipse.swt.widgets.Composite parent)
See Also:
IDialogPage.createControl(Composite)

initialize

private void initialize()
Tests if the current workbench selection is a suitable container to use.


dialogChanged

private void dialogChanged()
Ensures that both text fields are set.


enableInput

private void enableInput(boolean enabled)
Enable or disable all input fields at once

Parameters:
enabled -

updateStatus

private void updateStatus(java.lang.String message)

getDbProduct

public java.lang.String getDbProduct()
Returns:
the dbProduct

getHost

public java.lang.String getHost()
Returns:
the host

getDb

public java.lang.String getDb()
Returns:
the db

getUser

public java.lang.String getUser()
Returns:
the user

getPassword

public java.lang.String getPassword()
Returns:
the password

getTable

public java.lang.String getTable()
Returns:
the table

withDBSelected

public boolean withDBSelected()
Check if the selection is on with DB or on without

Returns:
true if it is on with DB