Package com.iizigo.prop.editor
Class PKCS12IdentityPropEditor
- java.lang.Object
- com.iizigo.prop.BaseEditor<PKCS12IdentityProp,byte[]>
- com.iizigo.prop.editor.PKCS12IdentityPropEditor
- All Implemented Interfaces:
IEditedPropControllerOwner<PKCS12IdentityProp,byte[]>,IEditedPropertyEntry<PKCS12IdentityProp,byte[]>,IEditedPropertyEntryMultiProp<PKCS12IdentityProp,byte[]>,IPropertyDefined
public class PKCS12IdentityPropEditor extends BaseEditor<PKCS12IdentityProp,byte[]>
The PKCS#12 Identity property editor.- Author:
- Christopher Mindus
Field Summary
Fields inherited from class com.iizigo.prop.BaseEditor
appUI, combo, control, controller, definedButton, display, editor, focusListener, hasBeenModified, info, more, multipleValueWarningInput, options, parent, propController, shell, text, validator, wasDefinedAtFocusGained
Constructor Summary
Constructors Constructor Description PKCS12IdentityPropEditor()Default constructor called before createControls.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassignKeyStore(PKCS12IdentityProp id, java.lang.String password)Assigns a new keystore and password.protected voidcreate()Creates the property editor controls.protected booleandoUndefineIfEmpty(boolean focusLost)Keeps empty strings as defined, when input has been changed specifically to empty string, or if the entry was defined when editing began.java.lang.StringformatValue(byte[] value)Formats the value for user input as a String.byte[]getDefaultValue()Gets the default defined value to set in the property when defined.PKCS12IdentityPropgetEditedProp()Gets the single edited property.PropCnrgetEditedPropParent()Gets the single property parent.PropCnr[]getEditedPropParents()Gets the property parents.PKCS12IdentityProp[]getEditedProps()Gets the array of edited properties.IzToolTipgetNativeToolTip()Gets a "native" tooltip to use.protected java.lang.StringgetToolTipText()Gets the tooltip text to display in the entry fields (not the one for property errors or validator).protected byte[]getValue(java.lang.String input)Gets the property value for a user input.voidonDefine(boolean on)Called to define or undefine.protected voidonDoubleClick(org.eclipse.swt.widgets.Event e)Called when mouse is double-clicked in the text or combobox.voidonMore()Called when the "more..." button is pressed.protected voidsetToolTipText(java.lang.String msg)Sets the tooltip text.Methods inherited from class com.iizigo.prop.BaseEditor
assignMaster, beginProcessEvent, canProcessEvents, checkInput, createCCombo, createControls, createGridLayout, createIzMenu, createMoreButton, createMoreIzMenu, createText, dispose, doValueChangeConversion, endProcessEvent, getBaseEditor, getCurrentInput, getCurrentValue, getCurrentValues, getModifyListener, getOption, getSelectionListener, getSeverity, getShell, getToolTipText2, hasFocus, initialize, isPropReadOnly, onDispose, onError, onF4List, onFocusGained, onFocusLost, onReadOnly, onUndefined, onUpdate, setColors, setCurrentValue, setEditable, setFocus, setInput, setInputValue, setInputValueFromProp, showMenu, updateTooltip, validate
Method Detail
create
protected void create()
Creates the property editor controls.- Specified by:
createin classBaseEditor<PKCS12IdentityProp,byte[]>
getNativeToolTip
public IzToolTip getNativeToolTip()
Gets a "native" tooltip to use.- Overrides:
getNativeToolTipin classBaseEditor<PKCS12IdentityProp,byte[]>- Returns:
- null for none, otherwise the IzToolTip instance.
setToolTipText
protected void setToolTipText(java.lang.String msg)
Sets the tooltip text. The default is to apply the getToolTipText() text to the edit control.- Overrides:
setToolTipTextin classBaseEditor<PKCS12IdentityProp,byte[]>- Parameters:
msg- Message in tooltip (normally error), null for none, in which case the getToolTipText2() is used.
getEditedProps
public PKCS12IdentityProp[] getEditedProps()
Gets the array of edited properties.
getEditedProp
public PKCS12IdentityProp getEditedProp()
Gets the single edited property.- Returns:
- The single instance, or null for multiple or none.
getEditedPropParent
public PropCnr getEditedPropParent()
Gets the single property parent.- Returns:
- The parent, or null for multiple or none.
getEditedPropParents
public PropCnr[] getEditedPropParents()
Gets the property parents.- Returns:
- The parent, or null for multiple or none.
getToolTipText
protected java.lang.String getToolTipText()
Gets the tooltip text to display in the entry fields (not the one for property errors or validator).- Specified by:
getToolTipTextin classBaseEditor<PKCS12IdentityProp,byte[]>
getDefaultValue
public byte[] getDefaultValue()
Gets the default defined value to set in the property when defined.- Specified by:
getDefaultValuein interfaceIEditedPropControllerOwner<PKCS12IdentityProp,byte[]>- Specified by:
getDefaultValuein classBaseEditor<PKCS12IdentityProp,byte[]>
doUndefineIfEmpty
protected boolean doUndefineIfEmpty(boolean focusLost)
Keeps empty strings as defined, when input has been changed specifically to empty string, or if the entry was defined when editing began.- Overrides:
doUndefineIfEmptyin classBaseEditor<PKCS12IdentityProp,byte[]>
getValue
protected byte[] getValue(java.lang.String input)
Gets the property value for a user input.- Specified by:
getValuein classBaseEditor<PKCS12IdentityProp,byte[]>- Parameters:
input- The current user input.- Returns:
- The property value for the input, or null to un-define the property.
formatValue
public java.lang.String formatValue(byte[] value)
Formats the value for user input as a String.- Specified by:
formatValuein interfaceIEditedPropControllerOwner<PKCS12IdentityProp,byte[]>- Specified by:
formatValuein classBaseEditor<PKCS12IdentityProp,byte[]>- Parameters:
value- The value.- Returns:
- The formatted value.
onDefine
public void onDefine(boolean on)
Called to define or undefine.- Specified by:
onDefinein interfaceIPropertyDefined- Overrides:
onDefinein classBaseEditor<PKCS12IdentityProp,byte[]>- Parameters:
on- The defined state.
onDoubleClick
protected void onDoubleClick(org.eclipse.swt.widgets.Event e)
Called when mouse is double-clicked in the text or combobox. Overridden to check if Goto reference is enabled, and if so goes there.- Overrides:
onDoubleClickin classBaseEditor<PKCS12IdentityProp,byte[]>
onMore
public void onMore()
Called when the "more..." button is pressed. Override to display dialog box.- Overrides:
onMorein classBaseEditor<PKCS12IdentityProp,byte[]>
assignKeyStore
public void assignKeyStore(PKCS12IdentityProp id, java.lang.String password)
Assigns a new keystore and password.- Parameters:
id- The keystore property.password- The password for the keystore and private key (same password).