mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-03 17:59:33 +02:00
obsolete code
This commit is contained in:
parent
fb574f159a
commit
8a0c09c934
7 changed files with 79 additions and 200 deletions
|
@ -296,12 +296,12 @@ public class PreferenceActivity extends ZLPreferenceActivity {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
final ZLTextFullStyleDecoration decoration = collection.getDecoration(styles[i]);
|
final ZLTextStyleDecoration decoration = collection.getDecoration(styles[i]);
|
||||||
if (decoration == null) {
|
if (decoration == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Screen formatScreen = moreStylesScreen.createPreferenceScreen(decoration.getName());
|
final Screen formatScreen = moreStylesScreen.createPreferenceScreen(decoration.Name);
|
||||||
formatScreen.addPreference(new FontPreference(
|
formatScreen.addPreference(new FontPreference(
|
||||||
this, textScreen.Resource, "font",
|
this, textScreen.Resource, "font",
|
||||||
decoration.FontFamilyOption, true
|
decoration.FontFamilyOption, true
|
||||||
|
|
|
@ -151,22 +151,16 @@ abstract class ZLTextViewBase extends ZLView {
|
||||||
|
|
||||||
private void applyControl(ZLTextControlElement control) {
|
private void applyControl(ZLTextControlElement control) {
|
||||||
if (control.IsStart) {
|
if (control.IsStart) {
|
||||||
|
final ZLTextHyperlink hyperlink = control instanceof ZLTextHyperlinkControlElement
|
||||||
|
? ((ZLTextHyperlinkControlElement)control).Hyperlink : null;
|
||||||
final ZLTextNGStyleDescription description =
|
final ZLTextNGStyleDescription description =
|
||||||
getTextStyleCollection().getDescription(control.Kind);
|
getTextStyleCollection().getDescription(control.Kind);
|
||||||
if (description != null) {
|
if (description != null) {
|
||||||
if (control instanceof ZLTextHyperlinkControlElement) {
|
setTextStyle(new ZLTextNGStyle(myTextStyle, description, hyperlink));
|
||||||
setTextStyle(new ZLTextNGStyle(myTextStyle, description, ((ZLTextHyperlinkControlElement)control).Hyperlink));
|
|
||||||
} else {
|
|
||||||
setTextStyle(new ZLTextNGStyle(myTextStyle, description, null));
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
final ZLTextStyleDecoration decoration =
|
final ZLTextStyleDecoration decoration =
|
||||||
getTextStyleCollection().getDecoration(control.Kind);
|
getTextStyleCollection().getDecoration(control.Kind);
|
||||||
if (control instanceof ZLTextHyperlinkControlElement) {
|
setTextStyle(new ZLTextSimpleDecoratedStyle(myTextStyle, decoration, hyperlink));
|
||||||
setTextStyle(decoration.createDecoratedStyle(myTextStyle, ((ZLTextHyperlinkControlElement)control).Hyperlink));
|
|
||||||
} else {
|
|
||||||
setTextStyle(decoration.createDecoratedStyle(myTextStyle));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
setTextStyle(myTextStyle.Parent);
|
setTextStyle(myTextStyle.Parent);
|
||||||
|
|
|
@ -1,55 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2007-2014 Geometer Plus <contact@geometerplus.com>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
||||||
* 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.geometerplus.zlibrary.text.view.style;
|
|
||||||
|
|
||||||
import org.geometerplus.zlibrary.core.util.ZLBoolean3;
|
|
||||||
import org.geometerplus.zlibrary.core.options.*;
|
|
||||||
|
|
||||||
import org.geometerplus.zlibrary.text.view.ZLTextStyle;
|
|
||||||
import org.geometerplus.zlibrary.text.view.ZLTextHyperlink;
|
|
||||||
|
|
||||||
|
|
||||||
public class ZLTextFullStyleDecoration extends ZLTextStyleDecoration {
|
|
||||||
public final ZLIntegerRangeOption SpaceBeforeOption;
|
|
||||||
public final ZLIntegerRangeOption SpaceAfterOption;
|
|
||||||
public final ZLIntegerRangeOption LeftIndentOption;
|
|
||||||
public final ZLIntegerRangeOption RightIndentOption;
|
|
||||||
public final ZLIntegerRangeOption FirstLineIndentDeltaOption;
|
|
||||||
|
|
||||||
public final ZLIntegerRangeOption AlignmentOption;
|
|
||||||
|
|
||||||
public final ZLIntegerOption LineSpacePercentOption;
|
|
||||||
|
|
||||||
public ZLTextFullStyleDecoration(String name, String fontFamily, int fontSizeDelta, ZLBoolean3 bold, ZLBoolean3 italic, ZLBoolean3 underline, ZLBoolean3 strikeThrough, int spaceBefore, int spaceAfter, int leftIndent,int rightIndent, int firstLineIndentDelta, int verticalShift, byte alignment, int lineSpace, ZLBoolean3 allowHyphenations) {
|
|
||||||
super(name, fontFamily, fontSizeDelta, bold, italic, underline, strikeThrough, verticalShift, allowHyphenations);
|
|
||||||
SpaceBeforeOption = new ZLIntegerRangeOption(STYLE, name + ":spaceBefore", -10, 100, spaceBefore);
|
|
||||||
SpaceAfterOption = new ZLIntegerRangeOption(STYLE, name + ":spaceAfter", -10, 100, spaceAfter);
|
|
||||||
LeftIndentOption = new ZLIntegerRangeOption(STYLE, name + ":leftIndent", -300, 300, leftIndent);
|
|
||||||
RightIndentOption = new ZLIntegerRangeOption(STYLE, name + ":rightIndent", -300, 300, rightIndent);
|
|
||||||
FirstLineIndentDeltaOption = new ZLIntegerRangeOption(STYLE, name + ":firstLineIndentDelta", -300, 300, firstLineIndentDelta);
|
|
||||||
AlignmentOption = new ZLIntegerRangeOption(STYLE, name + ":alignment", 0, 4, alignment);
|
|
||||||
LineSpacePercentOption = new ZLIntegerOption(STYLE, name + ":lineSpacePercent", lineSpace);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ZLTextStyle createDecoratedStyle(ZLTextStyle base, ZLTextHyperlink hyperlink) {
|
|
||||||
return new ZLTextFullyDecoratedStyle(base, this, hyperlink);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,71 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2007-2014 Geometer Plus <contact@geometerplus.com>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
||||||
* 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.geometerplus.zlibrary.text.view.style;
|
|
||||||
|
|
||||||
import org.geometerplus.zlibrary.text.model.ZLTextAlignmentType;
|
|
||||||
import org.geometerplus.zlibrary.text.model.ZLTextMetrics;
|
|
||||||
import org.geometerplus.zlibrary.text.view.ZLTextHyperlink;
|
|
||||||
import org.geometerplus.zlibrary.text.view.ZLTextStyle;
|
|
||||||
|
|
||||||
public class ZLTextFullyDecoratedStyle extends ZLTextPartiallyDecoratedStyle {
|
|
||||||
private final ZLTextFullStyleDecoration myFullDecoration;
|
|
||||||
|
|
||||||
ZLTextFullyDecoratedStyle(ZLTextStyle parent, ZLTextFullStyleDecoration decoration, ZLTextHyperlink hyperlink) {
|
|
||||||
super(parent, decoration, hyperlink);
|
|
||||||
myFullDecoration = decoration;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getLeftIndent() {
|
|
||||||
return Parent.getLeftIndent() + myFullDecoration.LeftIndentOption.getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getRightIndent() {
|
|
||||||
return Parent.getRightIndent() + myFullDecoration.RightIndentOption.getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getFirstLineIndentDelta() {
|
|
||||||
return (getAlignment() == ZLTextAlignmentType.ALIGN_CENTER) ? 0 : Parent.getFirstLineIndentDelta() + myFullDecoration.FirstLineIndentDeltaOption.getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getLineSpacePercent() {
|
|
||||||
int value = myFullDecoration.LineSpacePercentOption.getValue();
|
|
||||||
return (value != -1) ? value : Parent.getLineSpacePercent();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected int getSpaceBeforeInternal(ZLTextMetrics metrics, int fontSize) {
|
|
||||||
return myFullDecoration.SpaceBeforeOption.getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected int getSpaceAfterInternal(ZLTextMetrics metrics, int fontSize) {
|
|
||||||
return myFullDecoration.SpaceAfterOption.getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public byte getAlignment() {
|
|
||||||
byte value = (byte)myFullDecoration.AlignmentOption.getValue();
|
|
||||||
return (value == ZLTextAlignmentType.ALIGN_UNDEFINED) ? Parent.getAlignment() : value;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -23,14 +23,15 @@ import java.util.List;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import org.geometerplus.zlibrary.core.fonts.FontEntry;
|
import org.geometerplus.zlibrary.core.fonts.FontEntry;
|
||||||
|
import org.geometerplus.zlibrary.text.model.ZLTextAlignmentType;
|
||||||
import org.geometerplus.zlibrary.text.model.ZLTextMetrics;
|
import org.geometerplus.zlibrary.text.model.ZLTextMetrics;
|
||||||
import org.geometerplus.zlibrary.text.view.ZLTextStyle;
|
|
||||||
import org.geometerplus.zlibrary.text.view.ZLTextHyperlink;
|
import org.geometerplus.zlibrary.text.view.ZLTextHyperlink;
|
||||||
|
import org.geometerplus.zlibrary.text.view.ZLTextStyle;
|
||||||
|
|
||||||
class ZLTextPartiallyDecoratedStyle extends ZLTextDecoratedStyle {
|
public class ZLTextSimpleDecoratedStyle extends ZLTextDecoratedStyle {
|
||||||
private final ZLTextStyleDecoration myDecoration;
|
protected final ZLTextStyleDecoration myDecoration;
|
||||||
|
|
||||||
ZLTextPartiallyDecoratedStyle(ZLTextStyle parent, ZLTextStyleDecoration decoration, ZLTextHyperlink hyperlink) {
|
public ZLTextSimpleDecoratedStyle(ZLTextStyle parent, ZLTextStyleDecoration decoration, ZLTextHyperlink hyperlink) {
|
||||||
super(parent, hyperlink);
|
super(parent, hyperlink);
|
||||||
myDecoration = decoration;
|
myDecoration = decoration;
|
||||||
}
|
}
|
||||||
|
@ -57,6 +58,11 @@ class ZLTextPartiallyDecoratedStyle extends ZLTextDecoratedStyle {
|
||||||
return Parent.getFontSize(metrics) + myDecoration.FontSizeDeltaOption.getValue();
|
return Parent.getFontSize(metrics) + myDecoration.FontSizeDeltaOption.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getVerticalAlignInternal(ZLTextMetrics metrics, int fontSize) {
|
||||||
|
return Parent.getVerticalAlign(metrics) + myDecoration.VerticalAlignOption.getValue();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean isBoldInternal() {
|
protected boolean isBoldInternal() {
|
||||||
switch (myDecoration.BoldOption.getValue()) {
|
switch (myDecoration.BoldOption.getValue()) {
|
||||||
|
@ -105,46 +111,6 @@ class ZLTextPartiallyDecoratedStyle extends ZLTextDecoratedStyle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getLeftIndent() {
|
|
||||||
return Parent.getLeftIndent();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getRightIndent() {
|
|
||||||
return Parent.getRightIndent();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getFirstLineIndentDelta() {
|
|
||||||
return Parent.getFirstLineIndentDelta();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getLineSpacePercent() {
|
|
||||||
return Parent.getLineSpacePercent();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected int getVerticalAlignInternal(ZLTextMetrics metrics, int fontSize) {
|
|
||||||
return Parent.getVerticalAlign(metrics) + myDecoration.VerticalAlignOption.getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected int getSpaceBeforeInternal(ZLTextMetrics metrics, int fontSize) {
|
|
||||||
return Parent.getSpaceBefore(metrics);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected int getSpaceAfterInternal(ZLTextMetrics metrics, int fontSize) {
|
|
||||||
return Parent.getSpaceAfter(metrics);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public byte getAlignment() {
|
|
||||||
return Parent.getAlignment();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean allowHyphenations() {
|
public boolean allowHyphenations() {
|
||||||
switch (myDecoration.AllowHyphenationsOption.getValue()) {
|
switch (myDecoration.AllowHyphenationsOption.getValue()) {
|
||||||
|
@ -156,4 +122,41 @@ class ZLTextPartiallyDecoratedStyle extends ZLTextDecoratedStyle {
|
||||||
return Parent.allowHyphenations();
|
return Parent.allowHyphenations();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getLeftIndent() {
|
||||||
|
return Parent.getLeftIndent() + myDecoration.LeftIndentOption.getValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getRightIndent() {
|
||||||
|
return Parent.getRightIndent() + myDecoration.RightIndentOption.getValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getFirstLineIndentDelta() {
|
||||||
|
return (getAlignment() == ZLTextAlignmentType.ALIGN_CENTER) ? 0 : Parent.getFirstLineIndentDelta() + myDecoration.FirstLineIndentDeltaOption.getValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getLineSpacePercent() {
|
||||||
|
int value = myDecoration.LineSpacePercentOption.getValue();
|
||||||
|
return (value != -1) ? value : Parent.getLineSpacePercent();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getSpaceBeforeInternal(ZLTextMetrics metrics, int fontSize) {
|
||||||
|
return myDecoration.SpaceBeforeOption.getValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getSpaceAfterInternal(ZLTextMetrics metrics, int fontSize) {
|
||||||
|
return myDecoration.SpaceAfterOption.getValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public byte getAlignment() {
|
||||||
|
byte value = (byte)myDecoration.AlignmentOption.getValue();
|
||||||
|
return (value == ZLTextAlignmentType.ALIGN_UNDEFINED) ? Parent.getAlignment() : value;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -32,7 +32,7 @@ public class ZLTextStyleCollection {
|
||||||
private int myDefaultFontSize;
|
private int myDefaultFontSize;
|
||||||
private ZLTextBaseStyle myBaseStyle;
|
private ZLTextBaseStyle myBaseStyle;
|
||||||
private final ZLTextNGStyleDescription[] myDescriptionMap = new ZLTextNGStyleDescription[256];
|
private final ZLTextNGStyleDescription[] myDescriptionMap = new ZLTextNGStyleDescription[256];
|
||||||
private final ZLTextFullStyleDecoration[] myDecorationMap = new ZLTextFullStyleDecoration[256];
|
private final ZLTextStyleDecoration[] myDecorationMap = new ZLTextStyleDecoration[256];
|
||||||
|
|
||||||
public ZLTextStyleCollection(String screen) {
|
public ZLTextStyleCollection(String screen) {
|
||||||
Screen = screen;
|
Screen = screen;
|
||||||
|
@ -56,7 +56,7 @@ public class ZLTextStyleCollection {
|
||||||
return myDescriptionMap[kind & 0xFF];
|
return myDescriptionMap[kind & 0xFF];
|
||||||
}
|
}
|
||||||
|
|
||||||
public ZLTextFullStyleDecoration getDecoration(byte kind) {
|
public ZLTextStyleDecoration getDecoration(byte kind) {
|
||||||
return myDecorationMap[kind & 0xFF];
|
return myDecorationMap[kind & 0xFF];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ public class ZLTextStyleCollection {
|
||||||
}
|
}
|
||||||
final int lineSpacePercent = intValue(attributes, "lineSpacingPercent", -1);
|
final int lineSpacePercent = intValue(attributes, "lineSpacingPercent", -1);
|
||||||
|
|
||||||
myDecorationMap[id & 0xFF] = new ZLTextFullStyleDecoration(name, null, fontSizeDelta, bold, italic, ZLBoolean3.B3_UNDEFINED, ZLBoolean3.B3_UNDEFINED, spaceBefore, spaceAfter, leftIndent, rightIndent, firstLineIndentDelta, 0, alignment, lineSpacePercent, allowHyphenations);
|
myDecorationMap[id & 0xFF] = new ZLTextStyleDecoration(name, null, fontSizeDelta, bold, italic, ZLBoolean3.B3_UNDEFINED, ZLBoolean3.B3_UNDEFINED, spaceBefore, spaceAfter, leftIndent, rightIndent, firstLineIndentDelta, 0, alignment, lineSpacePercent, allowHyphenations);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -25,8 +25,11 @@ import org.geometerplus.zlibrary.core.options.*;
|
||||||
import org.geometerplus.zlibrary.text.view.ZLTextStyle;
|
import org.geometerplus.zlibrary.text.view.ZLTextStyle;
|
||||||
import org.geometerplus.zlibrary.text.view.ZLTextHyperlink;
|
import org.geometerplus.zlibrary.text.view.ZLTextHyperlink;
|
||||||
|
|
||||||
|
|
||||||
public class ZLTextStyleDecoration {
|
public class ZLTextStyleDecoration {
|
||||||
static final String STYLE = "Style";
|
private static final String STYLE = "Style";
|
||||||
|
|
||||||
|
public final String Name;
|
||||||
|
|
||||||
public final ZLStringOption FontFamilyOption;
|
public final ZLStringOption FontFamilyOption;
|
||||||
public final ZLIntegerRangeOption FontSizeDeltaOption;
|
public final ZLIntegerRangeOption FontSizeDeltaOption;
|
||||||
|
@ -37,10 +40,19 @@ public class ZLTextStyleDecoration {
|
||||||
public final ZLIntegerOption VerticalAlignOption;
|
public final ZLIntegerOption VerticalAlignOption;
|
||||||
public final ZLBoolean3Option AllowHyphenationsOption;
|
public final ZLBoolean3Option AllowHyphenationsOption;
|
||||||
|
|
||||||
private final String myName;
|
public final ZLIntegerRangeOption SpaceBeforeOption;
|
||||||
|
public final ZLIntegerRangeOption SpaceAfterOption;
|
||||||
|
public final ZLIntegerRangeOption LeftIndentOption;
|
||||||
|
public final ZLIntegerRangeOption RightIndentOption;
|
||||||
|
public final ZLIntegerRangeOption FirstLineIndentDeltaOption;
|
||||||
|
|
||||||
|
public final ZLIntegerRangeOption AlignmentOption;
|
||||||
|
|
||||||
|
public final ZLIntegerOption LineSpacePercentOption;
|
||||||
|
|
||||||
|
public ZLTextStyleDecoration(String name, String fontFamily, int fontSizeDelta, ZLBoolean3 bold, ZLBoolean3 italic, ZLBoolean3 underline, ZLBoolean3 strikeThrough, int spaceBefore, int spaceAfter, int leftIndent,int rightIndent, int firstLineIndentDelta, int verticalAlign, byte alignment, int lineSpace, ZLBoolean3 allowHyphenations) {
|
||||||
|
Name = name;
|
||||||
|
|
||||||
public ZLTextStyleDecoration(String name, String fontFamily, int fontSizeDelta, ZLBoolean3 bold, ZLBoolean3 italic, ZLBoolean3 underline, ZLBoolean3 strikeThrough, int verticalAlign, ZLBoolean3 allowHyphenations) {
|
|
||||||
myName = name;
|
|
||||||
FontFamilyOption = new ZLStringOption(STYLE, name + ":fontFamily", fontFamily);
|
FontFamilyOption = new ZLStringOption(STYLE, name + ":fontFamily", fontFamily);
|
||||||
FontSizeDeltaOption = new ZLIntegerRangeOption(STYLE, name + ":fontSize", -16, 16, fontSizeDelta);
|
FontSizeDeltaOption = new ZLIntegerRangeOption(STYLE, name + ":fontSize", -16, 16, fontSizeDelta);
|
||||||
BoldOption = new ZLBoolean3Option(STYLE, name + ":bold", bold);
|
BoldOption = new ZLBoolean3Option(STYLE, name + ":bold", bold);
|
||||||
|
@ -49,17 +61,13 @@ public class ZLTextStyleDecoration {
|
||||||
StrikeThroughOption = new ZLBoolean3Option(STYLE, name + ":strikeThrough", strikeThrough);
|
StrikeThroughOption = new ZLBoolean3Option(STYLE, name + ":strikeThrough", strikeThrough);
|
||||||
VerticalAlignOption = new ZLIntegerOption(STYLE, name + ":vShift", verticalAlign);
|
VerticalAlignOption = new ZLIntegerOption(STYLE, name + ":vShift", verticalAlign);
|
||||||
AllowHyphenationsOption = new ZLBoolean3Option(STYLE, name + ":allowHyphenations", allowHyphenations);
|
AllowHyphenationsOption = new ZLBoolean3Option(STYLE, name + ":allowHyphenations", allowHyphenations);
|
||||||
}
|
|
||||||
|
|
||||||
public ZLTextStyle createDecoratedStyle(ZLTextStyle base) {
|
SpaceBeforeOption = new ZLIntegerRangeOption(STYLE, name + ":spaceBefore", -10, 100, spaceBefore);
|
||||||
return createDecoratedStyle(base, null);
|
SpaceAfterOption = new ZLIntegerRangeOption(STYLE, name + ":spaceAfter", -10, 100, spaceAfter);
|
||||||
}
|
LeftIndentOption = new ZLIntegerRangeOption(STYLE, name + ":leftIndent", -300, 300, leftIndent);
|
||||||
|
RightIndentOption = new ZLIntegerRangeOption(STYLE, name + ":rightIndent", -300, 300, rightIndent);
|
||||||
public ZLTextStyle createDecoratedStyle(ZLTextStyle base, ZLTextHyperlink hyperlink) {
|
FirstLineIndentDeltaOption = new ZLIntegerRangeOption(STYLE, name + ":firstLineIndentDelta", -300, 300, firstLineIndentDelta);
|
||||||
return new ZLTextPartiallyDecoratedStyle(base, this, hyperlink);
|
AlignmentOption = new ZLIntegerRangeOption(STYLE, name + ":alignment", 0, 4, alignment);
|
||||||
}
|
LineSpacePercentOption = new ZLIntegerOption(STYLE, name + ":lineSpacePercent", lineSpace);
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return myName;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue