sam.ui.awt
Class RulingInterface
java.lang.Object
|
+--sam.ui.RulingInterface
|
+--sam.ui.awt.RulingInterface
- public class RulingInterface
- extends RulingInterface
AWT-based implementation
of a RulingInterface
Method Summary |
protected java.lang.String |
choose(java.lang.String title,
java.lang.String[] values)
Prompts the user for entering a string. |
protected sam.cipher.Specification[] |
enterCiphers(java.lang.String title,
sam.cipher.Specification[] ciphers,
boolean canAddCiphers)
Prompts the user for entering the ciphers/passwords. |
protected java.io.File |
enterFileOrDirectory(java.lang.String title,
java.io.File suggestedValue,
RulingInterface.AccessMode mode)
Prompts the user for entering a file name. |
protected int |
enterInteger(java.lang.String title,
int suggestedValue,
int min,
int max)
Prompts the user for entering an integral number. |
protected java.lang.String |
enterString(java.lang.String title,
java.lang.String suggestedValue)
Prompts the user for entering a string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RulingInterface
public RulingInterface()
enterString
protected java.lang.String enterString(java.lang.String title,
java.lang.String suggestedValue)
- Description copied from class:
RulingInterface
- Prompts the user for entering a string.
This is a basic and general-purpose method.
- Specified by:
enterString
in class RulingInterface
- Parameters:
title
- the title (or type) of the value to be chosensuggestedValue
- the suggested (yet invalid) value
In current implementation this will always be null
since this is the
only "invalid" String
enterInteger
protected int enterInteger(java.lang.String title,
int suggestedValue,
int min,
int max)
- Description copied from class:
RulingInterface
- Prompts the user for entering an integral number.
- Specified by:
enterInteger
in class RulingInterface
- Parameters:
title
- the title (or type) of the value to be chosensuggestedValue
- the suggested number to be returned if validmin
- the minimum allowed value, or Integer.MIN_VALUE
max
- the maximum allowed value, or Integer.MAX_VALUE
enterFileOrDirectory
protected java.io.File enterFileOrDirectory(java.lang.String title,
java.io.File suggestedValue,
RulingInterface.AccessMode mode)
- Description copied from class:
RulingInterface
- Prompts the user for entering a file name.
- Specified by:
enterFileOrDirectory
in class RulingInterface
- Parameters:
title
- the title (or type) of the directory to be chosensuggestedValue
- the suggested (yet invalid) file or directory to be returnedmode
- the required access mode for this file
choose
protected java.lang.String choose(java.lang.String title,
java.lang.String[] values)
- Description copied from class:
RulingInterface
- Prompts the user for entering a string.
- Specified by:
choose
in class RulingInterface
- Parameters:
title
- the title (or type) of the value to be chosenvalues
- the list of allowed values
enterCiphers
protected sam.cipher.Specification[] enterCiphers(java.lang.String title,
sam.cipher.Specification[] ciphers,
boolean canAddCiphers)
- Description copied from class:
RulingInterface
- Prompts the user for entering the ciphers/passwords.
- Specified by:
enterCiphers
in class RulingInterface
- Parameters:
title
- the non-null
titleciphers
- the suggested ciphers list or null
if none specifiedcanAddCiphers
- wether the user can add/remove ciphers or simply supply passwords