gpt4 book ai didi

com.koolearn.klibrary.core.options.ZLIntegerRangeOption.()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 12:05:48 27 4
gpt4 key购买 nike

本文整理了Java中com.koolearn.klibrary.core.options.ZLIntegerRangeOption.<init>()方法的一些代码示例,展示了ZLIntegerRangeOption.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZLIntegerRangeOption.<init>()方法的具体详情如下:
包路径:com.koolearn.klibrary.core.options.ZLIntegerRangeOption
类名称:ZLIntegerRangeOption
方法名:<init>

ZLIntegerRangeOption.<init>介绍

暂无

代码示例

代码示例来源:origin: ydcx/KooReader

private TapZoneMap(String name) {
  Name = name;
  myOptionGroupName = "TapZones:" + name;
  myHeight = new ZLIntegerRangeOption(myOptionGroupName, "Height", 2, 5, 3);
  myWidth = new ZLIntegerRangeOption(myOptionGroupName, "Width", 2, 5, 3);
  final ZLFile mapFile = ZLFile.createFileByPath(
    "default/tapzones/" + name.toLowerCase() + ".xml"
  );
  XmlUtil.parseQuietly(mapFile, new Reader());
}

代码示例来源:origin: Jiangzqts/EpubRead

private TapZoneMap(String name) {
  Name = name;
  myOptionGroupName = "TapZones:" + name;
  myHeight = new ZLIntegerRangeOption(myOptionGroupName, "Height", 2, 5, 3);
  myWidth = new ZLIntegerRangeOption(myOptionGroupName, "Width", 2, 5, 3);
  final ZLFile mapFile = ZLFile.createFileByPath(
    "default/tapzones/" + name.toLowerCase() + ".xml"
  );
  XmlUtil.parseQuietly(mapFile, new Reader());
}

代码示例来源:origin: ydcx/KooReader

public ViewOptions() {
  final ZLibrary zlibrary = ZLibrary.Instance();
  final int dpi = zlibrary.getDisplayDPI();
  final int x = zlibrary.getWidthInPixels();
  final int y = zlibrary.getHeightInPixels();
  final int horMargin = Math.min(dpi / 5, Math.min(x, y) / 30);
  TwoColumnView =
    new ZLBooleanOption("Options", "TwoColumnView", x * x + y * y >= 42 * dpi * dpi);
  LeftMargin =
    new ZLIntegerRangeOption("Options", "LeftMargin", 0, 100, horMargin);
  RightMargin =
    new ZLIntegerRangeOption("Options", "RightMargin", 0, 100, horMargin);
  TopMargin =
    new ZLIntegerRangeOption("Options", "TopMargin", 0, 100, 0);
  BottomMargin =
    new ZLIntegerRangeOption("Options", "BottomMargin", 0, 100, 4);
  SpaceBetweenColumns =
    new ZLIntegerRangeOption("Options", "SpaceBetweenColumns", 0, 300, 3 * horMargin);
  ScrollbarType =
    new ZLIntegerRangeOption("Options", "ScrollbarType", 0, 4, KooView.SCROLLBAR_SHOW_AS_FOOTER);
  FooterHeight =
    new ZLIntegerRangeOption("Options", "FooterHeight", 8, dpi / 8, dpi / 12);
  ColorProfileName = new ZLStringOption("Options", "ColorProfile", ColorProfile.DAY);
  ColorProfileName.setSpecialName("colorProfile");
}

代码示例来源:origin: Jiangzqts/EpubRead

public ViewOptions() {
  final ZLibrary zlibrary = ZLibrary.Instance();
  final int dpi = zlibrary.getDisplayDPI();
  final int x = zlibrary.getWidthInPixels();
  final int y = zlibrary.getHeightInPixels();
  final int horMargin = Math.min(dpi / 5, Math.min(x, y) / 20);
  TwoColumnView =
    new ZLBooleanOption("Options", "TwoColumnView", x * x + y * y >= 42 * dpi * dpi);
  LeftMargin =
    new ZLIntegerRangeOption("Options", "LeftMargin", 0, 100, horMargin);
  RightMargin =
    new ZLIntegerRangeOption("Options", "RightMargin", 0, 100, horMargin);
  TopMargin =
    new ZLIntegerRangeOption("Options", "TopMargin", 0, 100, 0);
  BottomMargin =
    new ZLIntegerRangeOption("Options", "BottomMargin", 0, 100, 4);
  SpaceBetweenColumns =
    new ZLIntegerRangeOption("Options", "SpaceBetweenColumns", 0, 300, 3 * horMargin);
  ScrollbarType =
    new ZLIntegerRangeOption("Options", "ScrollbarType", 0, 4, KooView.SCROLLBAR_SHOW_AS_FOOTER);
  FooterHeight =
    new ZLIntegerRangeOption("Options", "FooterHeight", 8, dpi / 8, dpi / 12);
  ColorProfileName = new ZLStringOption("Options", "ColorProfile", ColorProfile.DAY);
  ColorProfileName.setSpecialName("colorProfile");
}

代码示例来源:origin: Jiangzqts/EpubRead

public ZLTextBaseStyle(String prefix, String fontFamily, int fontSize) {
  super(null, ZLTextHyperlink.NO_LINK);
  FontFamilyOption = new ZLStringOption(GROUP, prefix + ":fontFamily", fontFamily);
  fontSize = fontSize * ZLibrary.Instance().getDisplayDPI() / 160;
  FontSizeOption = new ZLIntegerRangeOption(GROUP, prefix + ":fontSize", 5, Math.max(144, fontSize * 2), fontSize);
  BoldOption = new ZLBooleanOption(GROUP, prefix + ":bold", false);
  ItalicOption = new ZLBooleanOption(GROUP, prefix + ":italic", false);
  UnderlineOption = new ZLBooleanOption(GROUP, prefix + ":underline", false);
  StrikeThroughOption = new ZLBooleanOption(GROUP, prefix + ":strikeThrough", false);
  AlignmentOption = new ZLIntegerRangeOption(GROUP, prefix + ":alignment", 1, 4, ZLTextAlignmentType.ALIGN_JUSTIFY);
  LineSpaceOption = new ZLIntegerRangeOption(GROUP, prefix + ":lineSpacing", 5, 20, 13);//设置行间距
}

代码示例来源:origin: ydcx/KooReader

public ZLTextBaseStyle(String prefix, String fontFamily, int fontSize) {
  super(null, ZLTextHyperlink.NO_LINK);
  FontFamilyOption = new ZLStringOption(GROUP, prefix + ":fontFamily", fontFamily);
  fontSize = fontSize * ZLibrary.Instance().getDisplayDPI() / 160;
  FontSizeOption = new ZLIntegerRangeOption(GROUP, prefix + ":fontSize", 5, Math.max(144, fontSize * 2), fontSize);
  BoldOption = new ZLBooleanOption(GROUP, prefix + ":bold", false);
  ItalicOption = new ZLBooleanOption(GROUP, prefix + ":italic", false);
  UnderlineOption = new ZLBooleanOption(GROUP, prefix + ":underline", false);
  StrikeThroughOption = new ZLBooleanOption(GROUP, prefix + ":strikeThrough", false);
  AlignmentOption = new ZLIntegerRangeOption(GROUP, prefix + ":alignment", 1, 4, ZLTextAlignmentType.ALIGN_JUSTIFY);
  LineSpaceOption = new ZLIntegerRangeOption(GROUP, prefix + ":lineSpacing", 5, 20, 12);
}

代码示例来源:origin: ydcx/KooReader

public MiscOptions() {
    AllowScreenBrightnessAdjustment =
      new ZLBooleanOption("LookNFeel", "AllowScreenBrightnessAdjustment", true);
    TextSearchPattern =
      new ZLStringOption("TextSearch", "Pattern", "");

    EnableDoubleTap =
      new ZLBooleanOption("Options", "EnableDoubleTap", false);
    NavigateAllWords =
      new ZLBooleanOption("Options", "NavigateAllWords", false);

    WordTappingAction =
      new ZLEnumOption<WordTappingActionEnum>("Options", "WordTappingAction", WordTappingActionEnum.startSelecting);

    ToastFontSizePercent =
      new ZLIntegerRangeOption("Options", "ToastFontSizePercent", 25, 100, 90);
    ShowFootnoteToast =
      new ZLEnumOption<FootnoteToastEnum>("Options", "ShowFootnoteToast", FootnoteToastEnum.footnotesAndSuperscripts);
    FootnoteToastDuration =
      new ZLEnumOption<DurationEnum>("Options", "FootnoteToastDuration", DurationEnum.duration5);
  }
}

代码示例来源:origin: Jiangzqts/EpubRead

public MiscOptions() {
    AllowScreenBrightnessAdjustment =
      new ZLBooleanOption("LookNFeel", "AllowScreenBrightnessAdjustment", true);
    TextSearchPattern =
      new ZLStringOption("TextSearch", "Pattern", "");

    EnableDoubleTap =
      new ZLBooleanOption("Options", "EnableDoubleTap", false);
    NavigateAllWords =
      new ZLBooleanOption("Options", "NavigateAllWords", false);

    WordTappingAction =
      new ZLEnumOption<WordTappingActionEnum>("Options", "WordTappingAction", WordTappingActionEnum.startSelecting);

    ToastFontSizePercent =
      new ZLIntegerRangeOption("Options", "ToastFontSizePercent", 25, 100, 90);
    ShowFootnoteToast =
      new ZLEnumOption<FootnoteToastEnum>("Options", "ShowFootnoteToast", FootnoteToastEnum.footnotesAndSuperscripts);
    FootnoteToastDuration =
      new ZLEnumOption<DurationEnum>("Options", "FootnoteToastDuration", DurationEnum.duration5);
  }
}

代码示例来源:origin: Jiangzqts/EpubRead

public void showToast(final SuperActivityToast toast) {
    hideToast();
    myToast = toast;
    // TODO: avoid this hack (accessing text style via option)
    final int dpi = getZLibrary().getDisplayDPI();
    final int defaultFontSize = dpi * 18 / 160;
    final int fontSize = new ZLIntegerOption("Style", "Base:fontSize", defaultFontSize).getValue();
    final int percent = new ZLIntegerRangeOption("Options", "ToastFontSizePercent", 25, 100, 90).getValue();
    final int dpFontSize = fontSize * 160 * percent / dpi / 100;
    toast.setTextSize(dpFontSize);
    toast.setButtonTextSize(dpFontSize * 7 / 8);

    final String fontFamily =
        new ZLStringOption("Style", "Base:fontFamily", "sans-serif").getValue();
//        toast.setTypeface(AndroidFontUtil.systemTypeface(fontFamily, false, false));

    runOnUiThread(new Runnable() {
      public void run() {
        toast.show();
      }
    });
  }
  /* ------ SUPER TOAST ------ */

代码示例来源:origin: ydcx/KooReader

public void showToast(final SuperActivityToast toast) {
    hideToast();
    myToast = toast;
    // TODO: avoid this hack (accessing text style via option)
    final int dpi = getZLibrary().getDisplayDPI();
    final int defaultFontSize = dpi * 18 / 160;
    final int fontSize = new ZLIntegerOption("Style", "Base:fontSize", defaultFontSize).getValue();
    final int percent = new ZLIntegerRangeOption("Options", "ToastFontSizePercent", 25, 100, 90).getValue();
    final int dpFontSize = fontSize * 160 * percent / dpi / 100;
    toast.setTextSize(dpFontSize);
    toast.setButtonTextSize(dpFontSize * 7 / 8);

    final String fontFamily =
        new ZLStringOption("Style", "Base:fontFamily", "sans-serif").getValue();
//        toast.setTypeface(AndroidFontUtil.systemTypeface(fontFamily, false, false));

    runOnUiThread(new Runnable() {
      public void run() {
        toast.show();
      }
    });
  }
  /* ------ SUPER TOAST ------ */

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com