docstring_tokens list | code_tokens list |
|---|---|
[
"<",
"p",
">",
"the",
"name",
"of",
"the",
"key",
"pair",
"to",
"delete",
"<",
"/",
"p",
">"
] | [
"set",
"key",
"pair",
"name",
"(",
"key",
"pair",
"name",
")",
";",
"return",
"this",
";"
] |
[
"{"
] | [
"return",
"item",
"type",
"type",
"annotation",
"set",
"ref",
"item",
";"
] |
[
"{"
] | [
"mixed",
"item",
"section",
"word",
"data",
"=",
"file",
"get",
"word",
"data",
"(",
")",
";",
"annotations",
"=",
"word",
"data",
"intern",
"(",
"annotations",
")",
";"
] |
[
"{"
] | [
"return",
"annotations",
"to",
"human",
"(",
")",
";"
] |
[
"query",
"string",
"parameters",
"the",
"returned",
"map",
"is",
"an",
"unmodifiable",
"view",
"of",
"the",
"map",
"in",
"the",
"request",
"so",
"calls",
"to",
"{"
] | [
"return",
"unmodifiable",
"map",
"(",
"parameters",
")",
";"
] |
[
"set",
"the",
"body",
"of",
"the",
"request",
"if",
"not",
"set",
"or",
"set",
"to",
"{"
] | [
"this",
"entity",
"=",
"entity",
";"
] |
[
"set",
"the",
"body",
"of",
"the",
"request",
"to",
"a",
"string",
"if",
"not",
"set",
"or",
"set",
"to",
"{"
] | [
"set",
"entity",
"(",
"entity",
"=",
"=",
"null",
"?",
"null",
":",
"new",
"n",
"string",
"entity",
"(",
"entity",
",",
"content",
"type",
"application",
"json",
")",
")",
";"
] |
[
"the",
"body",
"of",
"the",
"request",
"if",
"{"
] | [
"return",
"entity",
";"
] |
[
"get",
"the",
"portion",
"of",
"an",
"http",
"request",
"to",
"elasticsearch",
"that",
"can",
"be",
"manipulated",
"without",
"changing",
"elasticsearch",
"s",
"behavior"
] | [
"return",
"options",
";"
] |
[
"accepts",
"the",
"provided",
"consumer",
"to",
"created",
"and",
"register",
"the",
"binder"
] | [
"abstract",
"binder",
"binder",
"=",
"new",
"abstract",
"binder",
"(",
")",
"{",
"@",
"override",
"protected",
"void",
"configure",
"(",
")",
"{",
"bind",
"consumer",
"accept",
"(",
"this",
")",
";",
"}",
"}",
";",
"injection",
"manager",
"register",
"("... |
[
"creates",
"a",
"new",
"{",
"@",
"link",
"injection",
"manager",
"}"
] | [
"return",
"injections",
"create",
"injection",
"manager",
"(",
")",
";"
] |
[
"gets",
"the",
"job",
"that",
"matches",
"the",
"given",
"{",
"@",
"code",
"job",
"id",
"}"
] | [
"return",
"get",
"job",
"or",
"throw",
"if",
"unknown",
"(",
"job",
"id",
",",
"cluster",
"service",
"state",
"(",
")",
")",
";"
] |
[
"gets",
"the",
"job",
"that",
"matches",
"the",
"given",
"{",
"@",
"code",
"job",
"id",
"}"
] | [
"job",
"job",
"=",
"ml",
"metadata",
"get",
"ml",
"metadata",
"(",
"cluster",
"state",
")",
"get",
"jobs",
"(",
")",
"get",
"(",
"job",
"id",
")",
";",
"if",
"(",
"job",
"=",
"=",
"null",
")",
"{",
"throw",
"exceptions",
"helper",
"missing",
"job",... |
[
"validate",
"the",
"char",
"filter",
"/",
"tokenizer",
"/",
"token",
"filter",
"names",
"used",
"in",
"the",
"categorization",
"analyzer",
"config",
"(",
"if",
"any",
")",
"this",
"validation",
"has",
"to",
"be",
"done",
"server",
"-",
"side",
";",
"it",
... | [
"categorization",
"analyzer",
"config",
"categorization",
"analyzer",
"config",
"=",
"job",
"builder",
"get",
"analysis",
"config",
"(",
")",
"get",
"categorization",
"analyzer",
"config",
"(",
")",
";",
"if",
"(",
"categorization",
"analyzer",
"config",
"!",
"=... |
[
"get",
"global",
"load",
"request",
"id"
] | [
"return",
"request",
"id",
";"
] |
[
"get",
"the",
"current",
"preferred",
"configuration",
"for",
"decoding",
"bitmaps",
"{"
] | [
"return",
"preferred",
"bitmap",
"config",
";"
] |
[
"set",
"a",
"global",
"preferred",
"bitmap",
"config",
"shared",
"by",
"all",
"view",
"instances",
"and",
"applied",
"to",
"new",
"instances",
"initialised",
"after",
"the",
"call",
"is",
"made",
"this",
"is",
"a",
"hint",
"only",
";",
"the",
"bundled",
"{... | [
"subsampling",
"scale",
"image",
"view",
"preferred",
"bitmap",
"config",
"=",
"preferred",
"bitmap",
"config",
";"
] |
[
"set",
"the",
"image",
"source",
"from",
"a",
"bitmap",
"resource",
"asset",
"file",
"or",
"other",
"uri"
] | [
"set",
"image",
"(",
"image",
"source",
",",
"null",
",",
"null",
")",
";"
] |
[
"set",
"the",
"image",
"source",
"from",
"a",
"bitmap",
"resource",
"asset",
"file",
"or",
"other",
"uri",
"starting",
"with",
"a",
"given",
"orientation",
"setting",
"scale",
"and",
"center",
"this",
"is",
"the",
"best",
"method",
"to",
"use",
"when",
"yo... | [
"set",
"image",
"(",
"image",
"source",
",",
"null",
",",
"state",
")",
";"
] |
[
"set",
"the",
"image",
"source",
"from",
"a",
"bitmap",
"resource",
"asset",
"file",
"or",
"other",
"uri",
"providing",
"a",
"preview",
"image",
"to",
"be",
"displayed",
"until",
"the",
"full",
"size",
"image",
"is",
"loaded"
] | [
"set",
"image",
"(",
"image",
"source",
",",
"preview",
"source",
",",
"null",
")",
";"
] |
[
"measures",
"the",
"width",
"and",
"height",
"of",
"the",
"view",
"preserving",
"the",
"aspect",
"ratio",
"of",
"the",
"image",
"displayed",
"if",
"wrap",
"content",
"is",
"used",
"the",
"image",
"will",
"scale",
"within",
"this",
"box",
"not",
"resizing",
... | [
"int",
"width",
"spec",
"mode",
"=",
"measure",
"spec",
"get",
"mode",
"(",
"width",
"measure",
"spec",
")",
";",
"int",
"height",
"spec",
"mode",
"=",
"measure",
"spec",
"get",
"mode",
"(",
"height",
"measure",
"spec",
")",
";",
"int",
"parent",
"widt... |
[
"helper",
"method",
"for",
"setting",
"the",
"values",
"of",
"a",
"tile",
"matrix",
"array"
] | [
"array",
"[",
"0",
"]",
"=",
"f",
"0",
";",
"array",
"[",
"1",
"]",
"=",
"f",
"1",
";",
"array",
"[",
"2",
"]",
"=",
"f",
"2",
";",
"array",
"[",
"3",
"]",
"=",
"f",
"3",
";",
"array",
"[",
"4",
"]",
"=",
"f",
"4",
";",
"array",
"[",
... |
[
"checks",
"whether",
"the",
"base",
"layer",
"of",
"tiles",
"or",
"full",
"size",
"bitmap",
"is",
"ready"
] | [
"if",
"(",
"bitmap",
"!",
"=",
"null",
"&",
"&",
"!",
"bitmap",
"is",
"preview",
")",
"{",
"return",
"true",
";",
"}",
"else",
"if",
"(",
"tile",
"map",
"!",
"=",
"null",
")",
"{",
"boolean",
"base",
"layer",
"ready",
"=",
"true",
";",
"for",
"... |
[
"check",
"whether",
"view",
"and",
"image",
"dimensions",
"are",
"known",
"and",
"either",
"a",
"preview",
"full",
"size",
"image",
"or",
"base",
"layer",
"tiles",
"are",
"loaded",
"first",
"time",
"send",
"ready",
"event",
"to",
"listener",
"the",
"next",
... | [
"boolean",
"ready",
"=",
"get",
"width",
"(",
")",
">",
"0",
"&",
"&",
"get",
"height",
"(",
")",
">",
"0",
"&",
"&",
"s",
"width",
">",
"0",
"&",
"&",
"s",
"height",
">",
"0",
"&",
"&",
"(",
"bitmap",
"!",
"=",
"null",
"|",
"|",
"is",
"b... |
[
"check",
"whether",
"either",
"the",
"full",
"size",
"bitmap",
"or",
"base",
"layer",
"tiles",
"are",
"loaded",
"first",
"time",
"send",
"image",
"loaded",
"event",
"to",
"listener"
] | [
"boolean",
"image",
"loaded",
"=",
"is",
"base",
"layer",
"ready",
"(",
")",
";",
"if",
"(",
"!",
"image",
"loaded",
"sent",
"&",
"&",
"image",
"loaded",
")",
"{",
"pre",
"draw",
"(",
")",
";",
"image",
"loaded",
"sent",
"=",
"true",
";",
"on",
"... |
[
"creates",
"paint",
"objects",
"once",
"when",
"first",
"needed"
] | [
"if",
"(",
"bitmap",
"paint",
"=",
"=",
"null",
")",
"{",
"bitmap",
"paint",
"=",
"new",
"paint",
"(",
")",
";",
"bitmap",
"paint",
"set",
"anti",
"alias",
"(",
"true",
")",
";",
"bitmap",
"paint",
"set",
"filter",
"bitmap",
"(",
"true",
")",
";",
... |
[
"determine",
"whether",
"tile",
"is",
"visible"
] | [
"float",
"s",
"vis",
"left",
"=",
"view",
"to",
"source",
"x",
"(",
"0",
")",
",",
"s",
"vis",
"right",
"=",
"view",
"to",
"source",
"x",
"(",
"get",
"width",
"(",
")",
")",
",",
"s",
"vis",
"top",
"=",
"view",
"to",
"source",
"y",
"(",
"0",
... |
[
"adjusts",
"current",
"scale",
"and",
"translate",
"values",
"to",
"keep",
"scale",
"within",
"the",
"allowed",
"range",
"and",
"the",
"image",
"on",
"screen",
"minimum",
"scale",
"is",
"set",
"so",
"one",
"dimension",
"fills",
"the",
"view",
"and",
"the",
... | [
"boolean",
"init",
"=",
"false",
";",
"if",
"(",
"v",
"translate",
"=",
"=",
"null",
")",
"{",
"init",
"=",
"true",
";",
"v",
"translate",
"=",
"new",
"point",
"f",
"(",
"0",
",",
"0",
")",
";",
"}",
"if",
"(",
"sat",
"temp",
"=",
"=",
"null"... |
[
"set",
"scale",
"center",
"and",
"orientation",
"from",
"saved",
"state"
] | [
"if",
"(",
"state",
"!",
"=",
"null",
"&",
"&",
"valid",
"orientations",
"contains",
"(",
"state",
"get",
"orientation",
"(",
")",
")",
")",
"{",
"this",
"orientation",
"=",
"state",
"get",
"orientation",
"(",
")",
";",
"this",
"pending",
"scale",
"=",... |
[
"by",
"default",
"the",
"view",
"automatically",
"calculates",
"the",
"optimal",
"tile",
"size",
"set",
"this",
"to",
"override",
"this",
"and",
"force",
"an",
"upper",
"limit",
"to",
"the",
"dimensions",
"of",
"the",
"generated",
"tiles",
"passing",
"{",
"@... | [
"this",
"max",
"tile",
"width",
"=",
"max",
"pixels",
";",
"this",
"max",
"tile",
"height",
"=",
"max",
"pixels",
";"
] |
[
"by",
"default",
"the",
"view",
"automatically",
"calculates",
"the",
"optimal",
"tile",
"size",
"set",
"this",
"to",
"override",
"this",
"and",
"force",
"an",
"upper",
"limit",
"to",
"the",
"dimensions",
"of",
"the",
"generated",
"tiles",
"passing",
"{",
"@... | [
"this",
"max",
"tile",
"width",
"=",
"max",
"pixels",
"x",
";",
"this",
"max",
"tile",
"height",
"=",
"max",
"pixels",
"y",
";"
] |
[
"use",
"canvas",
"max",
"bitmap",
"width",
"and",
"height",
"instead",
"of",
"the",
"default",
"2048",
"to",
"avoid",
"redundant",
"tiling"
] | [
"return",
"new",
"point",
"(",
"math",
"min",
"(",
"canvas",
"get",
"maximum",
"bitmap",
"width",
"(",
")",
",",
"max",
"tile",
"width",
")",
",",
"math",
"min",
"(",
"canvas",
"get",
"maximum",
"bitmap",
"height",
"(",
")",
",",
"max",
"tile",
"heig... |
[
"determines",
"the",
"rotation",
"to",
"be",
"applied",
"to",
"tiles",
"based",
"on",
"exif",
"orientation",
"or",
"chosen",
"setting"
] | [
"if",
"(",
"orientation",
"=",
"=",
"orientation",
"use",
"exif",
")",
"{",
"return",
"s",
"orientation",
";",
"}",
"else",
"{",
"return",
"orientation",
";",
"}"
] |
[
"pythagoras",
"distance",
"between",
"two",
"points"
] | [
"float",
"x",
"=",
"x",
"0",
"-",
"x",
"1",
";",
"float",
"y",
"=",
"y",
"0",
"-",
"y",
"1",
";",
"return",
"(",
"float",
")",
"math",
"sqrt",
"(",
"x",
"*",
"x",
"+",
"y",
"*",
"y",
")",
";"
] |
[
"releases",
"all",
"resources",
"the",
"view",
"is",
"using",
"and",
"resets",
"the",
"state",
"nulling",
"any",
"fields",
"that",
"use",
"significant",
"memory",
"after",
"you",
"have",
"called",
"this",
"method",
"the",
"view",
"can",
"be",
"re",
"-",
"u... | [
"reset",
"(",
"true",
")",
";",
"bitmap",
"paint",
"=",
"null",
";",
"debug",
"text",
"paint",
"=",
"null",
";",
"debug",
"line",
"paint",
"=",
"null",
";",
"tile",
"bg",
"paint",
"=",
"null",
";"
] |
[
"convert",
"screen",
"to",
"source",
"x",
"coordinate"
] | [
"if",
"(",
"v",
"translate",
"=",
"=",
"null",
")",
"{",
"return",
"float",
"na",
"n",
";",
"}",
"return",
"(",
"vx",
"-",
"v",
"translate",
"x",
")",
"/",
"scale",
";"
] |
[
"convert",
"screen",
"to",
"source",
"y",
"coordinate"
] | [
"if",
"(",
"v",
"translate",
"=",
"=",
"null",
")",
"{",
"return",
"float",
"na",
"n",
";",
"}",
"return",
"(",
"vy",
"-",
"v",
"translate",
"y",
")",
"/",
"scale",
";"
] |
[
"converts",
"a",
"rectangle",
"within",
"the",
"view",
"to",
"the",
"corresponding",
"rectangle",
"from",
"the",
"source",
"file",
"taking",
"into",
"account",
"the",
"current",
"scale",
"translation",
"orientation",
"and",
"clipped",
"region",
"this",
"can",
"b... | [
"if",
"(",
"v",
"translate",
"=",
"=",
"null",
"|",
"|",
"!",
"ready",
"sent",
")",
"{",
"return",
";",
"}",
"f",
"rect",
"set",
"(",
"(",
"int",
")",
"view",
"to",
"source",
"x",
"(",
"v",
"rect",
"left",
")",
",",
"(",
"int",
")",
"view",
... |
[
"find",
"the",
"area",
"of",
"the",
"source",
"file",
"that",
"is",
"currently",
"visible",
"on",
"screen",
"taking",
"into",
"account",
"the",
"current",
"scale",
"translation",
"orientation",
"and",
"clipped",
"region",
"this",
"is",
"a",
"convenience",
"met... | [
"if",
"(",
"v",
"translate",
"=",
"=",
"null",
"|",
"|",
"!",
"ready",
"sent",
")",
"{",
"return",
";",
"}",
"f",
"rect",
"set",
"(",
"0",
",",
"0",
",",
"get",
"width",
"(",
")",
",",
"get",
"height",
"(",
")",
")",
";",
"view",
"to",
"fil... |
[
"convert",
"screen",
"coordinate",
"to",
"source",
"coordinate"
] | [
"return",
"view",
"to",
"source",
"coord",
"(",
"vxy",
"x",
",",
"vxy",
"y",
",",
"new",
"point",
"f",
"(",
")",
")",
";"
] |
[
"convert",
"screen",
"coordinate",
"to",
"source",
"coordinate"
] | [
"return",
"view",
"to",
"source",
"coord",
"(",
"vx",
",",
"vy",
",",
"new",
"point",
"f",
"(",
")",
")",
";"
] |
[
"convert",
"screen",
"coordinate",
"to",
"source",
"coordinate"
] | [
"return",
"view",
"to",
"source",
"coord",
"(",
"vxy",
"x",
",",
"vxy",
"y",
",",
"s",
"target",
")",
";"
] |
[
"convert",
"screen",
"coordinate",
"to",
"source",
"coordinate"
] | [
"if",
"(",
"v",
"translate",
"=",
"=",
"null",
")",
"{",
"return",
"null",
";",
"}",
"s",
"target",
"set",
"(",
"view",
"to",
"source",
"x",
"(",
"vx",
")",
",",
"view",
"to",
"source",
"y",
"(",
"vy",
")",
")",
";",
"return",
"s",
"target",
... |
[
"convert",
"source",
"to",
"screen",
"x",
"coordinate"
] | [
"if",
"(",
"v",
"translate",
"=",
"=",
"null",
")",
"{",
"return",
"float",
"na",
"n",
";",
"}",
"return",
"(",
"sx",
"*",
"scale",
")",
"+",
"v",
"translate",
"x",
";"
] |
[
"convert",
"source",
"to",
"screen",
"y",
"coordinate"
] | [
"if",
"(",
"v",
"translate",
"=",
"=",
"null",
")",
"{",
"return",
"float",
"na",
"n",
";",
"}",
"return",
"(",
"sy",
"*",
"scale",
")",
"+",
"v",
"translate",
"y",
";"
] |
[
"convert",
"source",
"coordinate",
"to",
"view",
"coordinate"
] | [
"return",
"source",
"to",
"view",
"coord",
"(",
"sxy",
"x",
",",
"sxy",
"y",
",",
"new",
"point",
"f",
"(",
")",
")",
";"
] |
[
"convert",
"source",
"coordinate",
"to",
"view",
"coordinate"
] | [
"return",
"source",
"to",
"view",
"coord",
"(",
"sx",
",",
"sy",
",",
"new",
"point",
"f",
"(",
")",
")",
";"
] |
[
"convert",
"source",
"coordinate",
"to",
"view",
"coordinate"
] | [
"if",
"(",
"v",
"translate",
"=",
"=",
"null",
")",
"{",
"return",
"null",
";",
"}",
"v",
"target",
"set",
"(",
"source",
"to",
"view",
"x",
"(",
"sx",
")",
",",
"source",
"to",
"view",
"y",
"(",
"sy",
")",
")",
";",
"return",
"v",
"target",
... |
[
"convert",
"source",
"rect",
"to",
"screen",
"rect",
"integer",
"values"
] | [
"v",
"target",
"set",
"(",
"(",
"int",
")",
"source",
"to",
"view",
"x",
"(",
"s",
"rect",
"left",
")",
",",
"(",
"int",
")",
"source",
"to",
"view",
"y",
"(",
"s",
"rect",
"top",
")",
",",
"(",
"int",
")",
"source",
"to",
"view",
"x",
"(",
... |
[
"get",
"the",
"translation",
"required",
"to",
"place",
"a",
"given",
"source",
"coordinate",
"at",
"the",
"center",
"of",
"the",
"screen",
"with",
"the",
"center",
"adjusted",
"for",
"asymmetric",
"padding",
"accepts",
"the",
"desired",
"scale",
"as",
"an",
... | [
"int",
"vx",
"center",
"=",
"get",
"padding",
"left",
"(",
")",
"+",
"(",
"get",
"width",
"(",
")",
"-",
"get",
"padding",
"right",
"(",
")",
"-",
"get",
"padding",
"left",
"(",
")",
")",
"/",
"2",
";",
"int",
"vy",
"center",
"=",
"get",
"paddi... |
[
"given",
"a",
"requested",
"source",
"center",
"and",
"scale",
"calculate",
"what",
"the",
"actual",
"center",
"will",
"have",
"to",
"be",
"to",
"keep",
"the",
"image",
"in",
"pan",
"limits",
"keeping",
"the",
"requested",
"center",
"as",
"near",
"to",
"th... | [
"point",
"f",
"v",
"translate",
"=",
"v",
"translate",
"for",
"s",
"center",
"(",
"s",
"center",
"x",
",",
"s",
"center",
"y",
",",
"scale",
")",
";",
"int",
"vx",
"center",
"=",
"get",
"padding",
"left",
"(",
")",
"+",
"(",
"get",
"width",
"(",
... |
[
"returns",
"the",
"minimum",
"allowed",
"scale"
] | [
"int",
"v",
"padding",
"=",
"get",
"padding",
"bottom",
"(",
")",
"+",
"get",
"padding",
"top",
"(",
")",
";",
"int",
"h",
"padding",
"=",
"get",
"padding",
"left",
"(",
")",
"+",
"get",
"padding",
"right",
"(",
")",
";",
"if",
"(",
"minimum",
"s... |
[
"adjust",
"a",
"requested",
"scale",
"to",
"be",
"within",
"the",
"allowed",
"limits"
] | [
"target",
"scale",
"=",
"math",
"max",
"(",
"min",
"scale",
"(",
")",
",",
"target",
"scale",
")",
";",
"target",
"scale",
"=",
"math",
"min",
"(",
"max",
"scale",
",",
"target",
"scale",
")",
";",
"return",
"target",
"scale",
";"
] |
[
"quadratic",
"easing",
"for",
"fling",
"with",
"thanks",
"to",
"robert",
"penner",
"-",
"http",
":",
"/",
"/",
"gizma",
"com",
"/",
"easing",
"/"
] | [
"float",
"progress",
"=",
"(",
"float",
")",
"time",
"/",
"(",
"float",
")",
"duration",
";",
"return",
"-",
"change",
"*",
"progress",
"*",
"(",
"progress",
"-",
"2",
")",
"+",
"from",
";"
] |
[
"quadratic",
"easing",
"for",
"scale",
"and",
"center",
"animations",
"with",
"thanks",
"to",
"robert",
"penner",
"-",
"http",
":",
"/",
"/",
"gizma",
"com",
"/",
"easing",
"/"
] | [
"float",
"time",
"f",
"=",
"time",
"/",
"(",
"duration",
"/",
"2f",
")",
";",
"if",
"(",
"time",
"f",
"<",
"1",
")",
"{",
"return",
"(",
"change",
"/",
"2f",
"*",
"time",
"f",
"*",
"time",
"f",
")",
"+",
"from",
";",
"}",
"else",
"{",
"time... |
[
"debug",
"logger"
] | [
"if",
"(",
"debug",
")",
"{",
"log",
"d",
"(",
"tag",
",",
"string",
"format",
"(",
"message",
",",
"args",
")",
")",
";",
"}"
] |
[
"for",
"debug",
"overlays",
"scale",
"pixel",
"value",
"according",
"to",
"screen",
"density"
] | [
"return",
"(",
"int",
")",
"(",
"density",
"*",
"px",
")",
";"
] |
[
"calculate",
"how",
"much",
"further",
"the",
"image",
"can",
"be",
"panned",
"in",
"each",
"direction",
"the",
"results",
"are",
"set",
"on",
"the",
"supplied",
"{"
] | [
"if",
"(",
"!",
"is",
"ready",
"(",
")",
")",
"{",
"return",
";",
"}",
"float",
"scale",
"width",
"=",
"scale",
"*",
"s",
"width",
"(",
")",
";",
"float",
"scale",
"height",
"=",
"scale",
"*",
"s",
"height",
"(",
")",
";",
"if",
"(",
"pan",
"... |
[
"set",
"the",
"maximum",
"scale",
"allowed",
"a",
"value",
"of",
"1",
"means",
"1",
":",
"1",
"pixels",
"at",
"maximum",
"scale",
"you",
"may",
"wish",
"to",
"set",
"this",
"according",
"to",
"screen",
"density",
"-",
"on",
"a",
"retina",
"screen",
"1"... | [
"this",
"max",
"scale",
"=",
"max",
"scale",
";"
] |
[
"set",
"the",
"minimum",
"scale",
"allowed",
"a",
"value",
"of",
"1",
"means",
"1",
":",
"1",
"pixels",
"at",
"minimum",
"scale",
"you",
"may",
"wish",
"to",
"set",
"this",
"according",
"to",
"screen",
"density",
"consider",
"using",
"{"
] | [
"this",
"min",
"scale",
"=",
"min",
"scale",
";"
] |
[
"this",
"is",
"a",
"screen",
"density",
"aware",
"alternative",
"to",
"{"
] | [
"display",
"metrics",
"metrics",
"=",
"get",
"resources",
"(",
")",
"get",
"display",
"metrics",
"(",
")",
";",
"float",
"average",
"dpi",
"=",
"(",
"metrics",
"xdpi",
"+",
"metrics",
"ydpi",
")",
"/",
"2",
";",
"set",
"max",
"scale",
"(",
"average",
... |
[
"this",
"is",
"a",
"screen",
"density",
"aware",
"alternative",
"to",
"{"
] | [
"display",
"metrics",
"metrics",
"=",
"get",
"resources",
"(",
")",
"get",
"display",
"metrics",
"(",
")",
";",
"float",
"average",
"dpi",
"=",
"(",
"metrics",
"xdpi",
"+",
"metrics",
"ydpi",
")",
"/",
"2",
";",
"set",
"min",
"scale",
"(",
"average",
... |
[
"returns",
"the",
"minimum",
"allowed",
"scale"
] | [
"return",
"min",
"scale",
"(",
")",
";"
] |
[
"by",
"default",
"image",
"tiles",
"are",
"at",
"least",
"as",
"high",
"resolution",
"as",
"the",
"screen",
"for",
"a",
"retina",
"screen",
"this",
"may",
"not",
"be",
"necessary",
"and",
"may",
"increase",
"the",
"likelihood",
"of",
"an",
"out",
"of",
"... | [
"display",
"metrics",
"metrics",
"=",
"get",
"resources",
"(",
")",
"get",
"display",
"metrics",
"(",
")",
";",
"float",
"average",
"dpi",
"=",
"(",
"metrics",
"xdpi",
"+",
"metrics",
"ydpi",
")",
"/",
"2",
";",
"this",
"minimum",
"tile",
"dpi",
"=",
... |
[
"returns",
"the",
"source",
"point",
"at",
"the",
"center",
"of",
"the",
"view"
] | [
"int",
"m",
"x",
"=",
"get",
"width",
"(",
")",
"/",
"2",
";",
"int",
"m",
"y",
"=",
"get",
"height",
"(",
")",
"/",
"2",
";",
"return",
"view",
"to",
"source",
"coord",
"(",
"m",
"x",
",",
"m",
"y",
")",
";"
] |
[
"returns",
"the",
"current",
"scale",
"value"
] | [
"return",
"scale",
";"
] |
[
"externally",
"change",
"the",
"scale",
"and",
"translation",
"of",
"the",
"source",
"image",
"this",
"may",
"be",
"used",
"with",
"get",
"center",
"(",
")",
"and",
"get",
"scale",
"(",
")",
"to",
"restore",
"the",
"scale",
"and",
"zoom",
"after",
"a",
... | [
"this",
"anim",
"=",
"null",
";",
"this",
"pending",
"scale",
"=",
"scale",
";",
"this",
"s",
"pending",
"center",
"=",
"s",
"center",
";",
"this",
"s",
"requested",
"center",
"=",
"s",
"center",
";",
"invalidate",
"(",
")",
";"
] |
[
"fully",
"zoom",
"out",
"and",
"return",
"the",
"image",
"to",
"the",
"middle",
"of",
"the",
"screen",
"this",
"might",
"be",
"useful",
"if",
"you",
"have",
"a",
"view",
"pager",
"and",
"want",
"images",
"to",
"be",
"reset",
"when",
"the",
"user",
"has... | [
"this",
"anim",
"=",
"null",
";",
"this",
"pending",
"scale",
"=",
"limited",
"scale",
"(",
"0",
")",
";",
"if",
"(",
"is",
"ready",
"(",
")",
")",
"{",
"this",
"s",
"pending",
"center",
"=",
"new",
"point",
"f",
"(",
"s",
"width",
"(",
")",
"/... |
[
"call",
"to",
"find",
"whether",
"the",
"view",
"is",
"initialised",
"has",
"dimensions",
"and",
"will",
"display",
"an",
"image",
"on",
"the",
"next",
"draw",
"if",
"a",
"preview",
"has",
"been",
"provided",
"it",
"may",
"be",
"the",
"preview",
"that",
... | [
"return",
"ready",
"sent",
";"
] |
[
"call",
"to",
"find",
"whether",
"the",
"main",
"image",
"(",
"base",
"layer",
"tiles",
"where",
"relevant",
")",
"have",
"been",
"loaded",
"before",
"this",
"event",
"the",
"view",
"is",
"blank",
"unless",
"a",
"preview",
"was",
"provided"
] | [
"return",
"image",
"loaded",
"sent",
";"
] |
[
"get",
"source",
"width",
"ignoring",
"orientation",
"if",
"{"
] | [
"return",
"s",
"width",
";"
] |
[
"get",
"source",
"height",
"ignoring",
"orientation",
"if",
"{"
] | [
"return",
"s",
"height",
";"
] |
[
"returns",
"the",
"orientation",
"setting",
"this",
"can",
"return",
"{"
] | [
"return",
"orientation",
";"
] |
[
"returns",
"the",
"actual",
"orientation",
"of",
"the",
"image",
"relative",
"to",
"the",
"source",
"file",
"this",
"will",
"be",
"based",
"on",
"the",
"source",
"file",
"s",
"exif",
"orientation",
"if",
"you",
"re",
"using",
"orientation",
"use",
"exif",
... | [
"return",
"get",
"required",
"rotation",
"(",
")",
";"
] |
[
"returns",
"true",
"if",
"zoom",
"gesture",
"detection",
"is",
"enabled"
] | [
"return",
"zoom",
"enabled",
";"
] |
[
"enable",
"or",
"disable",
"zoom",
"gesture",
"detection",
"disabling",
"zoom",
"locks",
"the",
"the",
"current",
"scale"
] | [
"this",
"zoom",
"enabled",
"=",
"zoom",
"enabled",
";"
] |
[
"returns",
"true",
"if",
"double",
"tap",
"&",
"amp",
";",
"swipe",
"to",
"zoom",
"is",
"enabled"
] | [
"return",
"quick",
"scale",
"enabled",
";"
] |
[
"enable",
"or",
"disable",
"double",
"tap",
"&",
"amp",
";",
"swipe",
"to",
"zoom"
] | [
"this",
"quick",
"scale",
"enabled",
"=",
"quick",
"scale",
"enabled",
";"
] |
[
"returns",
"true",
"if",
"pan",
"gesture",
"detection",
"is",
"enabled"
] | [
"return",
"pan",
"enabled",
";"
] |
[
"enable",
"or",
"disable",
"pan",
"gesture",
"detection",
"disabling",
"pan",
"causes",
"the",
"image",
"to",
"be",
"centered"
] | [
"this",
"pan",
"enabled",
"=",
"pan",
"enabled",
";",
"if",
"(",
"!",
"pan",
"enabled",
"&",
"&",
"v",
"translate",
"!",
"=",
"null",
")",
"{",
"v",
"translate",
"x",
"=",
"(",
"get",
"width",
"(",
")",
"/",
"2",
")",
"-",
"(",
"scale",
"*",
... |
[
"set",
"a",
"solid",
"color",
"to",
"render",
"behind",
"tiles",
"useful",
"for",
"displaying",
"transparent",
"p",
"n",
"gs"
] | [
"if",
"(",
"color",
"alpha",
"(",
"tile",
"bg",
"color",
")",
"=",
"=",
"0",
")",
"{",
"tile",
"bg",
"paint",
"=",
"null",
";",
"}",
"else",
"{",
"tile",
"bg",
"paint",
"=",
"new",
"paint",
"(",
")",
";",
"tile",
"bg",
"paint",
"set",
"style",
... |
[
"set",
"the",
"scale",
"the",
"image",
"will",
"zoom",
"in",
"to",
"when",
"double",
"tapped",
"this",
"also",
"the",
"scale",
"point",
"where",
"a",
"double",
"tap",
"is",
"interpreted",
"as",
"a",
"zoom",
"out",
"gesture",
"-",
"if",
"the",
"scale",
... | [
"this",
"double",
"tap",
"zoom",
"scale",
"=",
"double",
"tap",
"zoom",
"scale",
";"
] |
[
"a",
"density",
"aware",
"alternative",
"to",
"{"
] | [
"display",
"metrics",
"metrics",
"=",
"get",
"resources",
"(",
")",
"get",
"display",
"metrics",
"(",
")",
";",
"float",
"average",
"dpi",
"=",
"(",
"metrics",
"xdpi",
"+",
"metrics",
"ydpi",
")",
"/",
"2",
";",
"set",
"double",
"tap",
"zoom",
"scale",... |
[
"set",
"the",
"duration",
"of",
"the",
"double",
"tap",
"zoom",
"animation"
] | [
"this",
"double",
"tap",
"zoom",
"duration",
"=",
"math",
"max",
"(",
"0",
",",
"duration",
"ms",
")",
";"
] |
[
"enable",
"or",
"disable",
"eager",
"loading",
"of",
"tiles",
"that",
"appear",
"on",
"screen",
"during",
"gestures",
"or",
"animations",
"while",
"the",
"gesture",
"or",
"animation",
"is",
"still",
"in",
"progress",
"by",
"default",
"this",
"is",
"enabled",
... | [
"this",
"eager",
"loading",
"enabled",
"=",
"eager",
"loading",
"enabled",
";"
] |
[
"enables",
"visual",
"debugging",
"showing",
"tile",
"boundaries",
"and",
"sizes"
] | [
"this",
"debug",
"=",
"debug",
";"
] |
[
"check",
"if",
"an",
"image",
"has",
"been",
"set",
"the",
"image",
"may",
"not",
"have",
"been",
"loaded",
"and",
"displayed",
"yet"
] | [
"return",
"uri",
"!",
"=",
"null",
"|",
"|",
"bitmap",
"!",
"=",
"null",
";"
] |
[
"{"
] | [
"this",
"on",
"long",
"click",
"listener",
"=",
"on",
"long",
"click",
"listener",
";"
] |
[
"add",
"a",
"listener",
"allowing",
"notification",
"of",
"load",
"and",
"error",
"events"
] | [
"this",
"on",
"image",
"event",
"listener",
"=",
"on",
"image",
"event",
"listener",
";"
] |
[
"add",
"a",
"listener",
"for",
"pan",
"and",
"zoom",
"events"
] | [
"this",
"on",
"state",
"changed",
"listener",
"=",
"on",
"state",
"changed",
"listener",
";"
] |
[
"creates",
"a",
"panning",
"animation",
"builder",
"that",
"when",
"started",
"will",
"animate",
"the",
"image",
"to",
"place",
"the",
"given",
"coordinates",
"of",
"the",
"image",
"in",
"the",
"center",
"of",
"the",
"screen",
"if",
"doing",
"this",
"would",... | [
"if",
"(",
"!",
"is",
"ready",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"return",
"new",
"animation",
"builder",
"(",
"s",
"center",
")",
";"
] |
[
"creates",
"a",
"scale",
"animation",
"builder",
"that",
"when",
"started",
"will",
"animate",
"a",
"zoom",
"in",
"or",
"out",
"if",
"this",
"would",
"move",
"the",
"image",
"beyond",
"the",
"panning",
"limits",
"the",
"image",
"is",
"automatically",
"panned... | [
"if",
"(",
"!",
"is",
"ready",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"return",
"new",
"animation",
"builder",
"(",
"scale",
")",
";"
] |
[
"creates",
"a",
"scale",
"animation",
"builder",
"that",
"when",
"started",
"will",
"animate",
"a",
"zoom",
"in",
"or",
"out",
"if",
"this",
"would",
"move",
"the",
"image",
"beyond",
"the",
"panning",
"limits",
"the",
"image",
"is",
"automatically",
"panned... | [
"if",
"(",
"!",
"is",
"ready",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"return",
"new",
"animation",
"builder",
"(",
"scale",
",",
"s",
"center",
")",
";"
] |
[
"desired",
"duration",
"of",
"the",
"anim",
"in",
"milliseconds",
"default",
"is",
"500"
] | [
"this",
"duration",
"=",
"duration",
";",
"return",
"this",
";"
] |
[
"whether",
"the",
"animation",
"can",
"be",
"interrupted",
"with",
"a",
"touch",
"default",
"is",
"true"
] | [
"this",
"interruptible",
"=",
"interruptible",
";",
"return",
"this",
";"
] |
[
"add",
"an",
"animation",
"event",
"listener"
] | [
"this",
"listener",
"=",
"listener",
";",
"return",
"this",
";"
] |
[
"only",
"for",
"internal",
"use",
"when",
"set",
"to",
"true",
"the",
"animation",
"proceeds",
"towards",
"the",
"actual",
"end",
"point",
"-",
"the",
"nearest",
"point",
"to",
"the",
"center",
"allowed",
"by",
"pan",
"limits",
"when",
"false",
"animation",
... | [
"this",
"pan",
"limited",
"=",
"pan",
"limited",
";",
"return",
"this",
";"
] |
[
"only",
"for",
"internal",
"use",
"indicates",
"what",
"caused",
"the",
"animation"
] | [
"this",
"origin",
"=",
"origin",
";",
"return",
"this",
";"
] |
[
"ensures",
"the",
"<",
"code",
">",
"method",
"invocation",
"<",
"/",
"code",
">",
"is",
"allowed",
"to",
"execute",
"first",
"before",
"proceeding",
"by",
"calling",
"the",
"{",
"@",
"link",
"#",
"assert",
"authorized",
"(",
"org",
"apache",
"shiro",
"a... | [
"assert",
"authorized",
"(",
"method",
"invocation",
")",
";",
"return",
"method",
"invocation",
"proceed",
"(",
")",
";"
] |
[
"asserts",
"that",
"the",
"specified",
"method",
"invocation",
"is",
"allowed",
"to",
"continue",
"by",
"performing",
"any",
"necessary",
"authorization",
"(",
"access",
"control",
")",
"checks",
"first"
] | [
"protected",
"abstract",
"void",
"assert",
"authorized",
"(",
"method",
"invocation",
"method",
"invocation",
")",
"throws",
"authorization",
"exception",
";"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.