id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
42,900 | groupon/monsoon | history/src/main/java/com/groupon/lex/metrics/history/xdr/support/FileUtil.java | FileUtil.createNewFile | public static NamedFileChannel createNewFile(Path dir, String prefix, String suffix) throws IOException {
return createNewFileImpl(dir, prefix, suffix, new OpenOption[]{READ, WRITE, CREATE_NEW});
} | java | public static NamedFileChannel createNewFile(Path dir, String prefix, String suffix) throws IOException {
return createNewFileImpl(dir, prefix, suffix, new OpenOption[]{READ, WRITE, CREATE_NEW});
} | [
"public",
"static",
"NamedFileChannel",
"createNewFile",
"(",
"Path",
"dir",
",",
"String",
"prefix",
",",
"String",
"suffix",
")",
"throws",
"IOException",
"{",
"return",
"createNewFileImpl",
"(",
"dir",
",",
"prefix",
",",
"suffix",
",",
"new",
"OpenOption",
... | Creates a new file and opens it for reading and writing. | [
"Creates",
"a",
"new",
"file",
"and",
"opens",
"it",
"for",
"reading",
"and",
"writing",
"."
] | eb68d72ba4c01fe018dc981097dbee033908f5c7 | https://github.com/groupon/monsoon/blob/eb68d72ba4c01fe018dc981097dbee033908f5c7/history/src/main/java/com/groupon/lex/metrics/history/xdr/support/FileUtil.java#L73-L75 |
42,901 | threerings/nenya | core/src/main/java/com/threerings/miso/client/SceneObject.java | SceneObject.paint | public void paint (Graphics2D gfx)
{
// if we're rendering footprints, paint that
boolean footpaint = _fprintDebug.getValue();
if (footpaint) {
gfx.setColor(Color.black);
gfx.draw(_footprint);
if (_hideObjects.getValue()) {
// We're in foo... | java | public void paint (Graphics2D gfx)
{
// if we're rendering footprints, paint that
boolean footpaint = _fprintDebug.getValue();
if (footpaint) {
gfx.setColor(Color.black);
gfx.draw(_footprint);
if (_hideObjects.getValue()) {
// We're in foo... | [
"public",
"void",
"paint",
"(",
"Graphics2D",
"gfx",
")",
"{",
"// if we're rendering footprints, paint that",
"boolean",
"footpaint",
"=",
"_fprintDebug",
".",
"getValue",
"(",
")",
";",
"if",
"(",
"footpaint",
")",
"{",
"gfx",
".",
"setColor",
"(",
"Color",
... | Requests that this scene object render itself. | [
"Requests",
"that",
"this",
"scene",
"object",
"render",
"itself",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/SceneObject.java#L111-L165 |
42,902 | threerings/nenya | core/src/main/java/com/threerings/miso/client/SceneObject.java | SceneObject.setPriority | public void setPriority (byte priority)
{
info.priority = (byte)Math.max(
Byte.MIN_VALUE, Math.min(Byte.MAX_VALUE, priority));
} | java | public void setPriority (byte priority)
{
info.priority = (byte)Math.max(
Byte.MIN_VALUE, Math.min(Byte.MAX_VALUE, priority));
} | [
"public",
"void",
"setPriority",
"(",
"byte",
"priority",
")",
"{",
"info",
".",
"priority",
"=",
"(",
"byte",
")",
"Math",
".",
"max",
"(",
"Byte",
".",
"MIN_VALUE",
",",
"Math",
".",
"min",
"(",
"Byte",
".",
"MAX_VALUE",
",",
"priority",
")",
")",
... | Overrides the render priority of this object. | [
"Overrides",
"the",
"render",
"priority",
"of",
"this",
"object",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/SceneObject.java#L228-L232 |
42,903 | threerings/nenya | core/src/main/java/com/threerings/miso/client/SceneObject.java | SceneObject.relocateObject | public void relocateObject (MisoSceneMetrics metrics, int tx, int ty)
{
// Log.info("Relocating object " + this + " to " +
// StringUtil.coordsToString(tx, ty));
info.x = tx;
info.y = ty;
computeInfo(metrics);
} | java | public void relocateObject (MisoSceneMetrics metrics, int tx, int ty)
{
// Log.info("Relocating object " + this + " to " +
// StringUtil.coordsToString(tx, ty));
info.x = tx;
info.y = ty;
computeInfo(metrics);
} | [
"public",
"void",
"relocateObject",
"(",
"MisoSceneMetrics",
"metrics",
",",
"int",
"tx",
",",
"int",
"ty",
")",
"{",
"// Log.info(\"Relocating object \" + this + \" to \" +",
"// StringUtil.coordsToString(tx, ty));",
"info",
".",
"x",
"=",
"tx",
";... | Updates this object's origin tile coordinate. Its bounds and other
cached screen coordinate information are updated. | [
"Updates",
"this",
"object",
"s",
"origin",
"tile",
"coordinate",
".",
"Its",
"bounds",
"and",
"other",
"cached",
"screen",
"coordinate",
"information",
"are",
"updated",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/SceneObject.java#L248-L255 |
42,904 | threerings/nenya | core/src/main/java/com/threerings/miso/client/SceneObject.java | SceneObject.computeInfo | protected void computeInfo (MisoSceneMetrics metrics)
{
// start with the screen coordinates of our origin tile
Point tpos = MisoUtil.tileToScreen(
metrics, info.x, info.y, new Point());
// if the tile has an origin coordinate, use that, otherwise
// compute it from the ... | java | protected void computeInfo (MisoSceneMetrics metrics)
{
// start with the screen coordinates of our origin tile
Point tpos = MisoUtil.tileToScreen(
metrics, info.x, info.y, new Point());
// if the tile has an origin coordinate, use that, otherwise
// compute it from the ... | [
"protected",
"void",
"computeInfo",
"(",
"MisoSceneMetrics",
"metrics",
")",
"{",
"// start with the screen coordinates of our origin tile",
"Point",
"tpos",
"=",
"MisoUtil",
".",
"tileToScreen",
"(",
"metrics",
",",
"info",
".",
"x",
",",
"info",
".",
"y",
",",
"... | Computes our screen bounds, tile footprint and other useful cached metrics. | [
"Computes",
"our",
"screen",
"bounds",
"tile",
"footprint",
"and",
"other",
"useful",
"cached",
"metrics",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/SceneObject.java#L291-L331 |
42,905 | tonilopezmr/Android-EasySQLite | app/src/main/java/com/tonilopezmr/sample/domain/interactor/GetSubjectListUseCaseImp.java | GetSubjectListUseCaseImp.run | @Override
public void run() {
try {
Thread.sleep(3000);
} catch (InterruptedException e) {
e.printStackTrace();
}
subjectRepository.getSubjectsCollection(new SubjectRepository.SubjectListCallback() {
@Override
public void onSubjectList... | java | @Override
public void run() {
try {
Thread.sleep(3000);
} catch (InterruptedException e) {
e.printStackTrace();
}
subjectRepository.getSubjectsCollection(new SubjectRepository.SubjectListCallback() {
@Override
public void onSubjectList... | [
"@",
"Override",
"public",
"void",
"run",
"(",
")",
"{",
"try",
"{",
"Thread",
".",
"sleep",
"(",
"3000",
")",
";",
"}",
"catch",
"(",
"InterruptedException",
"e",
")",
"{",
"e",
".",
"printStackTrace",
"(",
")",
";",
"}",
"subjectRepository",
".",
"... | Interactor User case | [
"Interactor",
"User",
"case"
] | bb991a43c9fa11522e5367570ee2335b99bca7c0 | https://github.com/tonilopezmr/Android-EasySQLite/blob/bb991a43c9fa11522e5367570ee2335b99bca7c0/app/src/main/java/com/tonilopezmr/sample/domain/interactor/GetSubjectListUseCaseImp.java#L43-L73 |
42,906 | groupon/monsoon | history/src/main/java/com/groupon/lex/metrics/history/xdr/support/TmpFileBasedColumnMajorTSData.java | Builder.fixBacklog | private void fixBacklog() throws IOException {
try {
writers.values().parallelStream()
.forEach(groupWriter -> {
try {
groupWriter.fixBacklog(timestamps.size());
} catch (IOExcepti... | java | private void fixBacklog() throws IOException {
try {
writers.values().parallelStream()
.forEach(groupWriter -> {
try {
groupWriter.fixBacklog(timestamps.size());
} catch (IOExcepti... | [
"private",
"void",
"fixBacklog",
"(",
")",
"throws",
"IOException",
"{",
"try",
"{",
"writers",
".",
"values",
"(",
")",
".",
"parallelStream",
"(",
")",
".",
"forEach",
"(",
"groupWriter",
"->",
"{",
"try",
"{",
"groupWriter",
".",
"fixBacklog",
"(",
"t... | Pad all groups with empty maps, to ensure it's the same size as
timestamps list.
We want to keep all the Group instances to have the same number of
maps as the timestamps list, so we can zip the two together. | [
"Pad",
"all",
"groups",
"with",
"empty",
"maps",
"to",
"ensure",
"it",
"s",
"the",
"same",
"size",
"as",
"timestamps",
"list",
"."
] | eb68d72ba4c01fe018dc981097dbee033908f5c7 | https://github.com/groupon/monsoon/blob/eb68d72ba4c01fe018dc981097dbee033908f5c7/history/src/main/java/com/groupon/lex/metrics/history/xdr/support/TmpFileBasedColumnMajorTSData.java#L114-L127 |
42,907 | threerings/nenya | core/src/main/java/com/threerings/media/MetaMediaManager.java | MetaMediaManager.setPaused | public void setPaused (boolean paused)
{
// sanity check
if ((paused && (_pauseTime != 0)) || (!paused && (_pauseTime == 0))) {
log.warning("Requested to pause when paused or vice-versa", "paused", paused);
return;
}
_paused = paused;
if (_paused) {
... | java | public void setPaused (boolean paused)
{
// sanity check
if ((paused && (_pauseTime != 0)) || (!paused && (_pauseTime == 0))) {
log.warning("Requested to pause when paused or vice-versa", "paused", paused);
return;
}
_paused = paused;
if (_paused) {
... | [
"public",
"void",
"setPaused",
"(",
"boolean",
"paused",
")",
"{",
"// sanity check",
"if",
"(",
"(",
"paused",
"&&",
"(",
"_pauseTime",
"!=",
"0",
")",
")",
"||",
"(",
"!",
"paused",
"&&",
"(",
"_pauseTime",
"==",
"0",
")",
")",
")",
"{",
"log",
"... | Pauses the sprites and animations that are currently active on this media panel. Also stops
listening to the frame tick while paused. | [
"Pauses",
"the",
"sprites",
"and",
"animations",
"that",
"are",
"currently",
"active",
"on",
"this",
"media",
"panel",
".",
"Also",
"stops",
"listening",
"to",
"the",
"frame",
"tick",
"while",
"paused",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/MetaMediaManager.java#L110-L132 |
42,908 | threerings/nenya | core/src/main/java/com/threerings/media/MetaMediaManager.java | MetaMediaManager.paintMedia | public void paintMedia (Graphics2D gfx, int layer, Rectangle dirty)
{
if (layer == FRONT) {
_spritemgr.paint(gfx, layer, dirty);
_animmgr.paint(gfx, layer, dirty);
} else {
_animmgr.paint(gfx, layer, dirty);
_spritemgr.paint(gfx, layer, dirty);
... | java | public void paintMedia (Graphics2D gfx, int layer, Rectangle dirty)
{
if (layer == FRONT) {
_spritemgr.paint(gfx, layer, dirty);
_animmgr.paint(gfx, layer, dirty);
} else {
_animmgr.paint(gfx, layer, dirty);
_spritemgr.paint(gfx, layer, dirty);
... | [
"public",
"void",
"paintMedia",
"(",
"Graphics2D",
"gfx",
",",
"int",
"layer",
",",
"Rectangle",
"dirty",
")",
"{",
"if",
"(",
"layer",
"==",
"FRONT",
")",
"{",
"_spritemgr",
".",
"paint",
"(",
"gfx",
",",
"layer",
",",
"dirty",
")",
";",
"_animmgr",
... | Renders the sprites and animations that intersect the supplied dirty region in the specified
layer. | [
"Renders",
"the",
"sprites",
"and",
"animations",
"that",
"intersect",
"the",
"supplied",
"dirty",
"region",
"in",
"the",
"specified",
"layer",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/MetaMediaManager.java#L300-L309 |
42,909 | threerings/nenya | core/src/main/java/com/threerings/media/MetaMediaManager.java | MetaMediaManager.paintPerf | public void paintPerf (Graphics2D gfx)
{
if (_perfRect != null && FrameManager._perfDebug.getValue()) {
gfx.setClip(null);
_perfLabel.render(gfx, _perfRect.x, _perfRect.y);
}
} | java | public void paintPerf (Graphics2D gfx)
{
if (_perfRect != null && FrameManager._perfDebug.getValue()) {
gfx.setClip(null);
_perfLabel.render(gfx, _perfRect.x, _perfRect.y);
}
} | [
"public",
"void",
"paintPerf",
"(",
"Graphics2D",
"gfx",
")",
"{",
"if",
"(",
"_perfRect",
"!=",
"null",
"&&",
"FrameManager",
".",
"_perfDebug",
".",
"getValue",
"(",
")",
")",
"{",
"gfx",
".",
"setClip",
"(",
"null",
")",
";",
"_perfLabel",
".",
"ren... | Renders our performance debugging information if enabled. | [
"Renders",
"our",
"performance",
"debugging",
"information",
"if",
"enabled",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/MetaMediaManager.java#L314-L320 |
42,910 | threerings/nenya | core/src/main/java/com/threerings/media/MetaMediaManager.java | MetaMediaManager.viewLocationDidChange | public void viewLocationDidChange (int dx, int dy)
{
if (_perfRect != null) {
Rectangle sdirty = new Rectangle(_perfRect);
sdirty.translate(-dx, -dy);
_remgr.addDirtyRegion(sdirty);
}
// let our sprites and animations know what's up
_animmgr.viewL... | java | public void viewLocationDidChange (int dx, int dy)
{
if (_perfRect != null) {
Rectangle sdirty = new Rectangle(_perfRect);
sdirty.translate(-dx, -dy);
_remgr.addDirtyRegion(sdirty);
}
// let our sprites and animations know what's up
_animmgr.viewL... | [
"public",
"void",
"viewLocationDidChange",
"(",
"int",
"dx",
",",
"int",
"dy",
")",
"{",
"if",
"(",
"_perfRect",
"!=",
"null",
")",
"{",
"Rectangle",
"sdirty",
"=",
"new",
"Rectangle",
"(",
"_perfRect",
")",
";",
"sdirty",
".",
"translate",
"(",
"-",
"... | If our host supports scrolling around in a virtual view, it should call this method when the
view origin changes. | [
"If",
"our",
"host",
"supports",
"scrolling",
"around",
"in",
"a",
"virtual",
"view",
"it",
"should",
"call",
"this",
"method",
"when",
"the",
"view",
"origin",
"changes",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/MetaMediaManager.java#L326-L337 |
42,911 | threerings/nenya | core/src/main/java/com/threerings/media/tile/Tile.java | Tile.setImage | public void setImage (Mirage image)
{
if (_mirage != null) {
_totalTileMemory -= _mirage.getEstimatedMemoryUsage();
}
_mirage = image;
if (_mirage != null) {
_totalTileMemory += _mirage.getEstimatedMemoryUsage();
}
} | java | public void setImage (Mirage image)
{
if (_mirage != null) {
_totalTileMemory -= _mirage.getEstimatedMemoryUsage();
}
_mirage = image;
if (_mirage != null) {
_totalTileMemory += _mirage.getEstimatedMemoryUsage();
}
} | [
"public",
"void",
"setImage",
"(",
"Mirage",
"image",
")",
"{",
"if",
"(",
"_mirage",
"!=",
"null",
")",
"{",
"_totalTileMemory",
"-=",
"_mirage",
".",
"getEstimatedMemoryUsage",
"(",
")",
";",
"}",
"_mirage",
"=",
"image",
";",
"if",
"(",
"_mirage",
"!=... | Configures this tile with its tile image. | [
"Configures",
"this",
"tile",
"with",
"its",
"tile",
"image",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/tile/Tile.java#L80-L89 |
42,912 | threerings/nenya | core/src/main/java/com/threerings/media/tile/Tile.java | Tile.paint | public void paint (Graphics2D gfx, int x, int y)
{
_mirage.paint(gfx, x, y);
} | java | public void paint (Graphics2D gfx, int x, int y)
{
_mirage.paint(gfx, x, y);
} | [
"public",
"void",
"paint",
"(",
"Graphics2D",
"gfx",
",",
"int",
"x",
",",
"int",
"y",
")",
"{",
"_mirage",
".",
"paint",
"(",
"gfx",
",",
"x",
",",
"y",
")",
";",
"}"
] | Render the tile image at the specified position in the given
graphics context. | [
"Render",
"the",
"tile",
"image",
"at",
"the",
"specified",
"position",
"in",
"the",
"given",
"graphics",
"context",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/tile/Tile.java#L119-L122 |
42,913 | threerings/nenya | core/src/main/java/com/threerings/media/sound/SoundLoader.java | SoundLoader.getSound | public InputStream getSound (String bundle, String path)
throws IOException
{
InputStream rsrc;
try {
rsrc = _rmgr.getResource(bundle, path);
} catch (FileNotFoundException notFound) {
// try from the classpath
try {
rsrc = _rmgr.ge... | java | public InputStream getSound (String bundle, String path)
throws IOException
{
InputStream rsrc;
try {
rsrc = _rmgr.getResource(bundle, path);
} catch (FileNotFoundException notFound) {
// try from the classpath
try {
rsrc = _rmgr.ge... | [
"public",
"InputStream",
"getSound",
"(",
"String",
"bundle",
",",
"String",
"path",
")",
"throws",
"IOException",
"{",
"InputStream",
"rsrc",
";",
"try",
"{",
"rsrc",
"=",
"_rmgr",
".",
"getResource",
"(",
"bundle",
",",
"path",
")",
";",
"}",
"catch",
... | Attempts to load a sound stream from the given path from the given bundle and from the
classpath. If nothing is found, a FileNotFoundException is thrown. | [
"Attempts",
"to",
"load",
"a",
"sound",
"stream",
"from",
"the",
"given",
"path",
"from",
"the",
"given",
"bundle",
"and",
"from",
"the",
"classpath",
".",
"If",
"nothing",
"is",
"found",
"a",
"FileNotFoundException",
"is",
"thrown",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/sound/SoundLoader.java#L92-L107 |
42,914 | threerings/nenya | core/src/main/java/com/threerings/media/sound/SoundLoader.java | SoundLoader.getConfig | protected Config getConfig (String packagePath)
{
Config c = _configs.get(packagePath);
if (c == null) {
Properties props = new Properties();
String propFilename = packagePath + Sounds.PROP_NAME + ".properties";
try {
props = ConfigUtil.loadInherit... | java | protected Config getConfig (String packagePath)
{
Config c = _configs.get(packagePath);
if (c == null) {
Properties props = new Properties();
String propFilename = packagePath + Sounds.PROP_NAME + ".properties";
try {
props = ConfigUtil.loadInherit... | [
"protected",
"Config",
"getConfig",
"(",
"String",
"packagePath",
")",
"{",
"Config",
"c",
"=",
"_configs",
".",
"get",
"(",
"packagePath",
")",
";",
"if",
"(",
"c",
"==",
"null",
")",
"{",
"Properties",
"props",
"=",
"new",
"Properties",
"(",
")",
";"... | Get the cached Config. | [
"Get",
"the",
"cached",
"Config",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/sound/SoundLoader.java#L117-L132 |
42,915 | threerings/nenya | core/src/main/java/com/threerings/media/sound/SoundLoader.java | SoundLoader.loadClipData | protected byte[] loadClipData (String bundle, String path)
throws IOException
{
InputStream clipin = null;
try {
clipin = getSound(bundle, path);
} catch (FileNotFoundException fnfe) {
// only play the default sound if we have verbose sound debugging turned on... | java | protected byte[] loadClipData (String bundle, String path)
throws IOException
{
InputStream clipin = null;
try {
clipin = getSound(bundle, path);
} catch (FileNotFoundException fnfe) {
// only play the default sound if we have verbose sound debugging turned on... | [
"protected",
"byte",
"[",
"]",
"loadClipData",
"(",
"String",
"bundle",
",",
"String",
"path",
")",
"throws",
"IOException",
"{",
"InputStream",
"clipin",
"=",
"null",
";",
"try",
"{",
"clipin",
"=",
"getSound",
"(",
"bundle",
",",
"path",
")",
";",
"}",... | Read the data from the resource manager. | [
"Read",
"the",
"data",
"from",
"the",
"resource",
"manager",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/sound/SoundLoader.java#L137-L170 |
42,916 | threerings/nenya | core/src/main/java/com/threerings/media/timer/CalibratingTimer.java | CalibratingTimer.init | protected void init (long milliDivider, long microDivider)
{
_milliDivider = milliDivider;
_microDivider = microDivider;
reset();
log.info("Using " + getClass() + " timer", "mfreq", _milliDivider,
"ufreq", _microDivider, "start", _startStamp);
} | java | protected void init (long milliDivider, long microDivider)
{
_milliDivider = milliDivider;
_microDivider = microDivider;
reset();
log.info("Using " + getClass() + " timer", "mfreq", _milliDivider,
"ufreq", _microDivider, "start", _startStamp);
} | [
"protected",
"void",
"init",
"(",
"long",
"milliDivider",
",",
"long",
"microDivider",
")",
"{",
"_milliDivider",
"=",
"milliDivider",
";",
"_microDivider",
"=",
"microDivider",
";",
"reset",
"(",
")",
";",
"log",
".",
"info",
"(",
"\"Using \"",
"+",
"getCla... | Initializes this timer. Must be called before the timer is used.
@param milliDivider - value by which current() must be divided to get milliseconds
@param microDivider - value by which current() must be divided to get microseconds | [
"Initializes",
"this",
"timer",
".",
"Must",
"be",
"called",
"before",
"the",
"timer",
"is",
"used",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/timer/CalibratingTimer.java#L43-L50 |
42,917 | threerings/nenya | core/src/main/java/com/threerings/media/timer/CalibratingTimer.java | CalibratingTimer.calibrate | protected void calibrate ()
{
long currentTimer = current();
long currentMillis = System.currentTimeMillis();
long elapsedTimer = currentTimer - _driftTimerStamp;
float elapsedMillis = currentMillis - _driftMilliStamp;
float drift = elapsedMillis / (elapsedTimer / _milliDivid... | java | protected void calibrate ()
{
long currentTimer = current();
long currentMillis = System.currentTimeMillis();
long elapsedTimer = currentTimer - _driftTimerStamp;
float elapsedMillis = currentMillis - _driftMilliStamp;
float drift = elapsedMillis / (elapsedTimer / _milliDivid... | [
"protected",
"void",
"calibrate",
"(",
")",
"{",
"long",
"currentTimer",
"=",
"current",
"(",
")",
";",
"long",
"currentMillis",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"long",
"elapsedTimer",
"=",
"currentTimer",
"-",
"_driftTimerStamp",
";",
... | Calculates the drift factor from the time elapsed from the last calibrate call. | [
"Calculates",
"the",
"drift",
"factor",
"from",
"the",
"time",
"elapsed",
"from",
"the",
"last",
"calibrate",
"call",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/timer/CalibratingTimer.java#L121-L160 |
42,918 | threerings/nenya | tools/src/main/java/com/threerings/cast/tools/xml/ClassRuleSet.java | ClassRuleSet.addRuleInstances | @Override
public void addRuleInstances (Digester digester)
{
// this creates the appropriate instance when we encounter a
// <class> tag
digester.addObjectCreate(_prefix + CLASS_PATH,
ComponentClass.class.getName());
// grab the attributes from t... | java | @Override
public void addRuleInstances (Digester digester)
{
// this creates the appropriate instance when we encounter a
// <class> tag
digester.addObjectCreate(_prefix + CLASS_PATH,
ComponentClass.class.getName());
// grab the attributes from t... | [
"@",
"Override",
"public",
"void",
"addRuleInstances",
"(",
"Digester",
"digester",
")",
"{",
"// this creates the appropriate instance when we encounter a",
"// <class> tag",
"digester",
".",
"addObjectCreate",
"(",
"_prefix",
"+",
"CLASS_PATH",
",",
"ComponentClass",
".",... | Adds the necessary rules to the digester to parse our classes. | [
"Adds",
"the",
"necessary",
"rules",
"to",
"the",
"digester",
"to",
"parse",
"our",
"classes",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/tools/src/main/java/com/threerings/cast/tools/xml/ClassRuleSet.java#L70-L106 |
42,919 | threerings/nenya | core/src/main/java/com/threerings/miso/util/ObjectSet.java | ObjectSet.insert | public boolean insert (ObjectInfo info)
{
// bail if it's already in the set
int ipos = indexOf(info);
if (ipos >= 0) {
// log a warning because the caller shouldn't be doing this
log.warning("Requested to add an object to a set that already " +
... | java | public boolean insert (ObjectInfo info)
{
// bail if it's already in the set
int ipos = indexOf(info);
if (ipos >= 0) {
// log a warning because the caller shouldn't be doing this
log.warning("Requested to add an object to a set that already " +
... | [
"public",
"boolean",
"insert",
"(",
"ObjectInfo",
"info",
")",
"{",
"// bail if it's already in the set",
"int",
"ipos",
"=",
"indexOf",
"(",
"info",
")",
";",
"if",
"(",
"ipos",
">=",
"0",
")",
"{",
"// log a warning because the caller shouldn't be doing this",
"lo... | Inserts the supplied object into the set.
@return true if it was inserted, false if the object was already in
the set. | [
"Inserts",
"the",
"supplied",
"object",
"into",
"the",
"set",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/util/ObjectSet.java#L44-L61 |
42,920 | threerings/nenya | core/src/main/java/com/threerings/miso/util/ObjectSet.java | ObjectSet.remove | public boolean remove (ObjectInfo info)
{
int opos = indexOf(info);
if (opos >= 0) {
remove(opos);
return true;
} else {
return false;
}
} | java | public boolean remove (ObjectInfo info)
{
int opos = indexOf(info);
if (opos >= 0) {
remove(opos);
return true;
} else {
return false;
}
} | [
"public",
"boolean",
"remove",
"(",
"ObjectInfo",
"info",
")",
"{",
"int",
"opos",
"=",
"indexOf",
"(",
"info",
")",
";",
"if",
"(",
"opos",
">=",
"0",
")",
"{",
"remove",
"(",
"opos",
")",
";",
"return",
"true",
";",
"}",
"else",
"{",
"return",
... | Removes the specified object from the set.
@return true if it was removed, false if it was not in the set. | [
"Removes",
"the",
"specified",
"object",
"from",
"the",
"set",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/util/ObjectSet.java#L103-L112 |
42,921 | threerings/nenya | core/src/main/java/com/threerings/miso/util/ObjectSet.java | ObjectSet.toArray | public ObjectInfo[] toArray ()
{
ObjectInfo[] info = new ObjectInfo[_size];
System.arraycopy(_objs, 0, info, 0, _size);
return info;
} | java | public ObjectInfo[] toArray ()
{
ObjectInfo[] info = new ObjectInfo[_size];
System.arraycopy(_objs, 0, info, 0, _size);
return info;
} | [
"public",
"ObjectInfo",
"[",
"]",
"toArray",
"(",
")",
"{",
"ObjectInfo",
"[",
"]",
"info",
"=",
"new",
"ObjectInfo",
"[",
"_size",
"]",
";",
"System",
".",
"arraycopy",
"(",
"_objs",
",",
"0",
",",
"info",
",",
"0",
",",
"_size",
")",
";",
"return... | Converts the contents of this object set to an array. | [
"Converts",
"the",
"contents",
"of",
"this",
"object",
"set",
"to",
"an",
"array",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/util/ObjectSet.java#L126-L131 |
42,922 | threerings/nenya | core/src/main/java/com/threerings/miso/client/SceneBlock.java | SceneBlock.getBaseTile | public BaseTile getBaseTile (int tx, int ty)
{
BaseTile tile = _base[index(tx, ty)];
if (tile == null && _defset != null) {
tile = (BaseTile)_defset.getTile(
TileUtil.getTileHash(tx, ty) % _defset.getTileCount());
}
return tile;
} | java | public BaseTile getBaseTile (int tx, int ty)
{
BaseTile tile = _base[index(tx, ty)];
if (tile == null && _defset != null) {
tile = (BaseTile)_defset.getTile(
TileUtil.getTileHash(tx, ty) % _defset.getTileCount());
}
return tile;
} | [
"public",
"BaseTile",
"getBaseTile",
"(",
"int",
"tx",
",",
"int",
"ty",
")",
"{",
"BaseTile",
"tile",
"=",
"_base",
"[",
"index",
"(",
"tx",
",",
"ty",
")",
"]",
";",
"if",
"(",
"tile",
"==",
"null",
"&&",
"_defset",
"!=",
"null",
")",
"{",
"til... | Returns the base tile at the specified coordinates or null if
there's no tile at said coordinates. | [
"Returns",
"the",
"base",
"tile",
"at",
"the",
"specified",
"coordinates",
"or",
"null",
"if",
"there",
"s",
"no",
"tile",
"at",
"said",
"coordinates",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/SceneBlock.java#L288-L296 |
42,923 | threerings/nenya | core/src/main/java/com/threerings/miso/client/SceneBlock.java | SceneBlock.updateBaseTile | public void updateBaseTile (int fqTileId, int tx, int ty)
{
String errmsg = null;
int tidx = index(tx, ty);
// this is a bit magical: we pass the fully qualified tile id to
// the tile manager which loads up from the configured tileset
// repository the appropriate tileset (... | java | public void updateBaseTile (int fqTileId, int tx, int ty)
{
String errmsg = null;
int tidx = index(tx, ty);
// this is a bit magical: we pass the fully qualified tile id to
// the tile manager which loads up from the configured tileset
// repository the appropriate tileset (... | [
"public",
"void",
"updateBaseTile",
"(",
"int",
"fqTileId",
",",
"int",
"tx",
",",
"int",
"ty",
")",
"{",
"String",
"errmsg",
"=",
"null",
";",
"int",
"tidx",
"=",
"index",
"(",
"tx",
",",
"ty",
")",
";",
"// this is a bit magical: we pass the fully qualifie... | Informs this scene block that the specified base tile has been
changed. | [
"Informs",
"this",
"scene",
"block",
"that",
"the",
"specified",
"base",
"tile",
"has",
"been",
"changed",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/SceneBlock.java#L311-L340 |
42,924 | threerings/nenya | core/src/main/java/com/threerings/miso/client/SceneBlock.java | SceneBlock.updateFringe | public void updateFringe (int tx, int ty)
{
int tidx = index(tx, ty);
if (_base[tidx] != null) {
_fringe[tidx] = computeFringeTile(tx, ty);
}
} | java | public void updateFringe (int tx, int ty)
{
int tidx = index(tx, ty);
if (_base[tidx] != null) {
_fringe[tidx] = computeFringeTile(tx, ty);
}
} | [
"public",
"void",
"updateFringe",
"(",
"int",
"tx",
",",
"int",
"ty",
")",
"{",
"int",
"tidx",
"=",
"index",
"(",
"tx",
",",
"ty",
")",
";",
"if",
"(",
"_base",
"[",
"tidx",
"]",
"!=",
"null",
")",
"{",
"_fringe",
"[",
"tidx",
"]",
"=",
"comput... | Instructs this block to recompute its fringe at the specified
location. | [
"Instructs",
"this",
"block",
"to",
"recompute",
"its",
"fringe",
"at",
"the",
"specified",
"location",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/SceneBlock.java#L346-L352 |
42,925 | threerings/nenya | core/src/main/java/com/threerings/miso/client/SceneBlock.java | SceneBlock.computeMemoryUsage | public void computeMemoryUsage (Map<Tile.Key,BaseTile> bases, Set<BaseTile> fringes,
Map<Tile.Key,ObjectTile> objects, long[] usage)
{
// account for our base tiles
for (int yy = 0; yy < _bounds.height; yy++) {
for (int xx = 0; xx < _bounds.width; xx++... | java | public void computeMemoryUsage (Map<Tile.Key,BaseTile> bases, Set<BaseTile> fringes,
Map<Tile.Key,ObjectTile> objects, long[] usage)
{
// account for our base tiles
for (int yy = 0; yy < _bounds.height; yy++) {
for (int xx = 0; xx < _bounds.width; xx++... | [
"public",
"void",
"computeMemoryUsage",
"(",
"Map",
"<",
"Tile",
".",
"Key",
",",
"BaseTile",
">",
"bases",
",",
"Set",
"<",
"BaseTile",
">",
"fringes",
",",
"Map",
"<",
"Tile",
".",
"Key",
",",
"ObjectTile",
">",
"objects",
",",
"long",
"[",
"]",
"u... | Computes the memory usage of the base and object tiles in this
scene block; registering counted tiles in the hash map so that
other blocks can be sure not to double count them. Base tile usage
is placed into the zeroth array element, fringe tile usage into the
first and object tile usage into the second. | [
"Computes",
"the",
"memory",
"usage",
"of",
"the",
"base",
"and",
"object",
"tiles",
"in",
"this",
"scene",
"block",
";",
"registering",
"counted",
"tiles",
"in",
"the",
"hash",
"map",
"so",
"that",
"other",
"blocks",
"can",
"be",
"sure",
"not",
"to",
"d... | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/SceneBlock.java#L435-L483 |
42,926 | threerings/nenya | core/src/main/java/com/threerings/miso/client/SceneBlock.java | SceneBlock.index | protected final int index (int tx, int ty)
{
// if (!_bounds.contains(tx, ty)) {
// String errmsg = "Coordinates out of bounds: +" + tx + "+" + ty +
// " not in " + StringUtil.toString(_bounds);
// throw new IllegalArgumentException(errmsg);
// }
retur... | java | protected final int index (int tx, int ty)
{
// if (!_bounds.contains(tx, ty)) {
// String errmsg = "Coordinates out of bounds: +" + tx + "+" + ty +
// " not in " + StringUtil.toString(_bounds);
// throw new IllegalArgumentException(errmsg);
// }
retur... | [
"protected",
"final",
"int",
"index",
"(",
"int",
"tx",
",",
"int",
"ty",
")",
"{",
"// if (!_bounds.contains(tx, ty)) {",
"// String errmsg = \"Coordinates out of bounds: +\" + tx + \"+\" + ty +",
"// \" not in \" + StringUtil.toString(_bounds);",
"... | Returns the index into our arrays of the specified tile. | [
"Returns",
"the",
"index",
"into",
"our",
"arrays",
"of",
"the",
"specified",
"tile",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/SceneBlock.java#L499-L507 |
42,927 | threerings/nenya | core/src/main/java/com/threerings/miso/client/SceneBlock.java | SceneBlock.update | protected void update (Map<Integer, SceneBlock> blocks)
{
boolean recover = false;
// link up to our neighbors
for (int ii = 0; ii < DX.length; ii++) {
SceneBlock neigh = blocks.get(neighborKey(DX[ii], DY[ii]));
if (neigh != _neighbors[ii]) {
_neighbo... | java | protected void update (Map<Integer, SceneBlock> blocks)
{
boolean recover = false;
// link up to our neighbors
for (int ii = 0; ii < DX.length; ii++) {
SceneBlock neigh = blocks.get(neighborKey(DX[ii], DY[ii]));
if (neigh != _neighbors[ii]) {
_neighbo... | [
"protected",
"void",
"update",
"(",
"Map",
"<",
"Integer",
",",
"SceneBlock",
">",
"blocks",
")",
"{",
"boolean",
"recover",
"=",
"false",
";",
"// link up to our neighbors",
"for",
"(",
"int",
"ii",
"=",
"0",
";",
"ii",
"<",
"DX",
".",
"length",
";",
... | Links this block to its neighbors; informs neighboring blocks of
object coverage. | [
"Links",
"this",
"block",
"to",
"its",
"neighbors",
";",
"informs",
"neighboring",
"blocks",
"of",
"object",
"coverage",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/SceneBlock.java#L513-L536 |
42,928 | threerings/nenya | core/src/main/java/com/threerings/miso/client/SceneBlock.java | SceneBlock.neighborKey | protected final int neighborKey (int dx, int dy)
{
int nx = MathUtil.floorDiv(_bounds.x, _bounds.width)+dx;
int ny = MathUtil.floorDiv(_bounds.y, _bounds.height)+dy;
return MisoScenePanel.compose(nx, ny);
} | java | protected final int neighborKey (int dx, int dy)
{
int nx = MathUtil.floorDiv(_bounds.x, _bounds.width)+dx;
int ny = MathUtil.floorDiv(_bounds.y, _bounds.height)+dy;
return MisoScenePanel.compose(nx, ny);
} | [
"protected",
"final",
"int",
"neighborKey",
"(",
"int",
"dx",
",",
"int",
"dy",
")",
"{",
"int",
"nx",
"=",
"MathUtil",
".",
"floorDiv",
"(",
"_bounds",
".",
"x",
",",
"_bounds",
".",
"width",
")",
"+",
"dx",
";",
"int",
"ny",
"=",
"MathUtil",
".",... | Computes the key of our neighbor. | [
"Computes",
"the",
"key",
"of",
"our",
"neighbor",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/SceneBlock.java#L539-L544 |
42,929 | threerings/nenya | core/src/main/java/com/threerings/miso/client/SceneBlock.java | SceneBlock.blockKey | protected final int blockKey (int tx, int ty)
{
int bx = MathUtil.floorDiv(tx, _bounds.width);
int by = MathUtil.floorDiv(ty, _bounds.height);
return MisoScenePanel.compose(bx, by);
} | java | protected final int blockKey (int tx, int ty)
{
int bx = MathUtil.floorDiv(tx, _bounds.width);
int by = MathUtil.floorDiv(ty, _bounds.height);
return MisoScenePanel.compose(bx, by);
} | [
"protected",
"final",
"int",
"blockKey",
"(",
"int",
"tx",
",",
"int",
"ty",
")",
"{",
"int",
"bx",
"=",
"MathUtil",
".",
"floorDiv",
"(",
"tx",
",",
"_bounds",
".",
"width",
")",
";",
"int",
"by",
"=",
"MathUtil",
".",
"floorDiv",
"(",
"ty",
",",
... | Computes the key for the block that holds the specified tile. | [
"Computes",
"the",
"key",
"for",
"the",
"block",
"that",
"holds",
"the",
"specified",
"tile",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/SceneBlock.java#L547-L552 |
42,930 | threerings/nenya | core/src/main/java/com/threerings/miso/client/SceneBlock.java | SceneBlock.setCovered | protected void setCovered (Map<Integer, SceneBlock> blocks, SceneObject scobj)
{
int endx = scobj.info.x - scobj.tile.getBaseWidth() + 1;
int endy = scobj.info.y - scobj.tile.getBaseHeight() + 1;
for (int xx = scobj.info.x; xx >= endx; xx--) {
for (int yy = scobj.info.y; yy >= e... | java | protected void setCovered (Map<Integer, SceneBlock> blocks, SceneObject scobj)
{
int endx = scobj.info.x - scobj.tile.getBaseWidth() + 1;
int endy = scobj.info.y - scobj.tile.getBaseHeight() + 1;
for (int xx = scobj.info.x; xx >= endx; xx--) {
for (int yy = scobj.info.y; yy >= e... | [
"protected",
"void",
"setCovered",
"(",
"Map",
"<",
"Integer",
",",
"SceneBlock",
">",
"blocks",
",",
"SceneObject",
"scobj",
")",
"{",
"int",
"endx",
"=",
"scobj",
".",
"info",
".",
"x",
"-",
"scobj",
".",
"tile",
".",
"getBaseWidth",
"(",
")",
"+",
... | Sets the footprint of this object tile | [
"Sets",
"the",
"footprint",
"of",
"this",
"object",
"tile"
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/SceneBlock.java#L557-L572 |
42,931 | groupon/robo-remote | RoboRemoteClient/src/main/com/groupon/roboremote/roboremoteclient/Solo.java | Solo.clearEditText | public static void clearEditText(String editText) throws Exception{
Client.getInstance().map(Constants.ROBOTIUM_SOLO, "clearEditText", editText);
} | java | public static void clearEditText(String editText) throws Exception{
Client.getInstance().map(Constants.ROBOTIUM_SOLO, "clearEditText", editText);
} | [
"public",
"static",
"void",
"clearEditText",
"(",
"String",
"editText",
")",
"throws",
"Exception",
"{",
"Client",
".",
"getInstance",
"(",
")",
".",
"map",
"(",
"Constants",
".",
"ROBOTIUM_SOLO",
",",
"\"clearEditText\"",
",",
"editText",
")",
";",
"}"
] | Clears edit text for the specified widget
@param editText - Identifier for the correct widget(ex: android.widget.EditText@409af0b0) - Can be found using getViews | [
"Clears",
"edit",
"text",
"for",
"the",
"specified",
"widget"
] | 12d242faad50bf90f98657ca9a0c0c3ae1993f07 | https://github.com/groupon/robo-remote/blob/12d242faad50bf90f98657ca9a0c0c3ae1993f07/RoboRemoteClient/src/main/com/groupon/roboremote/roboremoteclient/Solo.java#L59-L61 |
42,932 | groupon/robo-remote | RoboRemoteClient/src/main/com/groupon/roboremote/roboremoteclient/Solo.java | Solo.getLocationOnScreen | public static int[] getLocationOnScreen(String view) throws Exception {
int[] location = new int[2];
JSONArray results = Client.getInstance().map(Constants.ROBOTIUM_SOLO, "getLocationOnScreen", view);
location[0] = results.getInt(0);
location[1] = results.getInt(1);
ret... | java | public static int[] getLocationOnScreen(String view) throws Exception {
int[] location = new int[2];
JSONArray results = Client.getInstance().map(Constants.ROBOTIUM_SOLO, "getLocationOnScreen", view);
location[0] = results.getInt(0);
location[1] = results.getInt(1);
ret... | [
"public",
"static",
"int",
"[",
"]",
"getLocationOnScreen",
"(",
"String",
"view",
")",
"throws",
"Exception",
"{",
"int",
"[",
"]",
"location",
"=",
"new",
"int",
"[",
"2",
"]",
";",
"JSONArray",
"results",
"=",
"Client",
".",
"getInstance",
"(",
")",
... | Get the location of a view on the screen
@param view - string reference to the view
@return - int array(x, y) of the view location
@throws Exception | [
"Get",
"the",
"location",
"of",
"a",
"view",
"on",
"the",
"screen"
] | 12d242faad50bf90f98657ca9a0c0c3ae1993f07 | https://github.com/groupon/robo-remote/blob/12d242faad50bf90f98657ca9a0c0c3ae1993f07/RoboRemoteClient/src/main/com/groupon/roboremote/roboremoteclient/Solo.java#L813-L821 |
42,933 | threerings/nenya | core/src/main/java/com/threerings/miso/client/TileOpApplicator.java | TileOpApplicator.applyToTiles | public void applyToTiles (Rectangle region, TileOp op)
{
// determine which tiles intersect this region: this is going to
// be nearly incomprehensible without some sort of diagram; i'll
// do what i can to comment it, but you'll want to print out a
// scene diagram (docs/miso/scene.... | java | public void applyToTiles (Rectangle region, TileOp op)
{
// determine which tiles intersect this region: this is going to
// be nearly incomprehensible without some sort of diagram; i'll
// do what i can to comment it, but you'll want to print out a
// scene diagram (docs/miso/scene.... | [
"public",
"void",
"applyToTiles",
"(",
"Rectangle",
"region",
",",
"TileOp",
"op",
")",
"{",
"// determine which tiles intersect this region: this is going to",
"// be nearly incomprehensible without some sort of diagram; i'll",
"// do what i can to comment it, but you'll want to print out... | Applies the supplied tile operation to all tiles that intersect the supplied screen
rectangle. | [
"Applies",
"the",
"supplied",
"tile",
"operation",
"to",
"all",
"tiles",
"that",
"intersect",
"the",
"supplied",
"screen",
"rectangle",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/TileOpApplicator.java#L44-L123 |
42,934 | jboss/jboss-jsp-api_spec | src/main/java/javax/servlet/jsp/tagext/TagSupport.java | TagSupport.findAncestorWithClass | public static final Tag findAncestorWithClass(Tag from, Class klass) {
boolean isInterface = false;
if (from == null ||
klass == null ||
(!Tag.class.isAssignableFrom(klass) &&
!(isInterface = klass.isInterface()))) {
return null;
}
for (;;) {
Tag tag = from.getParent();
if (tag == ... | java | public static final Tag findAncestorWithClass(Tag from, Class klass) {
boolean isInterface = false;
if (from == null ||
klass == null ||
(!Tag.class.isAssignableFrom(klass) &&
!(isInterface = klass.isInterface()))) {
return null;
}
for (;;) {
Tag tag = from.getParent();
if (tag == ... | [
"public",
"static",
"final",
"Tag",
"findAncestorWithClass",
"(",
"Tag",
"from",
",",
"Class",
"klass",
")",
"{",
"boolean",
"isInterface",
"=",
"false",
";",
"if",
"(",
"from",
"==",
"null",
"||",
"klass",
"==",
"null",
"||",
"(",
"!",
"Tag",
".",
"cl... | Find the instance of a given class type that is closest to a given
instance.
This method uses the getParent method from the Tag
interface.
This method is used for coordination among cooperating tags.
<p>
The current version of the specification only provides one formal
way of indicating the observable type of a tag ha... | [
"Find",
"the",
"instance",
"of",
"a",
"given",
"class",
"type",
"that",
"is",
"closest",
"to",
"a",
"given",
"instance",
".",
"This",
"method",
"uses",
"the",
"getParent",
"method",
"from",
"the",
"Tag",
"interface",
".",
"This",
"method",
"is",
"used",
... | da53166619f33a5134dc3315a3264990cc1f541f | https://github.com/jboss/jboss-jsp-api_spec/blob/da53166619f33a5134dc3315a3264990cc1f541f/src/main/java/javax/servlet/jsp/tagext/TagSupport.java#L113-L136 |
42,935 | jboss/jboss-jsp-api_spec | src/main/java/javax/servlet/jsp/tagext/TagSupport.java | TagSupport.release | public void release() {
parent = null;
id = null;
if( values != null ) {
values.clear();
}
values = null;
} | java | public void release() {
parent = null;
id = null;
if( values != null ) {
values.clear();
}
values = null;
} | [
"public",
"void",
"release",
"(",
")",
"{",
"parent",
"=",
"null",
";",
"id",
"=",
"null",
";",
"if",
"(",
"values",
"!=",
"null",
")",
"{",
"values",
".",
"clear",
"(",
")",
";",
"}",
"values",
"=",
"null",
";",
"}"
] | Release state.
@see Tag#release() | [
"Release",
"state",
"."
] | da53166619f33a5134dc3315a3264990cc1f541f | https://github.com/jboss/jboss-jsp-api_spec/blob/da53166619f33a5134dc3315a3264990cc1f541f/src/main/java/javax/servlet/jsp/tagext/TagSupport.java#L198-L205 |
42,936 | jboss/jboss-jsp-api_spec | src/main/java/javax/servlet/jsp/tagext/TagSupport.java | TagSupport.setValue | public void setValue(String k, Object o) {
if (values == null) {
values = new Hashtable<String, Object>();
}
values.put(k, o);
} | java | public void setValue(String k, Object o) {
if (values == null) {
values = new Hashtable<String, Object>();
}
values.put(k, o);
} | [
"public",
"void",
"setValue",
"(",
"String",
"k",
",",
"Object",
"o",
")",
"{",
"if",
"(",
"values",
"==",
"null",
")",
"{",
"values",
"=",
"new",
"Hashtable",
"<",
"String",
",",
"Object",
">",
"(",
")",
";",
"}",
"values",
".",
"put",
"(",
"k",... | Associate a value with a String key.
@param k The key String.
@param o The value to associate. | [
"Associate",
"a",
"value",
"with",
"a",
"String",
"key",
"."
] | da53166619f33a5134dc3315a3264990cc1f541f | https://github.com/jboss/jboss-jsp-api_spec/blob/da53166619f33a5134dc3315a3264990cc1f541f/src/main/java/javax/servlet/jsp/tagext/TagSupport.java#L267-L272 |
42,937 | jboss/jboss-jsp-api_spec | src/main/java/javax/servlet/jsp/tagext/TagSupport.java | TagSupport.getValue | public Object getValue(String k) {
if (values == null) {
return null;
} else {
return values.get(k);
}
} | java | public Object getValue(String k) {
if (values == null) {
return null;
} else {
return values.get(k);
}
} | [
"public",
"Object",
"getValue",
"(",
"String",
"k",
")",
"{",
"if",
"(",
"values",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"return",
"values",
".",
"get",
"(",
"k",
")",
";",
"}",
"}"
] | Get a the value associated with a key.
@param k The string key.
@return The value associated with the key, or null. | [
"Get",
"a",
"the",
"value",
"associated",
"with",
"a",
"key",
"."
] | da53166619f33a5134dc3315a3264990cc1f541f | https://github.com/jboss/jboss-jsp-api_spec/blob/da53166619f33a5134dc3315a3264990cc1f541f/src/main/java/javax/servlet/jsp/tagext/TagSupport.java#L281-L287 |
42,938 | threerings/nenya | core/src/main/java/com/threerings/miso/util/MisoUtil.java | MisoUtil.getDirection | public static int getDirection (
MisoSceneMetrics metrics, int ax, int ay, int bx, int by)
{
Point afpos = new Point(), bfpos = new Point();
// convert screen coordinates to full coordinates to get both
// tile coordinates and fine coordinates
screenToFull(metrics, ax, ay, a... | java | public static int getDirection (
MisoSceneMetrics metrics, int ax, int ay, int bx, int by)
{
Point afpos = new Point(), bfpos = new Point();
// convert screen coordinates to full coordinates to get both
// tile coordinates and fine coordinates
screenToFull(metrics, ax, ay, a... | [
"public",
"static",
"int",
"getDirection",
"(",
"MisoSceneMetrics",
"metrics",
",",
"int",
"ax",
",",
"int",
"ay",
",",
"int",
"bx",
",",
"int",
"by",
")",
"{",
"Point",
"afpos",
"=",
"new",
"Point",
"(",
")",
",",
"bfpos",
"=",
"new",
"Point",
"(",
... | Given two points in screen pixel coordinates, return the
compass direction that point B lies in from point A from an
isometric perspective.
@param ax the x-position of point A.
@param ay the y-position of point A.
@param bx the x-position of point B.
@param by the y-position of point B.
@return the direction specifie... | [
"Given",
"two",
"points",
"in",
"screen",
"pixel",
"coordinates",
"return",
"the",
"compass",
"direction",
"that",
"point",
"B",
"lies",
"in",
"from",
"point",
"A",
"from",
"an",
"isometric",
"perspective",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/util/MisoUtil.java#L51-L89 |
42,939 | threerings/nenya | core/src/main/java/com/threerings/miso/util/MisoUtil.java | MisoUtil.getProjectedIsoDirection | public static int getProjectedIsoDirection (int ax, int ay, int bx, int by)
{
return toIsoDirection(DirectionUtil.getDirection(ax, ay, bx, by));
} | java | public static int getProjectedIsoDirection (int ax, int ay, int bx, int by)
{
return toIsoDirection(DirectionUtil.getDirection(ax, ay, bx, by));
} | [
"public",
"static",
"int",
"getProjectedIsoDirection",
"(",
"int",
"ax",
",",
"int",
"ay",
",",
"int",
"bx",
",",
"int",
"by",
")",
"{",
"return",
"toIsoDirection",
"(",
"DirectionUtil",
".",
"getDirection",
"(",
"ax",
",",
"ay",
",",
"bx",
",",
"by",
... | Given two points in screen coordinates, return the isometrically
projected compass direction that point B lies in from point A.
@param ax the x-position of point A.
@param ay the y-position of point A.
@param bx the x-position of point B.
@param by the y-position of point B.
@return the direction specified as one of ... | [
"Given",
"two",
"points",
"in",
"screen",
"coordinates",
"return",
"the",
"isometrically",
"projected",
"compass",
"direction",
"that",
"point",
"B",
"lies",
"in",
"from",
"point",
"A",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/util/MisoUtil.java#L149-L152 |
42,940 | threerings/nenya | core/src/main/java/com/threerings/miso/util/MisoUtil.java | MisoUtil.screenToTile | public static Point screenToTile (
MisoSceneMetrics metrics, int sx, int sy, Point tpos)
{
// determine the upper-left of the quadrant that contains our point
int zx = (int)Math.floor((float)sx / metrics.tilewid);
int zy = (int)Math.floor((float)sy / metrics.tilehei);
// the... | java | public static Point screenToTile (
MisoSceneMetrics metrics, int sx, int sy, Point tpos)
{
// determine the upper-left of the quadrant that contains our point
int zx = (int)Math.floor((float)sx / metrics.tilewid);
int zy = (int)Math.floor((float)sy / metrics.tilehei);
// the... | [
"public",
"static",
"Point",
"screenToTile",
"(",
"MisoSceneMetrics",
"metrics",
",",
"int",
"sx",
",",
"int",
"sy",
",",
"Point",
"tpos",
")",
"{",
"// determine the upper-left of the quadrant that contains our point",
"int",
"zx",
"=",
"(",
"int",
")",
"Math",
"... | Convert the given screen-based pixel coordinates to their
corresponding tile-based coordinates. Converted coordinates
are placed in the given point object.
@param sx the screen x-position pixel coordinate.
@param sy the screen y-position pixel coordinate.
@param tpos the point object to place coordinates in.
@return... | [
"Convert",
"the",
"given",
"screen",
"-",
"based",
"pixel",
"coordinates",
"to",
"their",
"corresponding",
"tile",
"-",
"based",
"coordinates",
".",
"Converted",
"coordinates",
"are",
"placed",
"in",
"the",
"given",
"point",
"object",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/util/MisoUtil.java#L197-L227 |
42,941 | threerings/nenya | core/src/main/java/com/threerings/miso/util/MisoUtil.java | MisoUtil.tileToScreen | public static Point tileToScreen (
MisoSceneMetrics metrics, int x, int y, Point spos)
{
spos.x = (x - y - 1) * metrics.tilehwid;
spos.y = (x + y) * metrics.tilehhei;
return spos;
} | java | public static Point tileToScreen (
MisoSceneMetrics metrics, int x, int y, Point spos)
{
spos.x = (x - y - 1) * metrics.tilehwid;
spos.y = (x + y) * metrics.tilehhei;
return spos;
} | [
"public",
"static",
"Point",
"tileToScreen",
"(",
"MisoSceneMetrics",
"metrics",
",",
"int",
"x",
",",
"int",
"y",
",",
"Point",
"spos",
")",
"{",
"spos",
".",
"x",
"=",
"(",
"x",
"-",
"y",
"-",
"1",
")",
"*",
"metrics",
".",
"tilehwid",
";",
"spos... | Convert the given tile-based coordinates to their corresponding
screen-based pixel coordinates. The screen coordinate for a tile is
the upper-left coordinate of the rectangle that bounds the tile
polygon. Converted coordinates are placed in the given point
object.
@param x the tile x-position coordinate.
@param y the ... | [
"Convert",
"the",
"given",
"tile",
"-",
"based",
"coordinates",
"to",
"their",
"corresponding",
"screen",
"-",
"based",
"pixel",
"coordinates",
".",
"The",
"screen",
"coordinate",
"for",
"a",
"tile",
"is",
"the",
"upper",
"-",
"left",
"coordinate",
"of",
"th... | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/util/MisoUtil.java#L243-L249 |
42,942 | threerings/nenya | core/src/main/java/com/threerings/miso/util/MisoUtil.java | MisoUtil.fineToPixel | public static void fineToPixel (
MisoSceneMetrics metrics, int x, int y, Point ppos)
{
ppos.x = metrics.tilehwid + ((x - y) * metrics.finehwid);
ppos.y = (x + y) * metrics.finehhei;
} | java | public static void fineToPixel (
MisoSceneMetrics metrics, int x, int y, Point ppos)
{
ppos.x = metrics.tilehwid + ((x - y) * metrics.finehwid);
ppos.y = (x + y) * metrics.finehhei;
} | [
"public",
"static",
"void",
"fineToPixel",
"(",
"MisoSceneMetrics",
"metrics",
",",
"int",
"x",
",",
"int",
"y",
",",
"Point",
"ppos",
")",
"{",
"ppos",
".",
"x",
"=",
"metrics",
".",
"tilehwid",
"+",
"(",
"(",
"x",
"-",
"y",
")",
"*",
"metrics",
"... | Convert the given fine coordinates to pixel coordinates within
the containing tile. Converted coordinates are placed in the
given point object.
@param x the x-position fine coordinate.
@param y the y-position fine coordinate.
@param ppos the point object to place coordinates in. | [
"Convert",
"the",
"given",
"fine",
"coordinates",
"to",
"pixel",
"coordinates",
"within",
"the",
"containing",
"tile",
".",
"Converted",
"coordinates",
"are",
"placed",
"in",
"the",
"given",
"point",
"object",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/util/MisoUtil.java#L260-L265 |
42,943 | threerings/nenya | core/src/main/java/com/threerings/miso/util/MisoUtil.java | MisoUtil.pixelToFine | public static void pixelToFine (
MisoSceneMetrics metrics, int x, int y, Point fpos)
{
// calculate line parallel to the y-axis (from the given
// x/y-pos to the x-axis)
float bY = y - (metrics.fineSlopeY * x);
// determine intersection of x- and y-axis lines
int cro... | java | public static void pixelToFine (
MisoSceneMetrics metrics, int x, int y, Point fpos)
{
// calculate line parallel to the y-axis (from the given
// x/y-pos to the x-axis)
float bY = y - (metrics.fineSlopeY * x);
// determine intersection of x- and y-axis lines
int cro... | [
"public",
"static",
"void",
"pixelToFine",
"(",
"MisoSceneMetrics",
"metrics",
",",
"int",
"x",
",",
"int",
"y",
",",
"Point",
"fpos",
")",
"{",
"// calculate line parallel to the y-axis (from the given",
"// x/y-pos to the x-axis)",
"float",
"bY",
"=",
"y",
"-",
"(... | Convert the given pixel coordinates, whose origin is at the
top-left of a tile's containing rectangle, to fine coordinates
within that tile. Converted coordinates are placed in the
given point object.
@param x the x-position pixel coordinate.
@param y the y-position pixel coordinate.
@param fpos the point object to p... | [
"Convert",
"the",
"given",
"pixel",
"coordinates",
"whose",
"origin",
"is",
"at",
"the",
"top",
"-",
"left",
"of",
"a",
"tile",
"s",
"containing",
"rectangle",
"to",
"fine",
"coordinates",
"within",
"that",
"tile",
".",
"Converted",
"coordinates",
"are",
"pl... | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/util/MisoUtil.java#L277-L303 |
42,944 | threerings/nenya | core/src/main/java/com/threerings/miso/util/MisoUtil.java | MisoUtil.screenToFull | public static Point screenToFull (
MisoSceneMetrics metrics, int sx, int sy, Point fpos)
{
// get the tile coordinates
Point tpos = new Point();
screenToTile(metrics, sx, sy, tpos);
// get the screen coordinates for the containing tile
Point spos = tileToScreen(metri... | java | public static Point screenToFull (
MisoSceneMetrics metrics, int sx, int sy, Point fpos)
{
// get the tile coordinates
Point tpos = new Point();
screenToTile(metrics, sx, sy, tpos);
// get the screen coordinates for the containing tile
Point spos = tileToScreen(metri... | [
"public",
"static",
"Point",
"screenToFull",
"(",
"MisoSceneMetrics",
"metrics",
",",
"int",
"sx",
",",
"int",
"sy",
",",
"Point",
"fpos",
")",
"{",
"// get the tile coordinates",
"Point",
"tpos",
"=",
"new",
"Point",
"(",
")",
";",
"screenToTile",
"(",
"met... | Convert the given screen-based pixel coordinates to full
scene-based coordinates that include both the tile coordinates
and the fine coordinates in each dimension. Converted
coordinates are placed in the given point object.
@param sx the screen x-position pixel coordinate.
@param sy the screen y-position pixel coordi... | [
"Convert",
"the",
"given",
"screen",
"-",
"based",
"pixel",
"coordinates",
"to",
"full",
"scene",
"-",
"based",
"coordinates",
"that",
"include",
"both",
"the",
"tile",
"coordinates",
"and",
"the",
"fine",
"coordinates",
"in",
"each",
"dimension",
".",
"Conver... | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/util/MisoUtil.java#L317-L342 |
42,945 | threerings/nenya | core/src/main/java/com/threerings/miso/util/MisoUtil.java | MisoUtil.fullToScreen | public static Point fullToScreen (
MisoSceneMetrics metrics, int x, int y, Point spos)
{
// get the tile screen position
int tx = fullToTile(x), ty = fullToTile(y);
Point tspos = tileToScreen(metrics, tx, ty, new Point());
// get the pixel position of the fine coords within ... | java | public static Point fullToScreen (
MisoSceneMetrics metrics, int x, int y, Point spos)
{
// get the tile screen position
int tx = fullToTile(x), ty = fullToTile(y);
Point tspos = tileToScreen(metrics, tx, ty, new Point());
// get the pixel position of the fine coords within ... | [
"public",
"static",
"Point",
"fullToScreen",
"(",
"MisoSceneMetrics",
"metrics",
",",
"int",
"x",
",",
"int",
"y",
",",
"Point",
"spos",
")",
"{",
"// get the tile screen position",
"int",
"tx",
"=",
"fullToTile",
"(",
"x",
")",
",",
"ty",
"=",
"fullToTile",... | Convert the given full coordinates to screen-based pixel
coordinates. Converted coordinates are placed in the given
point object.
@param x the x-position full coordinate.
@param y the y-position full coordinate.
@param spos the point object to place coordinates in.
@return the point passed in to receive the coordina... | [
"Convert",
"the",
"given",
"full",
"coordinates",
"to",
"screen",
"-",
"based",
"pixel",
"coordinates",
".",
"Converted",
"coordinates",
"are",
"placed",
"in",
"the",
"given",
"point",
"object",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/util/MisoUtil.java#L355-L372 |
42,946 | threerings/nenya | core/src/main/java/com/threerings/miso/util/MisoUtil.java | MisoUtil.getTilePolygon | public static Polygon getTilePolygon (
MisoSceneMetrics metrics, int x, int y)
{
return getFootprintPolygon(metrics, x, y, 1, 1);
} | java | public static Polygon getTilePolygon (
MisoSceneMetrics metrics, int x, int y)
{
return getFootprintPolygon(metrics, x, y, 1, 1);
} | [
"public",
"static",
"Polygon",
"getTilePolygon",
"(",
"MisoSceneMetrics",
"metrics",
",",
"int",
"x",
",",
"int",
"y",
")",
"{",
"return",
"getFootprintPolygon",
"(",
"metrics",
",",
"x",
",",
"y",
",",
"1",
",",
"1",
")",
";",
"}"
] | Return a polygon framing the specified tile.
@param x the tile x-position coordinate.
@param y the tile y-position coordinate. | [
"Return",
"a",
"polygon",
"framing",
"the",
"specified",
"tile",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/util/MisoUtil.java#L407-L411 |
42,947 | threerings/nenya | core/src/main/java/com/threerings/miso/util/MisoUtil.java | MisoUtil.getMultiTilePolygon | public static Polygon getMultiTilePolygon (MisoSceneMetrics metrics,
Point sp1, Point sp2)
{
int x = Math.min(sp1.x, sp2.x), y = Math.min(sp1.y, sp2.y);
int width = Math.abs(sp1.x-sp2.x)+1, height = Math.abs(sp1.y-sp2.y)+1;
return getFootprintPo... | java | public static Polygon getMultiTilePolygon (MisoSceneMetrics metrics,
Point sp1, Point sp2)
{
int x = Math.min(sp1.x, sp2.x), y = Math.min(sp1.y, sp2.y);
int width = Math.abs(sp1.x-sp2.x)+1, height = Math.abs(sp1.y-sp2.y)+1;
return getFootprintPo... | [
"public",
"static",
"Polygon",
"getMultiTilePolygon",
"(",
"MisoSceneMetrics",
"metrics",
",",
"Point",
"sp1",
",",
"Point",
"sp2",
")",
"{",
"int",
"x",
"=",
"Math",
".",
"min",
"(",
"sp1",
".",
"x",
",",
"sp2",
".",
"x",
")",
",",
"y",
"=",
"Math",... | Return a screen-coordinates polygon framing the two specified
tile-coordinate points. | [
"Return",
"a",
"screen",
"-",
"coordinates",
"polygon",
"framing",
"the",
"two",
"specified",
"tile",
"-",
"coordinate",
"points",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/util/MisoUtil.java#L417-L423 |
42,948 | threerings/nenya | core/src/main/java/com/threerings/miso/util/MisoUtil.java | MisoUtil.getFootprintPolygon | public static Polygon getFootprintPolygon (
MisoSceneMetrics metrics, int x, int y, int width, int height)
{
SmartPolygon footprint = new SmartPolygon();
Point tpos = MisoUtil.tileToScreen(metrics, x, y, new Point());
// start with top-center point
int rx = tpos.x + metrics.... | java | public static Polygon getFootprintPolygon (
MisoSceneMetrics metrics, int x, int y, int width, int height)
{
SmartPolygon footprint = new SmartPolygon();
Point tpos = MisoUtil.tileToScreen(metrics, x, y, new Point());
// start with top-center point
int rx = tpos.x + metrics.... | [
"public",
"static",
"Polygon",
"getFootprintPolygon",
"(",
"MisoSceneMetrics",
"metrics",
",",
"int",
"x",
",",
"int",
"y",
",",
"int",
"width",
",",
"int",
"height",
")",
"{",
"SmartPolygon",
"footprint",
"=",
"new",
"SmartPolygon",
"(",
")",
";",
"Point",
... | Returns a polygon framing the specified scene footprint.
@param x the x tile coordinate of the "upper-left" of the footprint.
@param y the y tile coordinate of the "upper-left" of the footprint.
@param width the width in tiles of the footprint.
@param height the height in tiles of the footprint. | [
"Returns",
"a",
"polygon",
"framing",
"the",
"specified",
"scene",
"footprint",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/util/MisoUtil.java#L433-L460 |
42,949 | threerings/nenya | core/src/main/java/com/threerings/miso/util/MisoUtil.java | MisoUtil.tilePlusFineToFull | public static Point tilePlusFineToFull (MisoSceneMetrics metrics,
int tileX, int tileY,
int fineX, int fineY,
Point full)
{
int dtx = fineX / metrics.finegran;
int dty ... | java | public static Point tilePlusFineToFull (MisoSceneMetrics metrics,
int tileX, int tileY,
int fineX, int fineY,
Point full)
{
int dtx = fineX / metrics.finegran;
int dty ... | [
"public",
"static",
"Point",
"tilePlusFineToFull",
"(",
"MisoSceneMetrics",
"metrics",
",",
"int",
"tileX",
",",
"int",
"tileY",
",",
"int",
"fineX",
",",
"int",
"fineY",
",",
"Point",
"full",
")",
"{",
"int",
"dtx",
"=",
"fineX",
"/",
"metrics",
".",
"f... | Adds the supplied fine coordinates to the supplied tile coordinates
to compute full coordinates.
@return the point object supplied as <code>full</code>. | [
"Adds",
"the",
"supplied",
"fine",
"coordinates",
"to",
"the",
"supplied",
"tile",
"coordinates",
"to",
"compute",
"full",
"coordinates",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/util/MisoUtil.java#L468-L489 |
42,950 | groupon/robo-remote | RoboRemoteClient/src/main/com/groupon/roboremote/roboremoteclient/Client.java | Client.getInstance | public static Client getInstance() {
if(instance == null) {
instance = new Client();
}
instance.API_PORT = PortSingleton.getInstance().getPort();
return instance;
} | java | public static Client getInstance() {
if(instance == null) {
instance = new Client();
}
instance.API_PORT = PortSingleton.getInstance().getPort();
return instance;
} | [
"public",
"static",
"Client",
"getInstance",
"(",
")",
"{",
"if",
"(",
"instance",
"==",
"null",
")",
"{",
"instance",
"=",
"new",
"Client",
"(",
")",
";",
"}",
"instance",
".",
"API_PORT",
"=",
"PortSingleton",
".",
"getInstance",
"(",
")",
".",
"getP... | Gets a client instance on the roboremote port
@return | [
"Gets",
"a",
"client",
"instance",
"on",
"the",
"roboremote",
"port"
] | 12d242faad50bf90f98657ca9a0c0c3ae1993f07 | https://github.com/groupon/robo-remote/blob/12d242faad50bf90f98657ca9a0c0c3ae1993f07/RoboRemoteClient/src/main/com/groupon/roboremote/roboremoteclient/Client.java#L42-L49 |
42,951 | threerings/nenya | core/src/main/java/com/threerings/chat/ComicChatOverlay.java | ComicChatOverlay.clearBubbles | protected void clearBubbles (boolean all)
{
for (Iterator<BubbleGlyph> iter = _bubbles.iterator(); iter.hasNext();) {
ChatGlyph rec = iter.next();
if (all || isPlaceOrientedType(rec.getType())) {
_target.abortAnimation(rec);
iter.remove();
... | java | protected void clearBubbles (boolean all)
{
for (Iterator<BubbleGlyph> iter = _bubbles.iterator(); iter.hasNext();) {
ChatGlyph rec = iter.next();
if (all || isPlaceOrientedType(rec.getType())) {
_target.abortAnimation(rec);
iter.remove();
... | [
"protected",
"void",
"clearBubbles",
"(",
"boolean",
"all",
")",
"{",
"for",
"(",
"Iterator",
"<",
"BubbleGlyph",
">",
"iter",
"=",
"_bubbles",
".",
"iterator",
"(",
")",
";",
"iter",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"ChatGlyph",
"rec",
"=",
... | Clear chat bubbles, either all of them or just the place-oriented ones. | [
"Clear",
"chat",
"bubbles",
"either",
"all",
"of",
"them",
"or",
"just",
"the",
"place",
"-",
"oriented",
"ones",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/chat/ComicChatOverlay.java#L143-L152 |
42,952 | threerings/nenya | core/src/main/java/com/threerings/chat/ComicChatOverlay.java | ComicChatOverlay.splitNear | protected String splitNear (String text, int pos)
{
if (pos >= text.length()) {
return text;
}
int forward = text.indexOf(' ', pos);
int backward = text.lastIndexOf(' ', pos);
int newpos = (Math.abs(pos - forward) < Math.abs(pos - backward)) ? forward : backward... | java | protected String splitNear (String text, int pos)
{
if (pos >= text.length()) {
return text;
}
int forward = text.indexOf(' ', pos);
int backward = text.lastIndexOf(' ', pos);
int newpos = (Math.abs(pos - forward) < Math.abs(pos - backward)) ? forward : backward... | [
"protected",
"String",
"splitNear",
"(",
"String",
"text",
",",
"int",
"pos",
")",
"{",
"if",
"(",
"pos",
">=",
"text",
".",
"length",
"(",
")",
")",
"{",
"return",
"text",
";",
"}",
"int",
"forward",
"=",
"text",
".",
"indexOf",
"(",
"'",
"'",
"... | Split the text at the space nearest the specified location. | [
"Split",
"the",
"text",
"at",
"the",
"space",
"nearest",
"the",
"specified",
"location",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/chat/ComicChatOverlay.java#L242-L262 |
42,953 | threerings/nenya | core/src/main/java/com/threerings/chat/ComicChatOverlay.java | ComicChatOverlay.adjustLabel | protected Point adjustLabel (int type, Point labelpos)
{
switch (ChatLogic.modeOf(type)) {
case ChatLogic.SHOUT:
case ChatLogic.EMOTE:
case ChatLogic.THINK:
labelpos.translate(PAD * 2, PAD * 2);
break;
default:
labelpos.translate(PAD, PAD)... | java | protected Point adjustLabel (int type, Point labelpos)
{
switch (ChatLogic.modeOf(type)) {
case ChatLogic.SHOUT:
case ChatLogic.EMOTE:
case ChatLogic.THINK:
labelpos.translate(PAD * 2, PAD * 2);
break;
default:
labelpos.translate(PAD, PAD)... | [
"protected",
"Point",
"adjustLabel",
"(",
"int",
"type",
",",
"Point",
"labelpos",
")",
"{",
"switch",
"(",
"ChatLogic",
".",
"modeOf",
"(",
"type",
")",
")",
"{",
"case",
"ChatLogic",
".",
"SHOUT",
":",
"case",
"ChatLogic",
".",
"EMOTE",
":",
"case",
... | Position the label based on the type. | [
"Position",
"the",
"label",
"based",
"on",
"the",
"type",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/chat/ComicChatOverlay.java#L385-L400 |
42,954 | threerings/nenya | core/src/main/java/com/threerings/chat/ComicChatOverlay.java | ComicChatOverlay.getRectWithOlds | protected Rectangle getRectWithOlds (Rectangle r, List<BubbleGlyph> oldbubs)
{
int n = oldbubs.size();
// if no old bubs, just return the new one.
if (n == 0) {
return r;
}
// otherwise, encompass all the oldies
Rectangle bigR = null;
for (int ii=... | java | protected Rectangle getRectWithOlds (Rectangle r, List<BubbleGlyph> oldbubs)
{
int n = oldbubs.size();
// if no old bubs, just return the new one.
if (n == 0) {
return r;
}
// otherwise, encompass all the oldies
Rectangle bigR = null;
for (int ii=... | [
"protected",
"Rectangle",
"getRectWithOlds",
"(",
"Rectangle",
"r",
",",
"List",
"<",
"BubbleGlyph",
">",
"oldbubs",
")",
"{",
"int",
"n",
"=",
"oldbubs",
".",
"size",
"(",
")",
";",
"// if no old bubs, just return the new one.",
"if",
"(",
"n",
"==",
"0",
"... | Get a rectangle based on the old bubbles, but with room for the new one. | [
"Get",
"a",
"rectangle",
"based",
"on",
"the",
"old",
"bubbles",
"but",
"with",
"room",
"for",
"the",
"new",
"one",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/chat/ComicChatOverlay.java#L439-L463 |
42,955 | threerings/nenya | core/src/main/java/com/threerings/chat/ComicChatOverlay.java | ComicChatOverlay.getTail | protected Shape getTail (int type, Rectangle r, Point speaker)
{
// emotes don't actually have tails
if (ChatLogic.modeOf(type) == ChatLogic.EMOTE) {
return new Area(); // empty shape
}
int midx = r.x + (r.width / 2);
int midy = r.y + (r.height / 2);
// ... | java | protected Shape getTail (int type, Rectangle r, Point speaker)
{
// emotes don't actually have tails
if (ChatLogic.modeOf(type) == ChatLogic.EMOTE) {
return new Area(); // empty shape
}
int midx = r.x + (r.width / 2);
int midy = r.y + (r.height / 2);
// ... | [
"protected",
"Shape",
"getTail",
"(",
"int",
"type",
",",
"Rectangle",
"r",
",",
"Point",
"speaker",
")",
"{",
"// emotes don't actually have tails",
"if",
"(",
"ChatLogic",
".",
"modeOf",
"(",
"type",
")",
"==",
"ChatLogic",
".",
"EMOTE",
")",
"{",
"return"... | Create a tail to the specified rectangular area from the speaker point. | [
"Create",
"a",
"tail",
"to",
"the",
"specified",
"rectangular",
"area",
"from",
"the",
"speaker",
"point",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/chat/ComicChatOverlay.java#L625-L684 |
42,956 | threerings/nenya | core/src/main/java/com/threerings/chat/ComicChatOverlay.java | ComicChatOverlay.getAndExpireBubbles | protected List<BubbleGlyph> getAndExpireBubbles (Name speaker)
{
int num = _bubbles.size();
// first, get all the old bubbles belonging to the user
List<BubbleGlyph> oldbubs = Lists.newArrayList();
if (speaker != null) {
for (int ii=0; ii < num; ii++) {
B... | java | protected List<BubbleGlyph> getAndExpireBubbles (Name speaker)
{
int num = _bubbles.size();
// first, get all the old bubbles belonging to the user
List<BubbleGlyph> oldbubs = Lists.newArrayList();
if (speaker != null) {
for (int ii=0; ii < num; ii++) {
B... | [
"protected",
"List",
"<",
"BubbleGlyph",
">",
"getAndExpireBubbles",
"(",
"Name",
"speaker",
")",
"{",
"int",
"num",
"=",
"_bubbles",
".",
"size",
"(",
")",
";",
"// first, get all the old bubbles belonging to the user",
"List",
"<",
"BubbleGlyph",
">",
"oldbubs",
... | Expire a bubble, if necessary, and return the old bubbles for the specified speaker. | [
"Expire",
"a",
"bubble",
"if",
"necessary",
"and",
"return",
"the",
"old",
"bubbles",
"for",
"the",
"specified",
"speaker",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/chat/ComicChatOverlay.java#L689-L717 |
42,957 | threerings/nenya | core/src/main/java/com/threerings/chat/ComicChatOverlay.java | ComicChatOverlay.layoutText | protected Label layoutText (Graphics2D gfx, Font font, String text)
{
Label label = _logic.createLabel(text);
label.setFont(font);
// layout in one line
Rectangle vbounds = _target.getViewBounds();
label.setTargetWidth(vbounds.width - PAD * 2);
label.layout(gfx);
... | java | protected Label layoutText (Graphics2D gfx, Font font, String text)
{
Label label = _logic.createLabel(text);
label.setFont(font);
// layout in one line
Rectangle vbounds = _target.getViewBounds();
label.setTargetWidth(vbounds.width - PAD * 2);
label.layout(gfx);
... | [
"protected",
"Label",
"layoutText",
"(",
"Graphics2D",
"gfx",
",",
"Font",
"font",
",",
"String",
"text",
")",
"{",
"Label",
"label",
"=",
"_logic",
".",
"createLabel",
"(",
"text",
")",
";",
"label",
".",
"setFont",
"(",
"font",
")",
";",
"// layout in ... | Get a label formatted as close to the golden ratio as possible for the specified text and
given the standard padding we use on all bubbles. | [
"Get",
"a",
"label",
"formatted",
"as",
"close",
"to",
"the",
"golden",
"ratio",
"as",
"possible",
"for",
"the",
"specified",
"text",
"and",
"given",
"the",
"standard",
"padding",
"we",
"use",
"on",
"all",
"bubbles",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/chat/ComicChatOverlay.java#L730-L751 |
42,958 | threerings/nenya | core/src/main/java/com/threerings/chat/ComicChatOverlay.java | ComicChatOverlay.getAvoidList | protected List<Shape> getAvoidList (Name speaker)
{
List<Shape> avoid = Lists.newArrayList();
if (_provider == null) {
return avoid;
}
// for now we don't accept low-priority avoids
_provider.getAvoidables(speaker, avoid, null);
// add the existing chatb... | java | protected List<Shape> getAvoidList (Name speaker)
{
List<Shape> avoid = Lists.newArrayList();
if (_provider == null) {
return avoid;
}
// for now we don't accept low-priority avoids
_provider.getAvoidables(speaker, avoid, null);
// add the existing chatb... | [
"protected",
"List",
"<",
"Shape",
">",
"getAvoidList",
"(",
"Name",
"speaker",
")",
"{",
"List",
"<",
"Shape",
">",
"avoid",
"=",
"Lists",
".",
"newArrayList",
"(",
")",
";",
"if",
"(",
"_provider",
"==",
"null",
")",
"{",
"return",
"avoid",
";",
"}... | Return a list of rectangular areas that we should avoid while laying out a bubble for the
specified speaker. | [
"Return",
"a",
"list",
"of",
"rectangular",
"areas",
"that",
"we",
"should",
"avoid",
"while",
"laying",
"out",
"a",
"bubble",
"for",
"the",
"specified",
"speaker",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/chat/ComicChatOverlay.java#L781-L799 |
42,959 | threerings/nenya | core/src/main/java/com/threerings/openal/FileStream.java | FileStream.queueFile | public void queueFile (File file, boolean loop)
{
try {
queueURL(file.toURI().toURL(), loop);
} catch (MalformedURLException e) {
log.warning("Invalid file url.", "file", file, e);
}
} | java | public void queueFile (File file, boolean loop)
{
try {
queueURL(file.toURI().toURL(), loop);
} catch (MalformedURLException e) {
log.warning("Invalid file url.", "file", file, e);
}
} | [
"public",
"void",
"queueFile",
"(",
"File",
"file",
",",
"boolean",
"loop",
")",
"{",
"try",
"{",
"queueURL",
"(",
"file",
".",
"toURI",
"(",
")",
".",
"toURL",
"(",
")",
",",
"loop",
")",
";",
"}",
"catch",
"(",
"MalformedURLException",
"e",
")",
... | Adds a file to the queue of files to play.
@param loop if true, play this file in a loop if there's nothing else
on the queue | [
"Adds",
"a",
"file",
"to",
"the",
"queue",
"of",
"files",
"to",
"play",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/openal/FileStream.java#L52-L59 |
42,960 | threerings/nenya | core/src/main/java/com/threerings/cast/CharacterManager.java | CharacterManager.getActionFrames | public ActionFrames getActionFrames (
CharacterDescriptor descrip, String action)
throws NoSuchComponentException
{
Tuple<CharacterDescriptor, String> key = new Tuple<CharacterDescriptor, String>(descrip, action);
ActionFrames frames = _actionFrames.get(key);
if (frames == nu... | java | public ActionFrames getActionFrames (
CharacterDescriptor descrip, String action)
throws NoSuchComponentException
{
Tuple<CharacterDescriptor, String> key = new Tuple<CharacterDescriptor, String>(descrip, action);
ActionFrames frames = _actionFrames.get(key);
if (frames == nu... | [
"public",
"ActionFrames",
"getActionFrames",
"(",
"CharacterDescriptor",
"descrip",
",",
"String",
"action",
")",
"throws",
"NoSuchComponentException",
"{",
"Tuple",
"<",
"CharacterDescriptor",
",",
"String",
">",
"key",
"=",
"new",
"Tuple",
"<",
"CharacterDescriptor"... | Obtains the composited animation frames for the specified action for a
character with the specified descriptor. The resulting composited
animation will be cached.
@exception NoSuchComponentException thrown if any of the components in
the supplied descriptor do not exist.
@exception IllegalArgumentException thrown if a... | [
"Obtains",
"the",
"composited",
"animation",
"frames",
"for",
"the",
"specified",
"action",
"for",
"a",
"character",
"with",
"the",
"specified",
"descriptor",
".",
"The",
"resulting",
"composited",
"animation",
"will",
"be",
"cached",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/cast/CharacterManager.java#L169-L192 |
42,961 | threerings/nenya | core/src/main/java/com/threerings/cast/CharacterManager.java | CharacterManager.resolveActionSequence | public void resolveActionSequence (CharacterDescriptor desc, String action)
{
try {
if (getActionFrames(desc, action) == null) {
log.warning("Failed to resolve action sequence " +
"[desc=" + desc + ", action=" + action + "].");
}
}... | java | public void resolveActionSequence (CharacterDescriptor desc, String action)
{
try {
if (getActionFrames(desc, action) == null) {
log.warning("Failed to resolve action sequence " +
"[desc=" + desc + ", action=" + action + "].");
}
}... | [
"public",
"void",
"resolveActionSequence",
"(",
"CharacterDescriptor",
"desc",
",",
"String",
"action",
")",
"{",
"try",
"{",
"if",
"(",
"getActionFrames",
"(",
"desc",
",",
"action",
")",
"==",
"null",
")",
"{",
"log",
".",
"warning",
"(",
"\"Failed to reso... | Informs the character manager that the action sequence for the
given character descriptor is likely to be needed in the near
future and so any efforts that can be made to load it into the
action sequence cache in advance should be undertaken.
<p> This will eventually be revamped to spiffily load action
sequences in th... | [
"Informs",
"the",
"character",
"manager",
"that",
"the",
"action",
"sequence",
"for",
"the",
"given",
"character",
"descriptor",
"is",
"likely",
"to",
"be",
"needed",
"in",
"the",
"near",
"future",
"and",
"so",
"any",
"efforts",
"that",
"can",
"be",
"made",
... | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/cast/CharacterManager.java#L203-L215 |
42,962 | threerings/nenya | core/src/main/java/com/threerings/cast/CharacterManager.java | CharacterManager.getEstimatedCacheMemoryUsage | protected long getEstimatedCacheMemoryUsage ()
{
long size = 0;
Iterator<CompositedMultiFrameImage> iter = _frameCache.values().iterator();
while (iter.hasNext()) {
size += iter.next().getEstimatedMemoryUsage();
}
return size;
} | java | protected long getEstimatedCacheMemoryUsage ()
{
long size = 0;
Iterator<CompositedMultiFrameImage> iter = _frameCache.values().iterator();
while (iter.hasNext()) {
size += iter.next().getEstimatedMemoryUsage();
}
return size;
} | [
"protected",
"long",
"getEstimatedCacheMemoryUsage",
"(",
")",
"{",
"long",
"size",
"=",
"0",
";",
"Iterator",
"<",
"CompositedMultiFrameImage",
">",
"iter",
"=",
"_frameCache",
".",
"values",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"iter",
... | Returns the estimated memory usage in bytes for all images
currently cached by the cached action frames. | [
"Returns",
"the",
"estimated",
"memory",
"usage",
"in",
"bytes",
"for",
"all",
"images",
"currently",
"cached",
"by",
"the",
"cached",
"action",
"frames",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/cast/CharacterManager.java#L230-L238 |
42,963 | kaazing/java.client | ws/ws/src/main/java/org/kaazing/gateway/client/impl/bridge/WebSocketNativeBridgeHandler.java | WebSocketNativeBridgeHandler.processAuthorize | @Override
public void processAuthorize(WebSocketChannel channel, String authorizeToken) {
LOG.entering(CLASS_NAME, "processAuthorize");
WebSocketNativeChannel nativeChannel = (WebSocketNativeChannel)channel;
Proxy proxy = nativeChannel.getProxy();
proxy.processEvent(XoaEventKind.AUT... | java | @Override
public void processAuthorize(WebSocketChannel channel, String authorizeToken) {
LOG.entering(CLASS_NAME, "processAuthorize");
WebSocketNativeChannel nativeChannel = (WebSocketNativeChannel)channel;
Proxy proxy = nativeChannel.getProxy();
proxy.processEvent(XoaEventKind.AUT... | [
"@",
"Override",
"public",
"void",
"processAuthorize",
"(",
"WebSocketChannel",
"channel",
",",
"String",
"authorizeToken",
")",
"{",
"LOG",
".",
"entering",
"(",
"CLASS_NAME",
",",
"\"processAuthorize\"",
")",
";",
"WebSocketNativeChannel",
"nativeChannel",
"=",
"(... | Set the authorize token for future requests for "Basic" authentication. | [
"Set",
"the",
"authorize",
"token",
"for",
"future",
"requests",
"for",
"Basic",
"authentication",
"."
] | 25ad2ae5bb24aa9d6b79400fce649b518dcfbe26 | https://github.com/kaazing/java.client/blob/25ad2ae5bb24aa9d6b79400fce649b518dcfbe26/ws/ws/src/main/java/org/kaazing/gateway/client/impl/bridge/WebSocketNativeBridgeHandler.java#L95-L102 |
42,964 | kaazing/java.client | ws/ws/src/main/java/org/kaazing/gateway/client/util/HexUtil.java | HexUtil.byteArrayToInt | public static int byteArrayToInt(byte[] b, int offset) {
int value = 0;
for (int i = 0; i < 4; i++) {
int shift = (4 - 1 - i) * 8;
value += (b[i + offset] & 0x000000FF) << shift;
}
return value;
} | java | public static int byteArrayToInt(byte[] b, int offset) {
int value = 0;
for (int i = 0; i < 4; i++) {
int shift = (4 - 1 - i) * 8;
value += (b[i + offset] & 0x000000FF) << shift;
}
return value;
} | [
"public",
"static",
"int",
"byteArrayToInt",
"(",
"byte",
"[",
"]",
"b",
",",
"int",
"offset",
")",
"{",
"int",
"value",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"4",
";",
"i",
"++",
")",
"{",
"int",
"shift",
"=",
"(",
... | Convert the byte array to an int starting from the given offset.
@param b The byte array
@param offset The array offset
@return The integer | [
"Convert",
"the",
"byte",
"array",
"to",
"an",
"int",
"starting",
"from",
"the",
"given",
"offset",
"."
] | 25ad2ae5bb24aa9d6b79400fce649b518dcfbe26 | https://github.com/kaazing/java.client/blob/25ad2ae5bb24aa9d6b79400fce649b518dcfbe26/ws/ws/src/main/java/org/kaazing/gateway/client/util/HexUtil.java#L81-L88 |
42,965 | threerings/nenya | core/src/main/java/com/threerings/miso/data/ObjectInfo.java | ObjectInfo.setZations | public void setZations (byte primary, byte secondary, byte tertiary, byte quaternary)
{
zations = (primary | (secondary << 16) | (tertiary << 24) | (quaternary << 8));
} | java | public void setZations (byte primary, byte secondary, byte tertiary, byte quaternary)
{
zations = (primary | (secondary << 16) | (tertiary << 24) | (quaternary << 8));
} | [
"public",
"void",
"setZations",
"(",
"byte",
"primary",
",",
"byte",
"secondary",
",",
"byte",
"tertiary",
",",
"byte",
"quaternary",
")",
"{",
"zations",
"=",
"(",
"primary",
"|",
"(",
"secondary",
"<<",
"16",
")",
"|",
"(",
"tertiary",
"<<",
"24",
")... | Sets the primary and secondary colorization assignments. | [
"Sets",
"the",
"primary",
"and",
"secondary",
"colorization",
"assignments",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/data/ObjectInfo.java#L134-L137 |
42,966 | groupon/robo-remote | RoboRemoteServer/apklib/src/main/com/groupon/roboremote/roboremoteserver/robotium/Solo2.java | Solo2.getFilteredViews | public <T extends View> ArrayList<T> getFilteredViews(Class<T> classToFilterBy) {
ArrayList<T> filteredViews = new ArrayList<T>();
List<View> allViews = this.getViews();
for(View view : allViews){
if (view != null && classToFilterBy.isAssignableFrom(view.getClass())) {
filteredViews.add(classToFilterBy.cas... | java | public <T extends View> ArrayList<T> getFilteredViews(Class<T> classToFilterBy) {
ArrayList<T> filteredViews = new ArrayList<T>();
List<View> allViews = this.getViews();
for(View view : allViews){
if (view != null && classToFilterBy.isAssignableFrom(view.getClass())) {
filteredViews.add(classToFilterBy.cas... | [
"public",
"<",
"T",
"extends",
"View",
">",
"ArrayList",
"<",
"T",
">",
"getFilteredViews",
"(",
"Class",
"<",
"T",
">",
"classToFilterBy",
")",
"{",
"ArrayList",
"<",
"T",
">",
"filteredViews",
"=",
"new",
"ArrayList",
"<",
"T",
">",
"(",
")",
";",
... | Filters through all views in current activity and gets those that inherit from a given class to filter by
@param classToFilterBy - The class type by which to filter by.
@param <T> Type representing a class
@return - an ArrayList of views matching the filter | [
"Filters",
"through",
"all",
"views",
"in",
"current",
"activity",
"and",
"gets",
"those",
"that",
"inherit",
"from",
"a",
"given",
"class",
"to",
"filter",
"by"
] | 12d242faad50bf90f98657ca9a0c0c3ae1993f07 | https://github.com/groupon/robo-remote/blob/12d242faad50bf90f98657ca9a0c0c3ae1993f07/RoboRemoteServer/apklib/src/main/com/groupon/roboremote/roboremoteserver/robotium/Solo2.java#L65-L74 |
42,967 | groupon/robo-remote | RoboRemoteServer/apklib/src/main/com/groupon/roboremote/roboremoteserver/robotium/Solo2.java | Solo2.getVisibleText | public ArrayList<String> getVisibleText()
{
ArrayList<TextView> textViews = getFilteredViews(TextView.class);
ArrayList<String> allStrings = new ArrayList<String>();
for(TextView v: textViews)
{
if(v.getVisibility() == View.VISIBLE)
{
String s... | java | public ArrayList<String> getVisibleText()
{
ArrayList<TextView> textViews = getFilteredViews(TextView.class);
ArrayList<String> allStrings = new ArrayList<String>();
for(TextView v: textViews)
{
if(v.getVisibility() == View.VISIBLE)
{
String s... | [
"public",
"ArrayList",
"<",
"String",
">",
"getVisibleText",
"(",
")",
"{",
"ArrayList",
"<",
"TextView",
">",
"textViews",
"=",
"getFilteredViews",
"(",
"TextView",
".",
"class",
")",
";",
"ArrayList",
"<",
"String",
">",
"allStrings",
"=",
"new",
"ArrayLis... | Searches through all views and gets those containing text which are visible. Stips the text form each view and
returns it as an arraylist.
@return - ArrayList contating text in the current view | [
"Searches",
"through",
"all",
"views",
"and",
"gets",
"those",
"containing",
"text",
"which",
"are",
"visible",
".",
"Stips",
"the",
"text",
"form",
"each",
"view",
"and",
"returns",
"it",
"as",
"an",
"arraylist",
"."
] | 12d242faad50bf90f98657ca9a0c0c3ae1993f07 | https://github.com/groupon/robo-remote/blob/12d242faad50bf90f98657ca9a0c0c3ae1993f07/RoboRemoteServer/apklib/src/main/com/groupon/roboremote/roboremoteserver/robotium/Solo2.java#L81-L96 |
42,968 | groupon/robo-remote | RoboRemoteServer/apklib/src/main/com/groupon/roboremote/roboremoteserver/robotium/Solo2.java | Solo2.getView | public View getView(int id, int timeout) {
View v = null;
int RETRY_PERIOD = 250;
int retryNum = timeout / RETRY_PERIOD;
for (int i = 0; i < retryNum; i++) {
try {
v = super.getView(id);
} catch (Exception e) {}
if (v != null) {
... | java | public View getView(int id, int timeout) {
View v = null;
int RETRY_PERIOD = 250;
int retryNum = timeout / RETRY_PERIOD;
for (int i = 0; i < retryNum; i++) {
try {
v = super.getView(id);
} catch (Exception e) {}
if (v != null) {
... | [
"public",
"View",
"getView",
"(",
"int",
"id",
",",
"int",
"timeout",
")",
"{",
"View",
"v",
"=",
"null",
";",
"int",
"RETRY_PERIOD",
"=",
"250",
";",
"int",
"retryNum",
"=",
"timeout",
"/",
"RETRY_PERIOD",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";... | Extend the normal robotium getView to retry every 250ms over 10s to get the view requested
@param id Resource id of the view
@param timeout amount of time to retry getting the view
@return View that we want to find by id | [
"Extend",
"the",
"normal",
"robotium",
"getView",
"to",
"retry",
"every",
"250ms",
"over",
"10s",
"to",
"get",
"the",
"view",
"requested"
] | 12d242faad50bf90f98657ca9a0c0c3ae1993f07 | https://github.com/groupon/robo-remote/blob/12d242faad50bf90f98657ca9a0c0c3ae1993f07/RoboRemoteServer/apklib/src/main/com/groupon/roboremote/roboremoteserver/robotium/Solo2.java#L114-L130 |
42,969 | groupon/robo-remote | RoboRemoteServer/apklib/src/main/com/groupon/roboremote/roboremoteserver/robotium/Solo2.java | Solo2.waitForResource | public <T> boolean waitForResource(int res, int timeout) {
int RETRY_PERIOD = 250;
int retryNum = timeout / RETRY_PERIOD;
for (int i = 0; i < retryNum; i++) {
T View = (T) this.getView(res);
if (View != null) {
break;
}
if (i == ret... | java | public <T> boolean waitForResource(int res, int timeout) {
int RETRY_PERIOD = 250;
int retryNum = timeout / RETRY_PERIOD;
for (int i = 0; i < retryNum; i++) {
T View = (T) this.getView(res);
if (View != null) {
break;
}
if (i == ret... | [
"public",
"<",
"T",
">",
"boolean",
"waitForResource",
"(",
"int",
"res",
",",
"int",
"timeout",
")",
"{",
"int",
"RETRY_PERIOD",
"=",
"250",
";",
"int",
"retryNum",
"=",
"timeout",
"/",
"RETRY_PERIOD",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i"... | Wait for a resource to become active
@param res - view resource
@param timeout - timeout period to keep retrying
@param <T> - View type | [
"Wait",
"for",
"a",
"resource",
"to",
"become",
"active"
] | 12d242faad50bf90f98657ca9a0c0c3ae1993f07 | https://github.com/groupon/robo-remote/blob/12d242faad50bf90f98657ca9a0c0c3ae1993f07/RoboRemoteServer/apklib/src/main/com/groupon/roboremote/roboremoteserver/robotium/Solo2.java#L158-L172 |
42,970 | groupon/robo-remote | RoboRemoteServer/apklib/src/main/com/groupon/roboremote/roboremoteserver/robotium/Solo2.java | Solo2.getCustomViews | public ArrayList<View> getCustomViews(String viewName)
{
ArrayList<View> returnViews = new ArrayList<View>();
for(View v: this.getViews())
{
if(v.getClass().getSimpleName().equals(viewName))
returnViews.add(v);
}
return returnViews;
} | java | public ArrayList<View> getCustomViews(String viewName)
{
ArrayList<View> returnViews = new ArrayList<View>();
for(View v: this.getViews())
{
if(v.getClass().getSimpleName().equals(viewName))
returnViews.add(v);
}
return returnViews;
} | [
"public",
"ArrayList",
"<",
"View",
">",
"getCustomViews",
"(",
"String",
"viewName",
")",
"{",
"ArrayList",
"<",
"View",
">",
"returnViews",
"=",
"new",
"ArrayList",
"<",
"View",
">",
"(",
")",
";",
"for",
"(",
"View",
"v",
":",
"this",
".",
"getViews... | Gets views with a custom class name
@param viewName simple class name of the view type
@return arraylist of views matching class name provided | [
"Gets",
"views",
"with",
"a",
"custom",
"class",
"name"
] | 12d242faad50bf90f98657ca9a0c0c3ae1993f07 | https://github.com/groupon/robo-remote/blob/12d242faad50bf90f98657ca9a0c0c3ae1993f07/RoboRemoteServer/apklib/src/main/com/groupon/roboremote/roboremoteserver/robotium/Solo2.java#L231-L241 |
42,971 | groupon/robo-remote | RoboRemoteServer/apklib/src/main/com/groupon/roboremote/roboremoteserver/robotium/Solo2.java | Solo2.waitForHintText | public void waitForHintText(String hintText, int timeout) throws Exception
{
int RETRY_PERIOD = 250;
int retryNum = timeout / RETRY_PERIOD;
for(int i=0; i < retryNum; i++)
{
ArrayList<View> imageViews = getCustomViews("EditText");
for(View v: imageViews)
... | java | public void waitForHintText(String hintText, int timeout) throws Exception
{
int RETRY_PERIOD = 250;
int retryNum = timeout / RETRY_PERIOD;
for(int i=0; i < retryNum; i++)
{
ArrayList<View> imageViews = getCustomViews("EditText");
for(View v: imageViews)
... | [
"public",
"void",
"waitForHintText",
"(",
"String",
"hintText",
",",
"int",
"timeout",
")",
"throws",
"Exception",
"{",
"int",
"RETRY_PERIOD",
"=",
"250",
";",
"int",
"retryNum",
"=",
"timeout",
"/",
"RETRY_PERIOD",
";",
"for",
"(",
"int",
"i",
"=",
"0",
... | Waits for hint text to appear in an EditText
@param hintText text to wait for
@param timeout amount of time to wait | [
"Waits",
"for",
"hint",
"text",
"to",
"appear",
"in",
"an",
"EditText"
] | 12d242faad50bf90f98657ca9a0c0c3ae1993f07 | https://github.com/groupon/robo-remote/blob/12d242faad50bf90f98657ca9a0c0c3ae1993f07/RoboRemoteServer/apklib/src/main/com/groupon/roboremote/roboremoteserver/robotium/Solo2.java#L248-L267 |
42,972 | groupon/robo-remote | RoboRemoteServer/apklib/src/main/com/groupon/roboremote/roboremoteserver/robotium/Solo2.java | Solo2.enterTextAndWait | public void enterTextAndWait(int fieldResource, String value)
{
EditText textBox = (EditText) this.getView(fieldResource);
this.enterText(textBox, value);
this.waitForText(value);
} | java | public void enterTextAndWait(int fieldResource, String value)
{
EditText textBox = (EditText) this.getView(fieldResource);
this.enterText(textBox, value);
this.waitForText(value);
} | [
"public",
"void",
"enterTextAndWait",
"(",
"int",
"fieldResource",
",",
"String",
"value",
")",
"{",
"EditText",
"textBox",
"=",
"(",
"EditText",
")",
"this",
".",
"getView",
"(",
"fieldResource",
")",
";",
"this",
".",
"enterText",
"(",
"textBox",
",",
"v... | Enter text into a given field resource id
@param fieldResource - Resource id of a field (R.id.*)
@param value - value to enter into the given field | [
"Enter",
"text",
"into",
"a",
"given",
"field",
"resource",
"id"
] | 12d242faad50bf90f98657ca9a0c0c3ae1993f07 | https://github.com/groupon/robo-remote/blob/12d242faad50bf90f98657ca9a0c0c3ae1993f07/RoboRemoteServer/apklib/src/main/com/groupon/roboremote/roboremoteserver/robotium/Solo2.java#L274-L279 |
42,973 | groupon/robo-remote | RoboRemoteServer/apklib/src/main/com/groupon/roboremote/roboremoteserver/robotium/Solo2.java | Solo2.getLocalizedResource | public String getLocalizedResource(String namespace, String resourceId) throws Exception {
String resourceValue = "";
Class r = Class.forName(namespace + "$string");
Field f = r.getField(resourceId);
resourceValue = getCurrentActivity().getResources().getString(f.getInt(f));
re... | java | public String getLocalizedResource(String namespace, String resourceId) throws Exception {
String resourceValue = "";
Class r = Class.forName(namespace + "$string");
Field f = r.getField(resourceId);
resourceValue = getCurrentActivity().getResources().getString(f.getInt(f));
re... | [
"public",
"String",
"getLocalizedResource",
"(",
"String",
"namespace",
",",
"String",
"resourceId",
")",
"throws",
"Exception",
"{",
"String",
"resourceValue",
"=",
"\"\"",
";",
"Class",
"r",
"=",
"Class",
".",
"forName",
"(",
"namespace",
"+",
"\"$string\"",
... | Returns a string for a resourceId in the specified namespace
@param namespace
@param resourceId
@return
@throws Exception | [
"Returns",
"a",
"string",
"for",
"a",
"resourceId",
"in",
"the",
"specified",
"namespace"
] | 12d242faad50bf90f98657ca9a0c0c3ae1993f07 | https://github.com/groupon/robo-remote/blob/12d242faad50bf90f98657ca9a0c0c3ae1993f07/RoboRemoteServer/apklib/src/main/com/groupon/roboremote/roboremoteserver/robotium/Solo2.java#L288-L296 |
42,974 | groupon/robo-remote | RoboRemoteServer/apklib/src/main/com/groupon/roboremote/roboremoteserver/robotium/Solo2.java | Solo2.getLocalizedResourceArray | public String[] getLocalizedResourceArray(String namespace, String resourceId) throws Exception {
Class r = Class.forName(namespace + "$string");
Field f = r.getField(resourceId);
return getCurrentActivity().getResources().getStringArray(f.getInt(f));
} | java | public String[] getLocalizedResourceArray(String namespace, String resourceId) throws Exception {
Class r = Class.forName(namespace + "$string");
Field f = r.getField(resourceId);
return getCurrentActivity().getResources().getStringArray(f.getInt(f));
} | [
"public",
"String",
"[",
"]",
"getLocalizedResourceArray",
"(",
"String",
"namespace",
",",
"String",
"resourceId",
")",
"throws",
"Exception",
"{",
"Class",
"r",
"=",
"Class",
".",
"forName",
"(",
"namespace",
"+",
"\"$string\"",
")",
";",
"Field",
"f",
"="... | Returns a string array for a specified string-array resourceId in the specified namespace
@param namespace
@param resourceId
@return
@throws Exception | [
"Returns",
"a",
"string",
"array",
"for",
"a",
"specified",
"string",
"-",
"array",
"resourceId",
"in",
"the",
"specified",
"namespace"
] | 12d242faad50bf90f98657ca9a0c0c3ae1993f07 | https://github.com/groupon/robo-remote/blob/12d242faad50bf90f98657ca9a0c0c3ae1993f07/RoboRemoteServer/apklib/src/main/com/groupon/roboremote/roboremoteserver/robotium/Solo2.java#L305-L309 |
42,975 | threerings/nenya | core/src/main/java/com/threerings/openal/Listener.java | Listener.setPosition | public void setPosition (float x, float y, float z)
{
if (_px != x || _py != y || _pz != z) {
AL10.alListener3f(AL10.AL_POSITION, _px = x, _py = y, _pz = z);
}
} | java | public void setPosition (float x, float y, float z)
{
if (_px != x || _py != y || _pz != z) {
AL10.alListener3f(AL10.AL_POSITION, _px = x, _py = y, _pz = z);
}
} | [
"public",
"void",
"setPosition",
"(",
"float",
"x",
",",
"float",
"y",
",",
"float",
"z",
")",
"{",
"if",
"(",
"_px",
"!=",
"x",
"||",
"_py",
"!=",
"y",
"||",
"_pz",
"!=",
"z",
")",
"{",
"AL10",
".",
"alListener3f",
"(",
"AL10",
".",
"AL_POSITION... | Sets the position of the listener. | [
"Sets",
"the",
"position",
"of",
"the",
"listener",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/openal/Listener.java#L35-L40 |
42,976 | threerings/nenya | core/src/main/java/com/threerings/openal/Listener.java | Listener.setVelocity | public void setVelocity (float x, float y, float z)
{
if (_vx != x || _vy != y || _vz != z) {
AL10.alListener3f(AL10.AL_VELOCITY, _vx = x, _vy = y, _vz = z);
}
} | java | public void setVelocity (float x, float y, float z)
{
if (_vx != x || _vy != y || _vz != z) {
AL10.alListener3f(AL10.AL_VELOCITY, _vx = x, _vy = y, _vz = z);
}
} | [
"public",
"void",
"setVelocity",
"(",
"float",
"x",
",",
"float",
"y",
",",
"float",
"z",
")",
"{",
"if",
"(",
"_vx",
"!=",
"x",
"||",
"_vy",
"!=",
"y",
"||",
"_vz",
"!=",
"z",
")",
"{",
"AL10",
".",
"alListener3f",
"(",
"AL10",
".",
"AL_VELOCITY... | Sets the velocity of the listener. | [
"Sets",
"the",
"velocity",
"of",
"the",
"listener",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/openal/Listener.java#L69-L74 |
42,977 | threerings/nenya | core/src/main/java/com/threerings/openal/Listener.java | Listener.setGain | public void setGain (float gain)
{
if (_gain != gain) {
AL10.alListenerf(AL10.AL_GAIN, _gain = gain);
}
} | java | public void setGain (float gain)
{
if (_gain != gain) {
AL10.alListenerf(AL10.AL_GAIN, _gain = gain);
}
} | [
"public",
"void",
"setGain",
"(",
"float",
"gain",
")",
"{",
"if",
"(",
"_gain",
"!=",
"gain",
")",
"{",
"AL10",
".",
"alListenerf",
"(",
"AL10",
".",
"AL_GAIN",
",",
"_gain",
"=",
"gain",
")",
";",
"}",
"}"
] | Sets the gain of the listener. | [
"Sets",
"the",
"gain",
"of",
"the",
"listener",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/openal/Listener.java#L79-L84 |
42,978 | threerings/nenya | core/src/main/java/com/threerings/media/image/Colorization.java | Colorization.matches | public boolean matches (float[] hsv, int[] fhsv)
{
// check to see that this color is sufficiently "close" to the
// root color based on the supplied distance parameters
if (distance(fhsv[0], _fhsv[0], Short.MAX_VALUE) > range[0] * Short.MAX_VALUE) {
return false;
}
... | java | public boolean matches (float[] hsv, int[] fhsv)
{
// check to see that this color is sufficiently "close" to the
// root color based on the supplied distance parameters
if (distance(fhsv[0], _fhsv[0], Short.MAX_VALUE) > range[0] * Short.MAX_VALUE) {
return false;
}
... | [
"public",
"boolean",
"matches",
"(",
"float",
"[",
"]",
"hsv",
",",
"int",
"[",
"]",
"fhsv",
")",
"{",
"// check to see that this color is sufficiently \"close\" to the",
"// root color based on the supplied distance parameters",
"if",
"(",
"distance",
"(",
"fhsv",
"[",
... | Returns true if this colorization matches the supplied color, false otherwise.
@param hsv the HSV values for the color in question.
@param fhsv the HSV values converted to fixed point via {@link #toFixedHSV} for the color
in question. | [
"Returns",
"true",
"if",
"this",
"colorization",
"matches",
"the",
"supplied",
"color",
"false",
"otherwise",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/image/Colorization.java#L115-L130 |
42,979 | threerings/nenya | core/src/main/java/com/threerings/media/image/Colorization.java | Colorization.toFixedHSV | public static int[] toFixedHSV (float[] hsv, int[] fhsv)
{
if (fhsv == null) {
fhsv = new int[hsv.length];
}
for (int ii = 0; ii < hsv.length; ii++) {
// fhsv[i] = (int)(hsv[i]*Integer.MAX_VALUE);
fhsv[ii] = (int)(hsv[ii]*Short.MAX_VALUE);
}
... | java | public static int[] toFixedHSV (float[] hsv, int[] fhsv)
{
if (fhsv == null) {
fhsv = new int[hsv.length];
}
for (int ii = 0; ii < hsv.length; ii++) {
// fhsv[i] = (int)(hsv[i]*Integer.MAX_VALUE);
fhsv[ii] = (int)(hsv[ii]*Short.MAX_VALUE);
}
... | [
"public",
"static",
"int",
"[",
"]",
"toFixedHSV",
"(",
"float",
"[",
"]",
"hsv",
",",
"int",
"[",
"]",
"fhsv",
")",
"{",
"if",
"(",
"fhsv",
"==",
"null",
")",
"{",
"fhsv",
"=",
"new",
"int",
"[",
"hsv",
".",
"length",
"]",
";",
"}",
"for",
"... | Converts floating point HSV values to a fixed point integer representation.
@param hsv the HSV values to be converted.
@param fhsv the destination array into which the fixed values will be stored. If this is
null, a new array will be created of the appropriate length.
@return the <code>fhsv</code> parameter if it was... | [
"Converts",
"floating",
"point",
"HSV",
"values",
"to",
"a",
"fixed",
"point",
"integer",
"representation",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/image/Colorization.java#L172-L182 |
42,980 | threerings/nenya | core/src/main/java/com/threerings/media/image/Colorization.java | Colorization.distance | public static int distance (int a, int b, int N)
{
return (a > b) ? Math.min(a-b, b+N-a) : Math.min(b-a, a+N-b);
} | java | public static int distance (int a, int b, int N)
{
return (a > b) ? Math.min(a-b, b+N-a) : Math.min(b-a, a+N-b);
} | [
"public",
"static",
"int",
"distance",
"(",
"int",
"a",
",",
"int",
"b",
",",
"int",
"N",
")",
"{",
"return",
"(",
"a",
">",
"b",
")",
"?",
"Math",
".",
"min",
"(",
"a",
"-",
"b",
",",
"b",
"+",
"N",
"-",
"a",
")",
":",
"Math",
".",
"min"... | Returns the distance between the supplied to numbers modulo N. | [
"Returns",
"the",
"distance",
"between",
"the",
"supplied",
"to",
"numbers",
"modulo",
"N",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/image/Colorization.java#L187-L190 |
42,981 | threerings/nenya | core/src/main/java/com/threerings/miso/client/MisoScenePanel.java | MisoScenePanel.setSceneModel | public void setSceneModel (MisoSceneModel model)
{
_model = model;
// clear out old blocks and objects
clearScene();
centerOnTile(0, 0);
if (isShowing()) {
rethink();
_remgr.invalidateRegion(_vbounds);
}
} | java | public void setSceneModel (MisoSceneModel model)
{
_model = model;
// clear out old blocks and objects
clearScene();
centerOnTile(0, 0);
if (isShowing()) {
rethink();
_remgr.invalidateRegion(_vbounds);
}
} | [
"public",
"void",
"setSceneModel",
"(",
"MisoSceneModel",
"model",
")",
"{",
"_model",
"=",
"model",
";",
"// clear out old blocks and objects",
"clearScene",
"(",
")",
";",
"centerOnTile",
"(",
"0",
",",
"0",
")",
";",
"if",
"(",
"isShowing",
"(",
")",
")",... | Configures this display with a scene model which will immediately be resolved and
displayed. | [
"Configures",
"this",
"display",
"with",
"a",
"scene",
"model",
"which",
"will",
"immediately",
"be",
"resolved",
"and",
"displayed",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/MisoScenePanel.java#L127-L139 |
42,982 | threerings/nenya | core/src/main/java/com/threerings/miso/client/MisoScenePanel.java | MisoScenePanel.clearScene | protected void clearScene ()
{
_blocks.clear();
_vizobjs.clear();
_fringes.clear();
_masks.clear();
if (_dpanel != null) {
_dpanel.newScene();
}
} | java | protected void clearScene ()
{
_blocks.clear();
_vizobjs.clear();
_fringes.clear();
_masks.clear();
if (_dpanel != null) {
_dpanel.newScene();
}
} | [
"protected",
"void",
"clearScene",
"(",
")",
"{",
"_blocks",
".",
"clear",
"(",
")",
";",
"_vizobjs",
".",
"clear",
"(",
")",
";",
"_fringes",
".",
"clear",
"(",
")",
";",
"_masks",
".",
"clear",
"(",
")",
";",
"if",
"(",
"_dpanel",
"!=",
"null",
... | Clears out our old scene business. | [
"Clears",
"out",
"our",
"old",
"scene",
"business",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/MisoScenePanel.java#L144-L153 |
42,983 | threerings/nenya | core/src/main/java/com/threerings/miso/client/MisoScenePanel.java | MisoScenePanel.centerOnTile | public void centerOnTile (int tx, int ty)
{
Rectangle trect = MisoUtil.getTilePolygon(_metrics, tx, ty).getBounds();
int nx = trect.x + trect.width/2 - _vbounds.width/2;
int ny = trect.y + trect.height/2 - _vbounds.height/2;
// Log.info("Centering on t:" + StringUtil.coordsToString(t... | java | public void centerOnTile (int tx, int ty)
{
Rectangle trect = MisoUtil.getTilePolygon(_metrics, tx, ty).getBounds();
int nx = trect.x + trect.width/2 - _vbounds.width/2;
int ny = trect.y + trect.height/2 - _vbounds.height/2;
// Log.info("Centering on t:" + StringUtil.coordsToString(t... | [
"public",
"void",
"centerOnTile",
"(",
"int",
"tx",
",",
"int",
"ty",
")",
"{",
"Rectangle",
"trect",
"=",
"MisoUtil",
".",
"getTilePolygon",
"(",
"_metrics",
",",
"tx",
",",
"ty",
")",
".",
"getBounds",
"(",
")",
";",
"int",
"nx",
"=",
"trect",
".",... | Moves the scene such that the specified tile is in the center. | [
"Moves",
"the",
"scene",
"such",
"that",
"the",
"specified",
"tile",
"is",
"in",
"the",
"center",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/MisoScenePanel.java#L169-L179 |
42,984 | threerings/nenya | core/src/main/java/com/threerings/miso/client/MisoScenePanel.java | MisoScenePanel.showFlagsDidChange | protected void showFlagsDidChange (int oldflags)
{
if ((oldflags & SHOW_TIPS) != (_showFlags & SHOW_TIPS)) {
for (SceneObjectIndicator indic : _indicators.values()) {
dirtyIndicator(indic);
}
}
} | java | protected void showFlagsDidChange (int oldflags)
{
if ((oldflags & SHOW_TIPS) != (_showFlags & SHOW_TIPS)) {
for (SceneObjectIndicator indic : _indicators.values()) {
dirtyIndicator(indic);
}
}
} | [
"protected",
"void",
"showFlagsDidChange",
"(",
"int",
"oldflags",
")",
"{",
"if",
"(",
"(",
"oldflags",
"&",
"SHOW_TIPS",
")",
"!=",
"(",
"_showFlags",
"&",
"SHOW_TIPS",
")",
")",
"{",
"for",
"(",
"SceneObjectIndicator",
"indic",
":",
"_indicators",
".",
... | Called when our show flags have changed. | [
"Called",
"when",
"our",
"show",
"flags",
"have",
"changed",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/MisoScenePanel.java#L227-L234 |
42,985 | threerings/nenya | core/src/main/java/com/threerings/miso/client/MisoScenePanel.java | MisoScenePanel.getBlock | public SceneBlock getBlock (int tx, int ty)
{
int bx = MathUtil.floorDiv(tx, _metrics.blockwid);
int by = MathUtil.floorDiv(ty, _metrics.blockhei);
return _blocks.get(compose(bx, by));
} | java | public SceneBlock getBlock (int tx, int ty)
{
int bx = MathUtil.floorDiv(tx, _metrics.blockwid);
int by = MathUtil.floorDiv(ty, _metrics.blockhei);
return _blocks.get(compose(bx, by));
} | [
"public",
"SceneBlock",
"getBlock",
"(",
"int",
"tx",
",",
"int",
"ty",
")",
"{",
"int",
"bx",
"=",
"MathUtil",
".",
"floorDiv",
"(",
"tx",
",",
"_metrics",
".",
"blockwid",
")",
";",
"int",
"by",
"=",
"MathUtil",
".",
"floorDiv",
"(",
"ty",
",",
"... | Returns the resolved block that contains the specified tile coordinate or null if no block
is resolved for that coordinate. | [
"Returns",
"the",
"resolved",
"block",
"that",
"contains",
"the",
"specified",
"tile",
"coordinate",
"or",
"null",
"if",
"no",
"block",
"is",
"resolved",
"for",
"that",
"coordinate",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/MisoScenePanel.java#L265-L270 |
42,986 | threerings/nenya | core/src/main/java/com/threerings/miso/client/MisoScenePanel.java | MisoScenePanel.getPath | public Path getPath (Sprite sprite, int x, int y, boolean loose)
{
// sanity check
if (sprite == null) {
throw new IllegalArgumentException(
"Can't get path for null sprite [x=" + x + ", y=" + y + ".");
}
// get the destination tile coordinates
Po... | java | public Path getPath (Sprite sprite, int x, int y, boolean loose)
{
// sanity check
if (sprite == null) {
throw new IllegalArgumentException(
"Can't get path for null sprite [x=" + x + ", y=" + y + ".");
}
// get the destination tile coordinates
Po... | [
"public",
"Path",
"getPath",
"(",
"Sprite",
"sprite",
",",
"int",
"x",
",",
"int",
"y",
",",
"boolean",
"loose",
")",
"{",
"// sanity check",
"if",
"(",
"sprite",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Can't get path for ... | Computes a path for the specified sprite to the specified tile coordinates.
@param loose if true, an approximate path will be returned if a complete path cannot be
located. This path will navigate the sprite "legally" as far as possible and then walk the
sprite in a straight line to its final destination. This is gene... | [
"Computes",
"a",
"path",
"for",
"the",
"specified",
"sprite",
"to",
"the",
"specified",
"tile",
"coordinates",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/MisoScenePanel.java#L280-L314 |
42,987 | threerings/nenya | core/src/main/java/com/threerings/miso/client/MisoScenePanel.java | MisoScenePanel.getScreenCoords | public Point getScreenCoords (int x, int y)
{
return MisoUtil.fullToScreen(_metrics, x, y, new Point());
} | java | public Point getScreenCoords (int x, int y)
{
return MisoUtil.fullToScreen(_metrics, x, y, new Point());
} | [
"public",
"Point",
"getScreenCoords",
"(",
"int",
"x",
",",
"int",
"y",
")",
"{",
"return",
"MisoUtil",
".",
"fullToScreen",
"(",
"_metrics",
",",
"x",
",",
"y",
",",
"new",
"Point",
"(",
")",
")",
";",
"}"
] | Converts the supplied full coordinates to screen coordinates. | [
"Converts",
"the",
"supplied",
"full",
"coordinates",
"to",
"screen",
"coordinates",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/MisoScenePanel.java#L319-L322 |
42,988 | threerings/nenya | core/src/main/java/com/threerings/miso/client/MisoScenePanel.java | MisoScenePanel.getFullCoords | public Point getFullCoords (int x, int y)
{
return MisoUtil.screenToFull(_metrics, x, y, new Point());
} | java | public Point getFullCoords (int x, int y)
{
return MisoUtil.screenToFull(_metrics, x, y, new Point());
} | [
"public",
"Point",
"getFullCoords",
"(",
"int",
"x",
",",
"int",
"y",
")",
"{",
"return",
"MisoUtil",
".",
"screenToFull",
"(",
"_metrics",
",",
"x",
",",
"y",
",",
"new",
"Point",
"(",
")",
")",
";",
"}"
] | Converts the supplied screen coordinates to full coordinates. | [
"Converts",
"the",
"supplied",
"screen",
"coordinates",
"to",
"full",
"coordinates",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/MisoScenePanel.java#L327-L330 |
42,989 | threerings/nenya | core/src/main/java/com/threerings/miso/client/MisoScenePanel.java | MisoScenePanel.getTileCoords | public Point getTileCoords (int x, int y)
{
return MisoUtil.screenToTile(_metrics, x, y, new Point());
} | java | public Point getTileCoords (int x, int y)
{
return MisoUtil.screenToTile(_metrics, x, y, new Point());
} | [
"public",
"Point",
"getTileCoords",
"(",
"int",
"x",
",",
"int",
"y",
")",
"{",
"return",
"MisoUtil",
".",
"screenToTile",
"(",
"_metrics",
",",
"x",
",",
"y",
",",
"new",
"Point",
"(",
")",
")",
";",
"}"
] | Converts the supplied screen coordinates to tile coordinates. | [
"Converts",
"the",
"supplied",
"screen",
"coordinates",
"to",
"tile",
"coordinates",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/MisoScenePanel.java#L335-L338 |
42,990 | threerings/nenya | core/src/main/java/com/threerings/miso/client/MisoScenePanel.java | MisoScenePanel.reportMemoryUsage | public void reportMemoryUsage ()
{
Map<Tile.Key,BaseTile> base = Maps.newHashMap();
Set<BaseTile> fringe = Sets.newHashSet();
Map<Tile.Key,ObjectTile> object = Maps.newHashMap();
long[] usage = new long[3];
for (SceneBlock block : _blocks.values()) {
block.compute... | java | public void reportMemoryUsage ()
{
Map<Tile.Key,BaseTile> base = Maps.newHashMap();
Set<BaseTile> fringe = Sets.newHashSet();
Map<Tile.Key,ObjectTile> object = Maps.newHashMap();
long[] usage = new long[3];
for (SceneBlock block : _blocks.values()) {
block.compute... | [
"public",
"void",
"reportMemoryUsage",
"(",
")",
"{",
"Map",
"<",
"Tile",
".",
"Key",
",",
"BaseTile",
">",
"base",
"=",
"Maps",
".",
"newHashMap",
"(",
")",
";",
"Set",
"<",
"BaseTile",
">",
"fringe",
"=",
"Sets",
".",
"newHashSet",
"(",
")",
";",
... | Reports the memory usage of the resolved tiles in the current scene block. | [
"Reports",
"the",
"memory",
"usage",
"of",
"the",
"resolved",
"tiles",
"in",
"the",
"current",
"scene",
"block",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/MisoScenePanel.java#L353-L367 |
42,991 | threerings/nenya | core/src/main/java/com/threerings/miso/client/MisoScenePanel.java | MisoScenePanel.handleObjectPressed | protected void handleObjectPressed (final SceneObject scobj, int mx, int my)
{
String action = scobj.info.action;
final ObjectActionHandler handler = ObjectActionHandler.lookup(action);
// if there's no handler, just fire the action immediately
if (handler == null) {
fir... | java | protected void handleObjectPressed (final SceneObject scobj, int mx, int my)
{
String action = scobj.info.action;
final ObjectActionHandler handler = ObjectActionHandler.lookup(action);
// if there's no handler, just fire the action immediately
if (handler == null) {
fir... | [
"protected",
"void",
"handleObjectPressed",
"(",
"final",
"SceneObject",
"scobj",
",",
"int",
"mx",
",",
"int",
"my",
")",
"{",
"String",
"action",
"=",
"scobj",
".",
"info",
".",
"action",
";",
"final",
"ObjectActionHandler",
"handler",
"=",
"ObjectActionHand... | Called when the user presses the mouse button over an object. | [
"Called",
"when",
"the",
"user",
"presses",
"the",
"mouse",
"button",
"over",
"an",
"object",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/MisoScenePanel.java#L443-L485 |
42,992 | threerings/nenya | core/src/main/java/com/threerings/miso/client/MisoScenePanel.java | MisoScenePanel.fireObjectAction | protected void fireObjectAction (
ObjectActionHandler handler, SceneObject scobj, ActionEvent event)
{
if (handler == null) {
Controller.postAction(event);
} else {
handler.handleAction(scobj, event);
}
} | java | protected void fireObjectAction (
ObjectActionHandler handler, SceneObject scobj, ActionEvent event)
{
if (handler == null) {
Controller.postAction(event);
} else {
handler.handleAction(scobj, event);
}
} | [
"protected",
"void",
"fireObjectAction",
"(",
"ObjectActionHandler",
"handler",
",",
"SceneObject",
"scobj",
",",
"ActionEvent",
"event",
")",
"{",
"if",
"(",
"handler",
"==",
"null",
")",
"{",
"Controller",
".",
"postAction",
"(",
"event",
")",
";",
"}",
"e... | Called when an object or object menu item has been clicked. | [
"Called",
"when",
"an",
"object",
"or",
"object",
"menu",
"item",
"has",
"been",
"clicked",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/MisoScenePanel.java#L519-L527 |
42,993 | threerings/nenya | core/src/main/java/com/threerings/miso/client/MisoScenePanel.java | MisoScenePanel.appendDirtySprite | protected void appendDirtySprite (DirtyItemList list, Sprite sprite)
{
MisoUtil.screenToTile(_metrics, sprite.getX(), sprite.getY(), _tcoords);
list.appendDirtySprite(sprite, _tcoords.x, _tcoords.y);
} | java | protected void appendDirtySprite (DirtyItemList list, Sprite sprite)
{
MisoUtil.screenToTile(_metrics, sprite.getX(), sprite.getY(), _tcoords);
list.appendDirtySprite(sprite, _tcoords.x, _tcoords.y);
} | [
"protected",
"void",
"appendDirtySprite",
"(",
"DirtyItemList",
"list",
",",
"Sprite",
"sprite",
")",
"{",
"MisoUtil",
".",
"screenToTile",
"(",
"_metrics",
",",
"sprite",
".",
"getX",
"(",
")",
",",
"sprite",
".",
"getY",
"(",
")",
",",
"_tcoords",
")",
... | Computes the tile coordinates of the supplied sprite and appends it to the supplied dirty
item list. | [
"Computes",
"the",
"tile",
"coordinates",
"of",
"the",
"supplied",
"sprite",
"and",
"appends",
"it",
"to",
"the",
"supplied",
"dirty",
"item",
"list",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/MisoScenePanel.java#L756-L760 |
42,994 | threerings/nenya | core/src/main/java/com/threerings/miso/client/MisoScenePanel.java | MisoScenePanel.blockAbandoned | protected void blockAbandoned (SceneBlock block)
{
if (_dpanel != null) {
_dpanel.blockCleared(block);
}
blockFinished(block);
} | java | protected void blockAbandoned (SceneBlock block)
{
if (_dpanel != null) {
_dpanel.blockCleared(block);
}
blockFinished(block);
} | [
"protected",
"void",
"blockAbandoned",
"(",
"SceneBlock",
"block",
")",
"{",
"if",
"(",
"_dpanel",
"!=",
"null",
")",
"{",
"_dpanel",
".",
"blockCleared",
"(",
"block",
")",
";",
"}",
"blockFinished",
"(",
"block",
")",
";",
"}"
] | Called by the scene block if it has come up for resolution but is no longer influential. | [
"Called",
"by",
"the",
"scene",
"block",
"if",
"it",
"has",
"come",
"up",
"for",
"resolution",
"but",
"is",
"no",
"longer",
"influential",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/MisoScenePanel.java#L902-L909 |
42,995 | threerings/nenya | core/src/main/java/com/threerings/miso/client/MisoScenePanel.java | MisoScenePanel.blockResolved | protected void blockResolved (SceneBlock block)
{
if (_dpanel != null) {
_dpanel.resolvedBlock(block);
}
Rectangle sbounds = block.getScreenBounds();
if (!_delayRepaint && sbounds != null && sbounds.intersects(_vbounds)) {
// warnVisible(block, sbounds);
... | java | protected void blockResolved (SceneBlock block)
{
if (_dpanel != null) {
_dpanel.resolvedBlock(block);
}
Rectangle sbounds = block.getScreenBounds();
if (!_delayRepaint && sbounds != null && sbounds.intersects(_vbounds)) {
// warnVisible(block, sbounds);
... | [
"protected",
"void",
"blockResolved",
"(",
"SceneBlock",
"block",
")",
"{",
"if",
"(",
"_dpanel",
"!=",
"null",
")",
"{",
"_dpanel",
".",
"resolvedBlock",
"(",
"block",
")",
";",
"}",
"Rectangle",
"sbounds",
"=",
"block",
".",
"getScreenBounds",
"(",
")",
... | Called by a scene block when it has completed its resolution process. | [
"Called",
"by",
"a",
"scene",
"block",
"when",
"it",
"has",
"completed",
"its",
"resolution",
"process",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/MisoScenePanel.java#L914-L932 |
42,996 | threerings/nenya | core/src/main/java/com/threerings/miso/client/MisoScenePanel.java | MisoScenePanel.blockFinished | protected void blockFinished (SceneBlock block)
{
--_pendingBlocks;
// once all the visible pending blocks have completed their
// resolution, recompute our visible object set and show ourselves
if (_visiBlocks.remove(block) && _visiBlocks.size() == 0) {
allBlocksFinishe... | java | protected void blockFinished (SceneBlock block)
{
--_pendingBlocks;
// once all the visible pending blocks have completed their
// resolution, recompute our visible object set and show ourselves
if (_visiBlocks.remove(block) && _visiBlocks.size() == 0) {
allBlocksFinishe... | [
"protected",
"void",
"blockFinished",
"(",
"SceneBlock",
"block",
")",
"{",
"--",
"_pendingBlocks",
";",
"// once all the visible pending blocks have completed their",
"// resolution, recompute our visible object set and show ourselves",
"if",
"(",
"_visiBlocks",
".",
"remove",
"... | Called whenever a block is done resolving, whether it was successfully resolved or if it
was abandoned. | [
"Called",
"whenever",
"a",
"block",
"is",
"done",
"resolving",
"whether",
"it",
"was",
"successfully",
"resolved",
"or",
"if",
"it",
"was",
"abandoned",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/MisoScenePanel.java#L938-L947 |
42,997 | threerings/nenya | core/src/main/java/com/threerings/miso/client/MisoScenePanel.java | MisoScenePanel.allBlocksFinished | protected void allBlocksFinished ()
{
recomputeVisible();
log.info("Restoring repaint... ", "left", _pendingBlocks, "view",
StringUtil.toString(_vbounds));
_delayRepaint = false;
// Need to restore visibility as it may have been turned of as a result of the delay
... | java | protected void allBlocksFinished ()
{
recomputeVisible();
log.info("Restoring repaint... ", "left", _pendingBlocks, "view",
StringUtil.toString(_vbounds));
_delayRepaint = false;
// Need to restore visibility as it may have been turned of as a result of the delay
... | [
"protected",
"void",
"allBlocksFinished",
"(",
")",
"{",
"recomputeVisible",
"(",
")",
";",
"log",
".",
"info",
"(",
"\"Restoring repaint... \"",
",",
"\"left\"",
",",
"_pendingBlocks",
",",
"\"view\"",
",",
"StringUtil",
".",
"toString",
"(",
"_vbounds",
")",
... | Called to handle the proceedings once our last resolving block has been finished. | [
"Called",
"to",
"handle",
"the",
"proceedings",
"once",
"our",
"last",
"resolving",
"block",
"has",
"been",
"finished",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/MisoScenePanel.java#L952-L961 |
42,998 | threerings/nenya | core/src/main/java/com/threerings/miso/client/MisoScenePanel.java | MisoScenePanel.warnVisible | protected void warnVisible (SceneBlock block, Rectangle sbounds)
{
log.warning("Block visible during resolution " + block +
" sbounds:" + StringUtil.toString(sbounds) +
" vbounds:" + StringUtil.toString(_vbounds) + ".");
} | java | protected void warnVisible (SceneBlock block, Rectangle sbounds)
{
log.warning("Block visible during resolution " + block +
" sbounds:" + StringUtil.toString(sbounds) +
" vbounds:" + StringUtil.toString(_vbounds) + ".");
} | [
"protected",
"void",
"warnVisible",
"(",
"SceneBlock",
"block",
",",
"Rectangle",
"sbounds",
")",
"{",
"log",
".",
"warning",
"(",
"\"Block visible during resolution \"",
"+",
"block",
"+",
"\" sbounds:\"",
"+",
"StringUtil",
".",
"toString",
"(",
"sbounds",
")",
... | Issues a warning to the error log that the specified block became visible prior to being
resolved. Derived classes may wish to augment or inhibit this warning. | [
"Issues",
"a",
"warning",
"to",
"the",
"error",
"log",
"that",
"the",
"specified",
"block",
"became",
"visible",
"prior",
"to",
"being",
"resolved",
".",
"Derived",
"classes",
"may",
"wish",
"to",
"augment",
"or",
"inhibit",
"this",
"warning",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/MisoScenePanel.java#L967-L972 |
42,999 | threerings/nenya | core/src/main/java/com/threerings/miso/client/MisoScenePanel.java | MisoScenePanel.recomputeVisible | protected void recomputeVisible ()
{
// flush our visible object set which we'll recreate later
_vizobjs.clear();
Rectangle vbounds = new Rectangle(
_vbounds.x-_metrics.tilewid, _vbounds.y-_metrics.tilehei,
_vbounds.width+2*_metrics.tilewid,
_vbounds.heig... | java | protected void recomputeVisible ()
{
// flush our visible object set which we'll recreate later
_vizobjs.clear();
Rectangle vbounds = new Rectangle(
_vbounds.x-_metrics.tilewid, _vbounds.y-_metrics.tilehei,
_vbounds.width+2*_metrics.tilewid,
_vbounds.heig... | [
"protected",
"void",
"recomputeVisible",
"(",
")",
"{",
"// flush our visible object set which we'll recreate later",
"_vizobjs",
".",
"clear",
"(",
")",
";",
"Rectangle",
"vbounds",
"=",
"new",
"Rectangle",
"(",
"_vbounds",
".",
"x",
"-",
"_metrics",
".",
"tilewid"... | Recomputes our set of visible objects and their indicators. | [
"Recomputes",
"our",
"set",
"of",
"visible",
"objects",
"and",
"their",
"indicators",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/MisoScenePanel.java#L977-L1018 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.