📄 fdffield.java
字号:
field.setItem( "SetFf", value );
}
/**
* This will get the field flags that are associated with this field. The SetFf entry
* in the FDF field dictionary.
*
* @param ff The new value for the "set field flags".
*/
public void setSetFieldFlags( int ff )
{
field.setItem( "SetFf", new COSInteger( ff ) );
}
/**
* This will get the ClrFf entry of the cos dictionary. If it it not present then
* this method will return null.
*
* @return The field flags.
*/
public Integer getClearFieldFlags()
{
Integer retval = null;
COSNumber ff = (COSNumber)field.getDictionaryObject( "ClrFf" );
if( ff != null )
{
retval = new Integer( ff.intValue() );
}
return retval;
}
/**
* This will get the field flags that are associated with this field. The ClrFf entry
* in the FDF field dictionary.
*
* @param ff The new value for the "clear field flags".
*/
public void setClearFieldFlags( Integer ff )
{
COSInteger value = null;
if( ff != null )
{
value = new COSInteger( ff.intValue() );
}
field.setItem( "ClrFf", value );
}
/**
* This will get the field flags that are associated with this field. The ClrFf entry
* in the FDF field dictionary.
*
* @param ff The new value for the "clear field flags".
*/
public void setClearFieldFlags( int ff )
{
field.setItem( "ClrFf", new COSInteger( ff ) );
}
/**
* This will get the F entry of the cos dictionary. If it it not present then
* this method will return null.
*
* @return The widget field flags.
*/
public Integer getWidgetFieldFlags()
{
Integer retval = null;
COSNumber f = (COSNumber)field.getDictionaryObject( "F" );
if( f != null )
{
retval = new Integer( f.intValue() );
}
return retval;
}
/**
* This will get the widget field flags that are associated with this field. The F entry
* in the FDF field dictionary.
*
* @param f The new value for the field flags.
*/
public void setWidgetFieldFlags( Integer f )
{
COSInteger value = null;
if( f != null )
{
value = new COSInteger( f.intValue() );
}
field.setItem( "F", value );
}
/**
* This will get the field flags that are associated with this field. The F entry
* in the FDF field dictionary.
*
* @param f The new value for the field flags.
*/
public void setWidgetFieldFlags( int f )
{
field.setItem( "F", new COSInteger( f ) );
}
/**
* This will get the SetF entry of the cos dictionary. If it it not present then
* this method will return null.
*
* @return The field flags.
*/
public Integer getSetWidgetFieldFlags()
{
Integer retval = null;
COSNumber ff = (COSNumber)field.getDictionaryObject( "SetF" );
if( ff != null )
{
retval = new Integer( ff.intValue() );
}
return retval;
}
/**
* This will get the widget field flags that are associated with this field. The SetF entry
* in the FDF field dictionary.
*
* @param ff The new value for the "set widget field flags".
*/
public void setSetWidgetFieldFlags( Integer ff )
{
COSInteger value = null;
if( ff != null )
{
value = new COSInteger( ff.intValue() );
}
field.setItem( "SetF", value );
}
/**
* This will get the widget field flags that are associated with this field. The SetF entry
* in the FDF field dictionary.
*
* @param ff The new value for the "set widget field flags".
*/
public void setSetWidgetFieldFlags( int ff )
{
field.setItem( "SetF", new COSInteger( ff ) );
}
/**
* This will get the ClrF entry of the cos dictionary. If it it not present then
* this method will return null.
*
* @return The widget field flags.
*/
public Integer getClearWidgetFieldFlags()
{
Integer retval = null;
COSNumber ff = (COSNumber)field.getDictionaryObject( "ClrF" );
if( ff != null )
{
retval = new Integer( ff.intValue() );
}
return retval;
}
/**
* This will get the field flags that are associated with this field. The ClrF entry
* in the FDF field dictionary.
*
* @param ff The new value for the "clear widget field flags".
*/
public void setClearWidgetFieldFlags( Integer ff )
{
COSInteger value = null;
if( ff != null )
{
value = new COSInteger( ff.intValue() );
}
field.setItem( "ClrF", value );
}
/**
* This will get the field flags that are associated with this field. The ClrF entry
* in the FDF field dictionary.
*
* @param ff The new value for the "clear field flags".
*/
public void setClearWidgetFieldFlags( int ff )
{
field.setItem( "ClrF", new COSInteger( ff ) );
}
/**
* This will get the appearance dictionary that specifies the appearance of
* a pushbutton field.
*
* @return The AP entry of this dictionary.
*/
public PDAppearanceDictionary getAppearanceDictionary()
{
PDAppearanceDictionary retval = null;
COSDictionary dict = (COSDictionary)field.getDictionaryObject( "AP" );
if( dict != null )
{
retval = new PDAppearanceDictionary( dict );
}
return retval;
}
/**
* This will set the appearance dictionary.
*
* @param ap The apperance dictionary.
*/
public void setAppearanceDictionary( PDAppearanceDictionary ap )
{
field.setItem( "AP", ap );
}
/**
* This will get named page references..
*
* @return The named page references.
*/
public FDFNamedPageReference getAppearanceStreamReference()
{
FDFNamedPageReference retval = null;
COSDictionary ref = (COSDictionary)field.getDictionaryObject( "APRef" );
if( ref != null )
{
retval = new FDFNamedPageReference( ref );
}
return retval;
}
/**
* This will set the named page references.
*
* @param ref The named page references.
*/
public void setAppearanceStreamReference( FDFNamedPageReference ref )
{
field.setItem( "APRef", ref );
}
/**
* This will get the icon fit that is associated with this field.
*
* @return The IF entry.
*/
public FDFIconFit getIconFit()
{
FDFIconFit retval = null;
COSDictionary dic = (COSDictionary)field.getDictionaryObject( "IF" );
if( dic != null )
{
retval = new FDFIconFit( dic );
}
return retval;
}
/**
* This will set the icon fit entry.
*
* @param fit The icon fit object.
*/
public void setIconFit( FDFIconFit fit )
{
field.setItem( "IF", fit );
}
/**
* This will return a list of options for a choice field. The value in the
* list will be 1 of 2 types. java.lang.String or FDFOptionElement.
*
* @return A list of all options.
*/
public List getOptions()
{
List retval = null;
COSArray array = (COSArray)field.getDictionaryObject( "Opt" );
if( array != null )
{
List objects = new ArrayList();
for( int i=0; i<array.size(); i++ )
{
COSBase next = array.getObject( i );
if( next instanceof COSString )
{
objects.add( ((COSString)next).getString() );
}
else
{
COSArray value = (COSArray)next;
objects.add( new FDFOptionElement( value ) );
}
}
retval = new COSArrayList( objects, array );
}
return retval;
}
/**
* This will set the options for the choice field. The objects in the list
* should either be java.lang.String or FDFOptionElement.
*
* @param options The options to set.
*/
public void setOptions( List options )
{
COSArray value = COSArrayList.converterToCOSArray( options );
field.setItem( "Opt", value );
}
/**
* This will get the action that is associated with this field.
*
* @return The A entry in the field dictionary.
*/
public PDAction getAction()
{
return PDActionFactory.createAction( (COSDictionary)field.getDictionaryObject( "A" ) );
}
/**
* This will set the action that is associated with this field.
*
* @param a The new action.
*/
public void setAction( PDAction a )
{
field.setItem( "A", a );
}
/**
* This will get a list of additional actions that will get executed based
* on events.
*
* @return The AA entry in this field dictionary.
*/
public PDAdditionalActions getAdditionalActions()
{
PDAdditionalActions retval = null;
COSDictionary dict = (COSDictionary)field.getDictionaryObject( "AA" );
if( dict != null )
{
retval = new PDAdditionalActions( dict );
}
return retval;
}
/**
* This will set the additional actions that are associated with this field.
*
* @param aa The additional actions.
*/
public void setAdditionalActions( PDAdditionalActions aa )
{
field.setItem( "AA", aa );
}
/**
* This will set the rich text that is associated with this field.
*
* @return The rich text XHTML stream.
*/
public PDTextStream getRichText()
{
COSBase rv = field.getDictionaryObject( "RV" );
return PDTextStream.createTextStream( rv );
}
/**
* This will set the rich text value.
*
* @param rv The rich text value for the stream.
*/
public void setRichText( PDTextStream rv )
{
field.setItem( "RV", rv );
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -