|
@@ -12,7 +12,6 @@ package com.compdfkit.tools.common.views.pdfproperties.pdfstyle;
|
|
|
|
|
|
import android.graphics.Color;
|
|
import android.graphics.Color;
|
|
import android.text.TextUtils;
|
|
import android.text.TextUtils;
|
|
-import android.util.Log;
|
|
|
|
|
|
|
|
import androidx.annotation.ColorInt;
|
|
import androidx.annotation.ColorInt;
|
|
import androidx.annotation.FloatRange;
|
|
import androidx.annotation.FloatRange;
|
|
@@ -26,6 +25,7 @@ import com.compdfkit.core.annotation.CPDFStampAnnotation;
|
|
import com.compdfkit.core.annotation.CPDFTextAttribute;
|
|
import com.compdfkit.core.annotation.CPDFTextAttribute;
|
|
import com.compdfkit.core.annotation.form.CPDFWidget;
|
|
import com.compdfkit.core.annotation.form.CPDFWidget;
|
|
import com.compdfkit.tools.R;
|
|
import com.compdfkit.tools.R;
|
|
|
|
+import com.compdfkit.tools.common.utils.CLog;
|
|
|
|
|
|
import java.io.Serializable;
|
|
import java.io.Serializable;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
@@ -117,7 +117,7 @@ public class CAnnotStyle implements Serializable {
|
|
public void setColor(@ColorInt int color) {
|
|
public void setColor(@ColorInt int color) {
|
|
boolean update = color != this.color;
|
|
boolean update = color != this.color;
|
|
this.color = color;
|
|
this.color = color;
|
|
- Log.e("CAnnotStyle", "setColor(" + color + ", update:" + update + ")");
|
|
|
|
|
|
+ CLog.e("CAnnotStyle", "setColor(" + color + ", update:" + update + ")");
|
|
updateColorListener(this.color, update);
|
|
updateColorListener(this.color, update);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -128,7 +128,7 @@ public class CAnnotStyle implements Serializable {
|
|
public void setOpacity(@IntRange(from = 0, to = 255) int opacity) {
|
|
public void setOpacity(@IntRange(from = 0, to = 255) int opacity) {
|
|
boolean update = opacity != this.opacity;
|
|
boolean update = opacity != this.opacity;
|
|
this.opacity = opacity;
|
|
this.opacity = opacity;
|
|
- Log.e("CAnnotStyle", "setOpacity(" + opacity + ", update:" + update + ")");
|
|
|
|
|
|
+ CLog.e("CAnnotStyle", "setOpacity(" + opacity + ", update:" + update + ")");
|
|
updateOpacity(this.opacity, update);
|
|
updateOpacity(this.opacity, update);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -142,7 +142,7 @@ public class CAnnotStyle implements Serializable {
|
|
if (borderStyle != null) {
|
|
if (borderStyle != null) {
|
|
borderStyle.setBorderWidth(this.borderWidth);
|
|
borderStyle.setBorderWidth(this.borderWidth);
|
|
}
|
|
}
|
|
- Log.e("CAnnotStyle", "setBorderWidth(" + borderWidth + ", update:" + update + ")");
|
|
|
|
|
|
+ CLog.e("CAnnotStyle", "setBorderWidth(" + borderWidth + ", update:" + update + ")");
|
|
updateBorderWidth(this.borderWidth, update);
|
|
updateBorderWidth(this.borderWidth, update);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -161,7 +161,7 @@ public class CAnnotStyle implements Serializable {
|
|
public void setBorderColor(@ColorInt int lineColor) {
|
|
public void setBorderColor(@ColorInt int lineColor) {
|
|
boolean update = lineColor != this.lineColor;
|
|
boolean update = lineColor != this.lineColor;
|
|
this.lineColor = lineColor;
|
|
this.lineColor = lineColor;
|
|
- Log.e("CAnnotStyle", "setLineColor(" + lineColor + ", update:" + update + ")");
|
|
|
|
|
|
+ CLog.e("CAnnotStyle", "setLineColor(" + lineColor + ", update:" + update + ")");
|
|
updateLineColor(lineColor, update);
|
|
updateLineColor(lineColor, update);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -172,7 +172,7 @@ public class CAnnotStyle implements Serializable {
|
|
public void setLineColorOpacity(@IntRange(from = 0, to = 255) int lineColorOpacity) {
|
|
public void setLineColorOpacity(@IntRange(from = 0, to = 255) int lineColorOpacity) {
|
|
boolean update = lineColorOpacity != this.lineColorOpacity;
|
|
boolean update = lineColorOpacity != this.lineColorOpacity;
|
|
this.lineColorOpacity = lineColorOpacity;
|
|
this.lineColorOpacity = lineColorOpacity;
|
|
- Log.e("CAnnotStyle", "setLineColorOpacity(" + lineColorOpacity + ", update:" + update + ")");
|
|
|
|
|
|
+ CLog.e("CAnnotStyle", "setLineColorOpacity(" + lineColorOpacity + ", update:" + update + ")");
|
|
updateLineColorOpacity(lineColorOpacity, update);
|
|
updateLineColorOpacity(lineColorOpacity, update);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -183,7 +183,7 @@ public class CAnnotStyle implements Serializable {
|
|
public void setFillColor(@ColorInt int fillColor) {
|
|
public void setFillColor(@ColorInt int fillColor) {
|
|
boolean update = fillColor != this.fillColor;
|
|
boolean update = fillColor != this.fillColor;
|
|
this.fillColor = fillColor;
|
|
this.fillColor = fillColor;
|
|
- Log.e("CAnnotStyle", "setFillColor(" + fillColor + ", update:" + update + ")");
|
|
|
|
|
|
+ CLog.e("CAnnotStyle", "setFillColor(" + fillColor + ", update:" + update + ")");
|
|
updateFillColor(fillColor, update);
|
|
updateFillColor(fillColor, update);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -195,14 +195,14 @@ public class CAnnotStyle implements Serializable {
|
|
public void setFillColorOpacity(@IntRange(from = 0, to = 255) int fillColorOpacity) {
|
|
public void setFillColorOpacity(@IntRange(from = 0, to = 255) int fillColorOpacity) {
|
|
boolean update = fillColorOpacity != this.fillColorOpacity;
|
|
boolean update = fillColorOpacity != this.fillColorOpacity;
|
|
this.fillColorOpacity = fillColorOpacity;
|
|
this.fillColorOpacity = fillColorOpacity;
|
|
- Log.e("CAnnotStyle", "setFillColorOpacity(" + fillColor + ", update:" + update + ")");
|
|
|
|
|
|
+ CLog.e("CAnnotStyle", "setFillColorOpacity(" + fillColor + ", update:" + update + ")");
|
|
updateFillColorOpacity(fillColorOpacity, update);
|
|
updateFillColorOpacity(fillColorOpacity, update);
|
|
}
|
|
}
|
|
|
|
|
|
public void setBorderStyle(CPDFBorderStyle borderStyle) {
|
|
public void setBorderStyle(CPDFBorderStyle borderStyle) {
|
|
boolean update = borderStyle != this.borderStyle && Arrays.equals(borderStyle.getDashArr(), this.borderStyle.getDashArr());
|
|
boolean update = borderStyle != this.borderStyle && Arrays.equals(borderStyle.getDashArr(), this.borderStyle.getDashArr());
|
|
this.borderStyle = borderStyle;
|
|
this.borderStyle = borderStyle;
|
|
- Log.e("CAnnotStyle", "setBorderStyle(" + borderStyle + ", update:" + update + ")");
|
|
|
|
|
|
+ CLog.e("CAnnotStyle", "setBorderStyle(" + borderStyle + ", update:" + update + ")");
|
|
updateBorderStyle(borderStyle, update);
|
|
updateBorderStyle(borderStyle, update);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -217,7 +217,7 @@ public class CAnnotStyle implements Serializable {
|
|
public void setStartLineType(CPDFLineAnnotation.LineType startLineType) {
|
|
public void setStartLineType(CPDFLineAnnotation.LineType startLineType) {
|
|
boolean update = startLineType != this.startLineType;
|
|
boolean update = startLineType != this.startLineType;
|
|
this.startLineType = startLineType;
|
|
this.startLineType = startLineType;
|
|
- Log.e("CAnnotStyle", "setStartLineType(" + startLineType + ", update:" + update + ")");
|
|
|
|
|
|
+ CLog.e("CAnnotStyle", "setStartLineType(" + startLineType + ", update:" + update + ")");
|
|
updateStartLineType(this.startLineType, update);
|
|
updateStartLineType(this.startLineType, update);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -228,7 +228,7 @@ public class CAnnotStyle implements Serializable {
|
|
public void setTailLineType(CPDFLineAnnotation.LineType tailLineType) {
|
|
public void setTailLineType(CPDFLineAnnotation.LineType tailLineType) {
|
|
boolean update = tailLineType != this.tailLineType;
|
|
boolean update = tailLineType != this.tailLineType;
|
|
this.tailLineType = tailLineType;
|
|
this.tailLineType = tailLineType;
|
|
- Log.e("CAnnotStyle", "setTailLineType(" + tailLineType + ", update:" + update + ")");
|
|
|
|
|
|
+ CLog.e("CAnnotStyle", "setTailLineType(" + tailLineType + ", update:" + update + ")");
|
|
updateTailLineType(this.tailLineType, update);
|
|
updateTailLineType(this.tailLineType, update);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -239,7 +239,7 @@ public class CAnnotStyle implements Serializable {
|
|
public void setFontBold(boolean fontBold) {
|
|
public void setFontBold(boolean fontBold) {
|
|
boolean update = fontBold != this.fontBold;
|
|
boolean update = fontBold != this.fontBold;
|
|
this.fontBold = fontBold;
|
|
this.fontBold = fontBold;
|
|
- Log.e("CAnnotStyle", "setFontBold(" + fontBold + ", update:" + update + ")");
|
|
|
|
|
|
+ CLog.e("CAnnotStyle", "setFontBold(" + fontBold + ", update:" + update + ")");
|
|
updateFontBold(this.fontBold, update);
|
|
updateFontBold(this.fontBold, update);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -250,7 +250,7 @@ public class CAnnotStyle implements Serializable {
|
|
public void setFontItalic(boolean fontItalic) {
|
|
public void setFontItalic(boolean fontItalic) {
|
|
boolean update = fontItalic != this.fontItalic;
|
|
boolean update = fontItalic != this.fontItalic;
|
|
this.fontItalic = fontItalic;
|
|
this.fontItalic = fontItalic;
|
|
- Log.e("CAnnotStyle", "setFontItalic(" + fontItalic + ", update:" + update + ")");
|
|
|
|
|
|
+ CLog.e("CAnnotStyle", "setFontItalic(" + fontItalic + ", update:" + update + ")");
|
|
updateFontItalic(this.fontItalic, update);
|
|
updateFontItalic(this.fontItalic, update);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -261,7 +261,7 @@ public class CAnnotStyle implements Serializable {
|
|
public void setFontColor(@ColorInt int textColor) {
|
|
public void setFontColor(@ColorInt int textColor) {
|
|
boolean update = textColor != this.textColor;
|
|
boolean update = textColor != this.textColor;
|
|
this.textColor = textColor;
|
|
this.textColor = textColor;
|
|
- Log.e("CAnnotStyle", "setTextColor(" + textColor + ", update:" + update + ")");
|
|
|
|
|
|
+ CLog.e("CAnnotStyle", "setTextColor(" + textColor + ", update:" + update + ")");
|
|
updateTextColor(textColor, update);
|
|
updateTextColor(textColor, update);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -272,7 +272,7 @@ public class CAnnotStyle implements Serializable {
|
|
public void setTextColorOpacity(@IntRange(from = 0, to = 255) int textColorOpacity) {
|
|
public void setTextColorOpacity(@IntRange(from = 0, to = 255) int textColorOpacity) {
|
|
boolean update = textColorOpacity != this.textColorOpacity;
|
|
boolean update = textColorOpacity != this.textColorOpacity;
|
|
this.textColorOpacity = textColorOpacity;
|
|
this.textColorOpacity = textColorOpacity;
|
|
- Log.e("CAnnotStyle", "setTextColorOpacity(" + textColorOpacity + ", update:" + update + ")");
|
|
|
|
|
|
+ CLog.e("CAnnotStyle", "setTextColorOpacity(" + textColorOpacity + ", update:" + update + ")");
|
|
updateTextColorOpacity(textColorOpacity, update);
|
|
updateTextColorOpacity(textColorOpacity, update);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -283,7 +283,7 @@ public class CAnnotStyle implements Serializable {
|
|
public void setFontSize(@IntRange(from = 0) int fontSize) {
|
|
public void setFontSize(@IntRange(from = 0) int fontSize) {
|
|
boolean update = fontSize != this.fontSize;
|
|
boolean update = fontSize != this.fontSize;
|
|
this.fontSize = fontSize;
|
|
this.fontSize = fontSize;
|
|
- Log.e("CAnnotStyle", "setFontSize(" + fontSize + ", update:" + update + ")");
|
|
|
|
|
|
+ CLog.e("CAnnotStyle", "setFontSize(" + fontSize + ", update:" + update + ")");
|
|
updateFontSize(fontSize, update);
|
|
updateFontSize(fontSize, update);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -299,7 +299,7 @@ public class CAnnotStyle implements Serializable {
|
|
boolean update = fontType != this.fontType;
|
|
boolean update = fontType != this.fontType;
|
|
this.fontType = fontType;
|
|
this.fontType = fontType;
|
|
externFontName = "";
|
|
externFontName = "";
|
|
- Log.e("CAnnotStyle", "setFontType(" + fontType + ", update:" + update + ")");
|
|
|
|
|
|
+ CLog.e("CAnnotStyle", "setFontType(" + fontType + ", update:" + update + ")");
|
|
updateFontType(fontType, update);
|
|
updateFontType(fontType, update);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -317,7 +317,7 @@ public class CAnnotStyle implements Serializable {
|
|
public void setAlignment(Alignment alignment) {
|
|
public void setAlignment(Alignment alignment) {
|
|
boolean update = alignment != this.alignment;
|
|
boolean update = alignment != this.alignment;
|
|
this.alignment = alignment;
|
|
this.alignment = alignment;
|
|
- Log.e("CAnnotStyle", "setAlignment(" + alignment + ", update:" + update + ")");
|
|
|
|
|
|
+ CLog.e("CAnnotStyle", "setAlignment(" + alignment + ", update:" + update + ")");
|
|
updateTextAlignment(alignment, update);
|
|
updateTextAlignment(alignment, update);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -331,13 +331,13 @@ public class CAnnotStyle implements Serializable {
|
|
|
|
|
|
public void setImagePath(String imagePath) {
|
|
public void setImagePath(String imagePath) {
|
|
this.imagePath = imagePath;
|
|
this.imagePath = imagePath;
|
|
- Log.e("CAnnotStyle", "setImagePath(" + imagePath + ", update:" + true + ")");
|
|
|
|
|
|
+ CLog.e("CAnnotStyle", "setImagePath(" + imagePath + ", update:" + true + ")");
|
|
updateImagePath(imagePath);
|
|
updateImagePath(imagePath);
|
|
}
|
|
}
|
|
|
|
|
|
public void setStandardStamp(CPDFStampAnnotation.StandardStamp standardStamp) {
|
|
public void setStandardStamp(CPDFStampAnnotation.StandardStamp standardStamp) {
|
|
this.standardStamp = standardStamp;
|
|
this.standardStamp = standardStamp;
|
|
- Log.e("CAnnotStyle", "setStandardStamp(" + standardStamp + ", update:" + true + ")");
|
|
|
|
|
|
+ CLog.e("CAnnotStyle", "setStandardStamp(" + standardStamp + ", update:" + true + ")");
|
|
updateStandardStamp(standardStamp);
|
|
updateStandardStamp(standardStamp);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -347,7 +347,7 @@ public class CAnnotStyle implements Serializable {
|
|
|
|
|
|
public void setTextStamp(CPDFStampAnnotation.TextStamp textStamp) {
|
|
public void setTextStamp(CPDFStampAnnotation.TextStamp textStamp) {
|
|
this.textStamp = textStamp;
|
|
this.textStamp = textStamp;
|
|
- Log.e("CAnnotStyle", "setTextStamp(" + textStamp + ", update:" + true + ")");
|
|
|
|
|
|
+ CLog.e("CAnnotStyle", "setTextStamp(" + textStamp + ", update:" + true + ")");
|
|
updateTextStamp(textStamp);
|
|
updateTextStamp(textStamp);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -357,7 +357,7 @@ public class CAnnotStyle implements Serializable {
|
|
|
|
|
|
public void setRotationAngle(float rotationAngle) {
|
|
public void setRotationAngle(float rotationAngle) {
|
|
this.rotationAngle = rotationAngle;
|
|
this.rotationAngle = rotationAngle;
|
|
- Log.e("CAnnotStyle", "setRotationAngle(" + rotationAngle + ", update:" + true + ")");
|
|
|
|
|
|
+ CLog.e("CAnnotStyle", "setRotationAngle(" + rotationAngle + ", update:" + true + ")");
|
|
setUpdatePropertyType(EditUpdatePropertyType.Rotation);
|
|
setUpdatePropertyType(EditUpdatePropertyType.Rotation);
|
|
updateRotationAngle(rotationAngle);
|
|
updateRotationAngle(rotationAngle);
|
|
}
|
|
}
|
|
@@ -368,7 +368,7 @@ public class CAnnotStyle implements Serializable {
|
|
|
|
|
|
public void setMirror(Mirror mirror) {
|
|
public void setMirror(Mirror mirror) {
|
|
this.mirror = mirror;
|
|
this.mirror = mirror;
|
|
- Log.e("CAnnotStyle", "setMirror(" + mirror + ", update:" + true + ")");
|
|
|
|
|
|
+ CLog.e("CAnnotStyle", "setMirror(" + mirror + ", update:" + true + ")");
|
|
setUpdatePropertyType(EditUpdatePropertyType.Mirror);
|
|
setUpdatePropertyType(EditUpdatePropertyType.Mirror);
|
|
updateMirror(mirror);
|
|
updateMirror(mirror);
|
|
}
|
|
}
|
|
@@ -380,7 +380,7 @@ public class CAnnotStyle implements Serializable {
|
|
public void setFormDefaultValue(String formDefaultValue) {
|
|
public void setFormDefaultValue(String formDefaultValue) {
|
|
boolean update = !formDefaultValue.equals(this.formDefaultValue);
|
|
boolean update = !formDefaultValue.equals(this.formDefaultValue);
|
|
this.formDefaultValue = formDefaultValue;
|
|
this.formDefaultValue = formDefaultValue;
|
|
- Log.e("CAnnotStyle", "setFormDefaultValue(" + formDefaultValue + ", update:" + update + ")");
|
|
|
|
|
|
+ CLog.e("CAnnotStyle", "setFormDefaultValue(" + formDefaultValue + ", update:" + update + ")");
|
|
updateDefaultValue(formDefaultValue, update);
|
|
updateDefaultValue(formDefaultValue, update);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -391,7 +391,7 @@ public class CAnnotStyle implements Serializable {
|
|
public void setFormFieldName(String formFieldName) {
|
|
public void setFormFieldName(String formFieldName) {
|
|
boolean update = !formFieldName.equals(this.formFieldName);
|
|
boolean update = !formFieldName.equals(this.formFieldName);
|
|
this.formFieldName = formFieldName;
|
|
this.formFieldName = formFieldName;
|
|
- Log.e("CAnnotStyle", "setFormFieldName(" + formFieldName + ", update:" + update + ")");
|
|
|
|
|
|
+ CLog.e("CAnnotStyle", "setFormFieldName(" + formFieldName + ", update:" + update + ")");
|
|
updateFieldName(formFieldName, update);
|
|
updateFieldName(formFieldName, update);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -402,7 +402,7 @@ public class CAnnotStyle implements Serializable {
|
|
public void setHideForm(boolean hideForm) {
|
|
public void setHideForm(boolean hideForm) {
|
|
boolean update = hideForm != this.hideForm;
|
|
boolean update = hideForm != this.hideForm;
|
|
this.hideForm = hideForm;
|
|
this.hideForm = hideForm;
|
|
- Log.e("CAnnotStyle", "setHideForm(" + hideForm + ", update:" + update + ")");
|
|
|
|
|
|
+ CLog.e("CAnnotStyle", "setHideForm(" + hideForm + ", update:" + update + ")");
|
|
updateHideForm(this.hideForm, update);
|
|
updateHideForm(this.hideForm, update);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -413,7 +413,7 @@ public class CAnnotStyle implements Serializable {
|
|
public void setFormMultiLine(boolean formMultiLine) {
|
|
public void setFormMultiLine(boolean formMultiLine) {
|
|
boolean update = formMultiLine != this.formMultiLine;
|
|
boolean update = formMultiLine != this.formMultiLine;
|
|
this.formMultiLine = formMultiLine;
|
|
this.formMultiLine = formMultiLine;
|
|
- Log.e("CAnnotStyle", "setFormMultiLine(" + formMultiLine + ", update:" + update + ")");
|
|
|
|
|
|
+ CLog.e("CAnnotStyle", "setFormMultiLine(" + formMultiLine + ", update:" + update + ")");
|
|
updateMultiLine(this.formMultiLine, update);
|
|
updateMultiLine(this.formMultiLine, update);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -423,7 +423,7 @@ public class CAnnotStyle implements Serializable {
|
|
|
|
|
|
public void setCheckStyle(CPDFWidget.CheckStyle checkStyle) {
|
|
public void setCheckStyle(CPDFWidget.CheckStyle checkStyle) {
|
|
this.checkStyle = checkStyle;
|
|
this.checkStyle = checkStyle;
|
|
- Log.e("CAnnotStyle", "setCheckStyle(" + checkStyle + ", update:" + true + ")");
|
|
|
|
|
|
+ CLog.e("CAnnotStyle", "setCheckStyle(" + checkStyle + ", update:" + true + ")");
|
|
updateCheckStyle(checkStyle, true);
|
|
updateCheckStyle(checkStyle, true);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -434,7 +434,7 @@ public class CAnnotStyle implements Serializable {
|
|
public void setChecked(boolean checked) {
|
|
public void setChecked(boolean checked) {
|
|
boolean update = checked != this.isChecked;
|
|
boolean update = checked != this.isChecked;
|
|
isChecked = checked;
|
|
isChecked = checked;
|
|
- Log.e("CAnnotStyle", "setChecked(" + isChecked + ", update:" + update + ")");
|
|
|
|
|
|
+ CLog.e("CAnnotStyle", "setChecked(" + isChecked + ", update:" + update + ")");
|
|
updateIsChecked(isChecked, update);
|
|
updateIsChecked(isChecked, update);
|
|
}
|
|
}
|
|
|
|
|