Skip to content

Commit

Permalink
Merge pull request #304 from scenerygraphics/kotlin
Browse files Browse the repository at this point in the history
Move main class to Kotlin
  • Loading branch information
kephale authored Nov 18, 2020
2 parents 46bec9c + 622d0db commit dd41974
Show file tree
Hide file tree
Showing 64 changed files with 3,870 additions and 5,422 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
<!-- NB: Deploy releases to the SciJava Maven repository. -->
<releaseProfiles>deploy-to-scijava</releaseProfiles>

<scenery.version>94e8d97</scenery.version>
<scenery.version>9d42647</scenery.version>
<!-- <scijava-common.version>2.84.0</scijava-common.version>-->
<ui-behaviour.version>2.0.3</ui-behaviour.version>
<imagej-mesh.version>a40d46f</imagej-mesh.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
* %%
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Expand All @@ -26,39 +26,35 @@
* POSSIBILITY OF SUCH DAMAGE.
* #L%
*/
package sc.iview.vector;
package sc.iview

import net.imagej.lut.LUTService
import net.imagej.ops.OpService
import net.imagej.units.UnitService
import org.scijava.Context
import org.scijava.console.ConsoleService
import org.scijava.io.IOService
import org.scijava.menu.MenuService
import org.scijava.options.OptionsService
import org.scijava.tool.ToolService
import org.scijava.ui.UIService
import org.scijava.ui.swing.SwingIconService

/**
* {@link Vector3} backed by three {@code float}s.
*
* @author Curtis Rueden
* Entry point for testing SciView functionality.
*
* @author Kyle Harrington
* @author Ulrik Guenther
*/
public class FloatVector3 implements Vector3 {

private float x, y, z;

public FloatVector3( float x, float y, float z ) {
this.x = x;
this.y = y;
this.z = z;
}

@Override public float xf() { return x; }
@Override public float yf() { return y; }
@Override public float zf() { return z; }

@Override public void setX( float position ) { x = position; }
@Override public void setY( float position ) { y = position; }
@Override public void setZ( float position ) { z = position; }

@Override
public Vector3 copy() {
return new FloatVector3(xf(),yf(),zf());
}
object ImageJMain {
@Throws(Exception::class)
@JvmStatic
fun main(args: Array<String>) {
val context = Context()
val uiService = context.service(UIService::class.java)
val sciViewService = context.service(SciViewService::class.java)

@Override
public String toString() {
return "[" + xf() + "; " + yf() + "; " + zf() + "]";
uiService.showUI()
sciViewService.createSciView()
}
}
Loading

0 comments on commit dd41974

Please sign in to comment.