net.sf.kernow.ui
Class ViewHelper

java.lang.Object
  extended by net.sf.kernow.ui.ViewHelper

public class ViewHelper
extends java.lang.Object


Constructor Summary
ViewHelper()
           
 
Method Summary
 java.lang.String chooseFile(javax.swing.JComboBox comboBox, boolean chooseAFolder)
          TODO: ...
 java.lang.String getComboBoxValue(javax.swing.JComboBox comboBox)
          Returns the currently selected combobox value.
 void loadComboBoxValues(java.util.Properties properties, javax.swing.JComboBox comboBox, java.lang.String name)
          TODO: ...
 void saveComboBoxValues(java.util.Properties props, javax.swing.JComboBox comboBox, java.lang.String name)
          TODO: ...
 void setCaretPosition(javax.swing.JComboBox comboBox)
          When the text is longer than the text box it gets centered, this method ensures they all show the end of the text, eg the filename.
 void updateComboBoxNoDuplicate(javax.swing.JComboBox comboBox)
          TODO: ...
 void updateComboBoxNoDuplicate(javax.swing.JComboBox comboBox, java.lang.String value)
          TODO: ...
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewHelper

public ViewHelper()
Method Detail

getComboBoxValue

public java.lang.String getComboBoxValue(javax.swing.JComboBox comboBox)
Returns the currently selected combobox value. If there is no value, it return the empty string.


loadComboBoxValues

public void loadComboBoxValues(java.util.Properties properties,
                               javax.swing.JComboBox comboBox,
                               java.lang.String name)
TODO: ...


saveComboBoxValues

public void saveComboBoxValues(java.util.Properties props,
                               javax.swing.JComboBox comboBox,
                               java.lang.String name)
TODO: ...


setCaretPosition

public void setCaretPosition(javax.swing.JComboBox comboBox)
When the text is longer than the text box it gets centered, this method ensures they all show the end of the text, eg the filename.


chooseFile

public java.lang.String chooseFile(javax.swing.JComboBox comboBox,
                                   boolean chooseAFolder)
TODO: ...

Parameters:
chooseAFolder - true if the dialog should return a folder, false if a file is wanted

updateComboBoxNoDuplicate

public void updateComboBoxNoDuplicate(javax.swing.JComboBox comboBox)
TODO: ...


updateComboBoxNoDuplicate

public void updateComboBoxNoDuplicate(javax.swing.JComboBox comboBox,
                                      java.lang.String value)
TODO: ...