|
@@ -62,9 +62,9 @@ public class CFormStyle implements CStyleProvider {
|
|
|
CPDFTextWidget textWidget = (CPDFTextWidget) pdfAnnotation;
|
|
|
textWidget.setFieldName(style.getFormFieldName());
|
|
|
textWidget.setFontSize(style.getFontSize());
|
|
|
- textWidget.setFontRGBColor(style.getTextColor());
|
|
|
- textWidget.setWidgetBgRGBColor(style.getFillColor());
|
|
|
- textWidget.setWidgetBorderRGBColor(style.getLineColor());
|
|
|
+ textWidget.setFontColor(style.getTextColor());
|
|
|
+ textWidget.setFillColor(style.getFillColor());
|
|
|
+ textWidget.setBorderColor(style.getLineColor());
|
|
|
textWidget.setBorderWidth(style.getBorderWidth());
|
|
|
textWidget.setMultiLine(style.isFormMultiLine());
|
|
|
textWidget.setHidden(style.isHideForm());
|
|
@@ -73,16 +73,16 @@ public class CFormStyle implements CStyleProvider {
|
|
|
textWidget.setText(style.getFormDefaultValue());
|
|
|
switch (style.getAlignment()) {
|
|
|
case LEFT:
|
|
|
- textWidget.setJustification(CPDFTextAlignment.ALIGNMENT_LEFT);
|
|
|
+ textWidget.setTextAlignment(CPDFTextAlignment.ALIGNMENT_LEFT);
|
|
|
break;
|
|
|
case CENTER:
|
|
|
- textWidget.setJustification(CPDFTextAlignment.ALIGNMENT_CENTER);
|
|
|
+ textWidget.setTextAlignment(CPDFTextAlignment.ALIGNMENT_CENTER);
|
|
|
break;
|
|
|
case RIGHT:
|
|
|
- textWidget.setJustification(CPDFTextAlignment.ALIGNMENT_RIGHT);
|
|
|
+ textWidget.setTextAlignment(CPDFTextAlignment.ALIGNMENT_RIGHT);
|
|
|
break;
|
|
|
default:
|
|
|
- textWidget.setJustification(CPDFTextAlignment.ALIGNMENT_UNKNOWN);
|
|
|
+ textWidget.setTextAlignment(CPDFTextAlignment.ALIGNMENT_UNKNOWN);
|
|
|
break;
|
|
|
}
|
|
|
textWidget.updateAp();
|
|
@@ -92,10 +92,10 @@ public class CFormStyle implements CStyleProvider {
|
|
|
}
|
|
|
} else if (baseAnnotImpl instanceof CPDFCheckboxWidgetImpl) {
|
|
|
CPDFCheckboxWidget checkboxWidget = (CPDFCheckboxWidget) pdfAnnotation;
|
|
|
- checkboxWidget.setWidgetCheckStyle(style.getCheckStyle());
|
|
|
- checkboxWidget.setWidgetCheckColor(style.getColor());
|
|
|
- checkboxWidget.setWidgetBorderRGBColor(style.getLineColor());
|
|
|
- checkboxWidget.setWidgetBgRGBColor(style.getFillColor());
|
|
|
+ checkboxWidget.setCheckStyle(style.getCheckStyle());
|
|
|
+ checkboxWidget.setColor(style.getColor());
|
|
|
+ checkboxWidget.setBorderColor(style.getLineColor());
|
|
|
+ checkboxWidget.setFillColor(style.getFillColor());
|
|
|
checkboxWidget.setHidden(style.isHideForm());
|
|
|
checkboxWidget.setFieldName(style.getFormFieldName());
|
|
|
checkboxWidget.setChecked(style.isChecked());
|
|
@@ -106,10 +106,10 @@ public class CFormStyle implements CStyleProvider {
|
|
|
}
|
|
|
} else if (baseAnnotImpl instanceof CPDFRadiobuttonWidgetImpl) {
|
|
|
CPDFRadiobuttonWidget radiobuttonWidget = (CPDFRadiobuttonWidget) pdfAnnotation;
|
|
|
- radiobuttonWidget.setWidgetCheckStyle(style.getCheckStyle());
|
|
|
- radiobuttonWidget.setWidgetCheckColor(style.getColor());
|
|
|
- radiobuttonWidget.setWidgetBorderRGBColor(style.getLineColor());
|
|
|
- radiobuttonWidget.setWidgetBgRGBColor(style.getFillColor());
|
|
|
+ radiobuttonWidget.setCheckStyle(style.getCheckStyle());
|
|
|
+ radiobuttonWidget.setColor(style.getColor());
|
|
|
+ radiobuttonWidget.setBorderColor(style.getLineColor());
|
|
|
+ radiobuttonWidget.setFillColor(style.getFillColor());
|
|
|
radiobuttonWidget.setHidden(style.isHideForm());
|
|
|
radiobuttonWidget.setFieldName(style.getFormFieldName());
|
|
|
radiobuttonWidget.setChecked(style.isChecked());
|
|
@@ -124,12 +124,12 @@ public class CFormStyle implements CStyleProvider {
|
|
|
listBoxWidget.setHidden(style.isHideForm());
|
|
|
listBoxWidget.setBorderWidth(2);
|
|
|
listBoxWidget.setFontSize(style.getFontSize());
|
|
|
- listBoxWidget.setFontRGBColor(style.getTextColor());
|
|
|
- listBoxWidget.setWidgetBgRGBColor(style.getFillColor());
|
|
|
+ listBoxWidget.setFontColor(style.getTextColor());
|
|
|
+ listBoxWidget.setFillColor(style.getFillColor());
|
|
|
if (style.getLineColor() == Color.TRANSPARENT){
|
|
|
listBoxWidget.setBorderWidth(0);
|
|
|
}
|
|
|
- listBoxWidget.setWidgetBorderRGBColor(style.getLineColor());
|
|
|
+ listBoxWidget.setBorderColor(style.getLineColor());
|
|
|
String fontName = CPDFTextAttribute.FontNameHelper.obtainFontName(style.getFontType(), style.isFontBold(), style.isFontItalic());
|
|
|
listBoxWidget.setFontName(fontName);
|
|
|
listBoxWidget.updateAp();
|
|
@@ -143,12 +143,12 @@ public class CFormStyle implements CStyleProvider {
|
|
|
comboBoxWidget.setHidden(style.isHideForm());
|
|
|
comboBoxWidget.setBorderWidth(2);
|
|
|
comboBoxWidget.setFontSize(style.getFontSize());
|
|
|
- comboBoxWidget.setFontRGBColor(style.getTextColor());
|
|
|
- comboBoxWidget.setWidgetBgRGBColor(style.getFillColor());
|
|
|
+ comboBoxWidget.setFontColor(style.getTextColor());
|
|
|
+ comboBoxWidget.setFillColor(style.getFillColor());
|
|
|
if (style.getLineColor() == Color.TRANSPARENT){
|
|
|
comboBoxWidget.setBorderWidth(0);
|
|
|
}
|
|
|
- comboBoxWidget.setWidgetBorderRGBColor(style.getLineColor());
|
|
|
+ comboBoxWidget.setBorderColor(style.getLineColor());
|
|
|
String fontName = CPDFTextAttribute.FontNameHelper.obtainFontName(style.getFontType(), style.isFontBold(), style.isFontItalic());
|
|
|
comboBoxWidget.setFontName(fontName);
|
|
|
comboBoxWidget.updateAp();
|
|
@@ -162,9 +162,9 @@ public class CFormStyle implements CStyleProvider {
|
|
|
pushButtonWidget.setHidden(style.isHideForm());
|
|
|
pushButtonWidget.setBorderWidth(2);
|
|
|
pushButtonWidget.setFontSize(style.getFontSize());
|
|
|
- pushButtonWidget.setFontRGBColor(style.getTextColor());
|
|
|
- pushButtonWidget.setWidgetBgRGBColor(style.getFillColor());
|
|
|
- pushButtonWidget.setWidgetBorderRGBColor(style.getLineColor());
|
|
|
+ pushButtonWidget.setFontColor(style.getTextColor());
|
|
|
+ pushButtonWidget.setFillColor(style.getFillColor());
|
|
|
+ pushButtonWidget.setBorderColor(style.getLineColor());
|
|
|
String fontName = CPDFTextAttribute.FontNameHelper.obtainFontName(style.getFontType(), style.isFontBold(), style.isFontItalic());
|
|
|
pushButtonWidget.setFontName(fontName);
|
|
|
pushButtonWidget.setButtonTitle(style.getFormDefaultValue());
|
|
@@ -187,9 +187,9 @@ public class CFormStyle implements CStyleProvider {
|
|
|
style.setFormFieldName(textWidget.getFieldName());
|
|
|
style.setHideForm(textWidget.isHidden());
|
|
|
style.setFormMultiLine(textWidget.isMultiLine());
|
|
|
- style.setTextColor(textWidget.getFontRGBColor());
|
|
|
- style.setLineColor(textWidget.getWidgetBorderRGBColor());
|
|
|
- style.setFillColor(textWidget.getWidgetBgRGBColor());
|
|
|
+ style.setFontColor(textWidget.getFontColor());
|
|
|
+ style.setBorderColor(textWidget.getBorderColor());
|
|
|
+ style.setFillColor(textWidget.getFillColor());
|
|
|
CPDFTextAttribute.FontNameHelper.FontType fontType = CPDFTextAttribute.FontNameHelper.getFontType(textWidget.getFontName());
|
|
|
style.setFontType(fontType);
|
|
|
style.setBorderWidth(textWidget.getBorderWidth());
|
|
@@ -197,7 +197,7 @@ public class CFormStyle implements CStyleProvider {
|
|
|
style.setFontItalic(CPDFTextAttribute.FontNameHelper.isItalic(textWidget.getFontName()));
|
|
|
style.setFontSize((int) textWidget.getFontSize());
|
|
|
style.setFormDefaultValue(textWidget.getText());
|
|
|
- switch (textWidget.getJustification()) {
|
|
|
+ switch (textWidget.getTextAlignment()) {
|
|
|
case ALIGNMENT_LEFT:
|
|
|
style.setAlignment(CAnnotStyle.Alignment.LEFT);
|
|
|
break;
|
|
@@ -213,28 +213,28 @@ public class CFormStyle implements CStyleProvider {
|
|
|
}
|
|
|
} else if (baseAnnotImpl instanceof CPDFCheckboxWidgetImpl) {
|
|
|
CPDFCheckboxWidget textWidget = (CPDFCheckboxWidget) pdfAnnotation;
|
|
|
- style.setColor(textWidget.getWidgetCheckColor());
|
|
|
- style.setLineColor(textWidget.getWidgetBorderRGBColor());
|
|
|
- style.setFillColor(textWidget.getWidgetBgRGBColor());
|
|
|
- style.setCheckStyle(textWidget.getWidgetCheckStyle());
|
|
|
+ style.setColor(textWidget.getColor());
|
|
|
+ style.setBorderColor(textWidget.getBorderColor());
|
|
|
+ style.setFillColor(textWidget.getFillColor());
|
|
|
+ style.setCheckStyle(textWidget.getCheckStyle());
|
|
|
style.setFormFieldName(textWidget.getFieldName());
|
|
|
style.setHideForm(textWidget.isHidden());
|
|
|
style.setChecked(textWidget.isChecked());
|
|
|
} else if (baseAnnotImpl instanceof CPDFRadiobuttonWidgetImpl){
|
|
|
CPDFRadiobuttonWidget textWidget = (CPDFRadiobuttonWidget) pdfAnnotation;
|
|
|
- style.setColor(textWidget.getWidgetCheckColor());
|
|
|
- style.setLineColor(textWidget.getWidgetBorderRGBColor());
|
|
|
- style.setFillColor(textWidget.getWidgetBgRGBColor());
|
|
|
- style.setCheckStyle(textWidget.getWidgetCheckStyle());
|
|
|
+ style.setColor(textWidget.getColor());
|
|
|
+ style.setBorderColor(textWidget.getBorderColor());
|
|
|
+ style.setFillColor(textWidget.getFillColor());
|
|
|
+ style.setCheckStyle(textWidget.getCheckStyle());
|
|
|
style.setFormFieldName(textWidget.getFieldName());
|
|
|
style.setHideForm(textWidget.isHidden());
|
|
|
style.setChecked(textWidget.isChecked());
|
|
|
} else if (baseAnnotImpl instanceof CPDFListboxWidgetImpl){
|
|
|
CPDFListboxWidget listBoxWidget = (CPDFListboxWidget) pdfAnnotation;
|
|
|
style.setBorderWidth(2);
|
|
|
- style.setLineColor(listBoxWidget.getWidgetBorderRGBColor());
|
|
|
- style.setFillColor(listBoxWidget.getWidgetBgRGBColor());
|
|
|
- style.setTextColor(listBoxWidget.getFontRGBColor());
|
|
|
+ style.setBorderColor(listBoxWidget.getBorderColor());
|
|
|
+ style.setFillColor(listBoxWidget.getFillColor());
|
|
|
+ style.setFontColor(listBoxWidget.getFontColor());
|
|
|
style.setFontSize((int) listBoxWidget.getFontSize());
|
|
|
style.setFormFieldName(listBoxWidget.getFieldName());
|
|
|
style.setHideForm(listBoxWidget.isHidden());
|
|
@@ -245,9 +245,9 @@ public class CFormStyle implements CStyleProvider {
|
|
|
} else if (baseAnnotImpl instanceof CPDFComboboxWidgetImpl){
|
|
|
CPDFComboboxWidget comboBoxWidget = (CPDFComboboxWidget) pdfAnnotation;
|
|
|
style.setBorderWidth(2);
|
|
|
- style.setLineColor(comboBoxWidget.getWidgetBorderRGBColor());
|
|
|
- style.setFillColor(comboBoxWidget.getWidgetBgRGBColor());
|
|
|
- style.setTextColor(comboBoxWidget.getFontRGBColor());
|
|
|
+ style.setBorderColor(comboBoxWidget.getBorderColor());
|
|
|
+ style.setFillColor(comboBoxWidget.getFillColor());
|
|
|
+ style.setFontColor(comboBoxWidget.getFontColor());
|
|
|
style.setFontSize((int) comboBoxWidget.getFontSize());
|
|
|
style.setFormFieldName(comboBoxWidget.getFieldName());
|
|
|
style.setHideForm(comboBoxWidget.isHidden());
|
|
@@ -258,9 +258,9 @@ public class CFormStyle implements CStyleProvider {
|
|
|
} else if (baseAnnotImpl instanceof CPDFPushbuttonWidgetImpl){
|
|
|
CPDFPushbuttonWidget pushButtonWidget = (CPDFPushbuttonWidget) pdfAnnotation;
|
|
|
style.setBorderWidth(2);
|
|
|
- style.setLineColor(pushButtonWidget.getWidgetBorderRGBColor());
|
|
|
- style.setFillColor(pushButtonWidget.getWidgetBgRGBColor());
|
|
|
- style.setTextColor(pushButtonWidget.getFontRGBColor());
|
|
|
+ style.setBorderColor(pushButtonWidget.getBorderColor());
|
|
|
+ style.setFillColor(pushButtonWidget.getFillColor());
|
|
|
+ style.setFontColor(pushButtonWidget.getFontColor());
|
|
|
style.setFontSize((int) pushButtonWidget.getFontSize());
|
|
|
style.setFormFieldName(pushButtonWidget.getFieldName());
|
|
|
style.setHideForm(pushButtonWidget.isHidden());
|