# HG changeset patch # User dwinter # Date 1308383581 -7200 # Node ID 361d8c89338afc08980bbbf0b9d9972857fa12cb # Parent 183c3e96f6c363529fa0899a5f8fb3e2ae7618ee Moved common classes to de.mpg.mpiwg.itgroup.digilib.core diff -r 183c3e96f6c3 -r 361d8c89338a .classpath --- a/.classpath Mon Jan 10 12:01:25 2011 +0100 +++ b/.classpath Sat Jun 18 09:53:01 2011 +0200 @@ -1,10 +1,10 @@ - - - + + + diff -r 183c3e96f6c3 -r 361d8c89338a .project --- a/.project Mon Jan 10 12:01:25 2011 +0100 +++ b/.project Sat Jun 18 09:53:01 2011 +0200 @@ -1,6 +1,6 @@ - de.mpg.mpiwg.itgroup.digilib.plugin + de.mpg.mpiwg.itgroup.digilib.core.plugin diff -r 183c3e96f6c3 -r 361d8c89338a .settings/org.eclipse.jdt.core.prefs --- a/.settings/org.eclipse.jdt.core.prefs Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -#Mon Dec 27 10:56:13 CET 2010 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 diff -r 183c3e96f6c3 -r 361d8c89338a META-INF/MANIFEST.MF --- a/META-INF/MANIFEST.MF Mon Jan 10 12:01:25 2011 +0100 +++ b/META-INF/MANIFEST.MF Sat Jun 18 09:53:01 2011 +0200 @@ -10,11 +10,11 @@ org.eclipse.core.resources, org.eclipse.ui.editors, org.eclipse.ui.ide, - org.eclipse.ui.views.properties.tabbed;bundle-version="3.5.100" + org.eclipse.ui.views.properties.tabbed;bundle-version="3.5.100", + org.apache.axis2.full;bundle-version="1.4.0", + de.mpg.mpiwg.itgroup.digilib.core;bundle-version="0.0.1" Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: J2SE-1.5 Bundle-ClassPath: libs/commons-lang-2.3.jar, ., - libs/jdom-1.0.jar, - libs/jaxen-1.1.1.jar -Export-Package: de.mpg.mpiwg.itgroup.digilib.plugin.editors + libs/digilibservice-client-1.0-SNAPSHOT.jar diff -r 183c3e96f6c3 -r 361d8c89338a build.properties --- a/build.properties Mon Jan 10 12:01:25 2011 +0100 +++ b/build.properties Sat Jun 18 09:53:01 2011 +0200 @@ -4,7 +4,6 @@ .,\ icons/,\ libs/commons-lang-2.3.jar,\ - libs/jdom-1.0.jar,\ - libs/jaxen-1.1.1.jar,\ + libs/digilibservice-client-1.0-SNAPSHOT.jar,\ plugin_customization.ini source.. = src/ diff -r 183c3e96f6c3 -r 361d8c89338a doc/allclasses-frame.html --- a/doc/allclasses-frame.html Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/allclasses-frame.html Sat Jun 18 09:53:01 2011 +0200 @@ -21,7 +21,7 @@ -
Activator +Activator
DigiImage
@@ -29,19 +29,19 @@
DigiImageParameter
-DigilibHandler +DigilibHandler
DigilibImageManipulatorProvider
DigilibInputTypeException
-DigilibLinkEditorContributor +DigilibLinkEditorContributor
-DigilibLinkEditorInput +DigilibLinkEditorInput
-DigilibLinkEditorObservable +DigilibLinkEditorObservable
-DigilibLinkEditorPart +DigilibLinkEditorPart
DigiNav
diff -r 183c3e96f6c3 -r 361d8c89338a doc/allclasses-noframe.html --- a/doc/allclasses-noframe.html Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/allclasses-noframe.html Sat Jun 18 09:53:01 2011 +0200 @@ -21,7 +21,7 @@ -
Activator +Activator
DigiImage
@@ -29,19 +29,19 @@
DigiImageParameter
-DigilibHandler +DigilibHandler
DigilibImageManipulatorProvider
DigilibInputTypeException
-DigilibLinkEditorContributor +DigilibLinkEditorContributor
-DigilibLinkEditorInput +DigilibLinkEditorInput
-DigilibLinkEditorObservable +DigilibLinkEditorObservable
-DigilibLinkEditorPart +DigilibLinkEditorPart
DigiNav
diff -r 183c3e96f6c3 -r 361d8c89338a doc/constant-values.html --- a/doc/constant-values.html Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/constant-values.html Sat Jun 18 09:53:01 2011 +0200 @@ -100,10 +100,10 @@ - + - diff -r 183c3e96f6c3 -r 361d8c89338a doc/de/mpg/mpiwg/itgroup/digilib/digiImage/class-use/DigiImage.html --- a/doc/de/mpg/mpiwg/itgroup/digilib/digiImage/class-use/DigiImage.html Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/de/mpg/mpiwg/itgroup/digilib/digiImage/class-use/DigiImage.html Sat Jun 18 09:53:01 2011 +0200 @@ -94,7 +94,7 @@ - +
de.mpg.mpiwg.itgroup.digilib.plugin.Activatorde.mpg.mpiwg.itgroup.digilib.core.plugin.Activator
+ public static final java.lang.String PLUGIN_ID "de.mpg.mpiwg.itgroup.diglib.plugin"  
de.mpg.mpiwg.itgroup.digilib.plugin.editorsde.mpg.mpiwg.itgroup.digilib.core.plugin.editors   
@@ -139,11 +139,11 @@
 

- + +Uses of DigiImage in de.mpg.mpiwg.itgroup.digilib.core.plugin.editors
-Uses of DigiImage in de.mpg.mpiwg.itgroup.digilib.plugin.editors
  @@ -151,7 +151,7 @@ - + - +
Methods in de.mpg.mpiwg.itgroup.digilib.plugin.editors with parameters of type DigiImageMethods in de.mpg.mpiwg.itgroup.digilib.core.plugin.editors with parameters of type DigiImage
diff -r 183c3e96f6c3 -r 361d8c89338a doc/de/mpg/mpiwg/itgroup/digilib/digiImage/package-use.html --- a/doc/de/mpg/mpiwg/itgroup/digilib/digiImage/package-use.html Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/de/mpg/mpiwg/itgroup/digilib/digiImage/package-use.html Sat Jun 18 09:53:01 2011 +0200 @@ -110,7 +110,7 @@   
de.mpg.mpiwg.itgroup.digilib.plugin.editorsde.mpg.mpiwg.itgroup.digilib.core.plugin.editors   
@@ -210,14 +210,14 @@

 

- + +Classes in de.mpg.mpiwg.itgroup.digilib.digiImage used by de.mpg.mpiwg.itgroup.digilib.core.plugin.editors - diff -r 183c3e96f6c3 -r 361d8c89338a doc/de/mpg/mpiwg/itgroup/digilib/plugin/Activator.html --- a/doc/de/mpg/mpiwg/itgroup/digilib/plugin/Activator.html Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/de/mpg/mpiwg/itgroup/digilib/plugin/Activator.html Sat Jun 18 09:53:01 2011 +0200 @@ -56,7 +56,7 @@ + NEXT CLASS +static ActivatorNEXT CLASS - + @@ -81,26 +81,26 @@

-Uses of Class
de.mpg.mpiwg.itgroup.digilib.plugin.Activator

+Uses of Class
de.mpg.mpiwg.itgroup.digilib.core.plugin.Activator
-Classes in de.mpg.mpiwg.itgroup.digilib.digiImage used by de.mpg.mpiwg.itgroup.digilib.plugin.editors
DigiImage +DigiImage
          Refers to an Digilib-Scaler Object either an image or an folder.
-static Activator getDefault()
@@ -244,7 +244,7 @@ public static final java.lang.String PLUGIN_ID
-
See Also:
Constant Field Values
+
See Also:
Constant Field Values
@@ -313,7 +313,7 @@

getDefault

-public static Activator getDefault()
+public static Activator getDefault()
Returns the shared instance

@@ -369,7 +369,7 @@

+Packages that use Activator - +
-Packages that use Activator
de.mpg.mpiwg.itgroup.digilib.pluginde.mpg.mpiwg.itgroup.digilib.core.plugin   
 

- + +Uses of Activator in de.mpg.mpiwg.itgroup.digilib.core.plugin
-Uses of Activator in de.mpg.mpiwg.itgroup.digilib.plugin
  @@ -108,11 +108,11 @@ - + +static Activator - + diff -r 183c3e96f6c3 -r 361d8c89338a doc/de/mpg/mpiwg/itgroup/digilib/plugin/class-use/DigilibHandler.html --- a/doc/de/mpg/mpiwg/itgroup/digilib/plugin/class-use/DigilibHandler.html Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/de/mpg/mpiwg/itgroup/digilib/plugin/class-use/DigilibHandler.html Sat Jun 18 09:53:01 2011 +0200 @@ -4,7 +4,7 @@ -Uses of Class de.mpg.mpiwg.itgroup.digilib.plugin.DigilibHandler +Uses of Class de.mpg.mpiwg.itgroup.digilib.core.plugin.DigilibHandler @@ -15,7 +15,7 @@ function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="Uses of Class de.mpg.mpiwg.itgroup.digilib.plugin.DigilibHandler"; + parent.document.title="Uses of Class de.mpg.mpiwg.itgroup.digilib.core.plugin.DigilibHandler"; } } @@ -39,7 +39,7 @@ - + @@ -81,9 +81,9 @@

-Uses of Class
de.mpg.mpiwg.itgroup.digilib.plugin.DigilibHandler

+Uses of Class
de.mpg.mpiwg.itgroup.digilib.core.plugin.DigilibHandler
-No usage of de.mpg.mpiwg.itgroup.digilib.plugin.DigilibHandler +No usage of de.mpg.mpiwg.itgroup.digilib.core.plugin.DigilibHandler


@@ -99,7 +99,7 @@ - + diff -r 183c3e96f6c3 -r 361d8c89338a doc/de/mpg/mpiwg/itgroup/digilib/plugin/editors/DigilibLinkEditorContributor.html --- a/doc/de/mpg/mpiwg/itgroup/digilib/plugin/editors/DigilibLinkEditorContributor.html Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/de/mpg/mpiwg/itgroup/digilib/plugin/editors/DigilibLinkEditorContributor.html Sat Jun 18 09:53:01 2011 +0200 @@ -56,7 +56,7 @@ + NEXT CLASSNEXT CLASSPREV CLASS  + NEXT CLASSPREV CLASS  + NEXT CLASSPREV CLASS  + NEXT CLASS +static DigilibLinkEditorObservablePREV CLASS  + NEXT CLASS - + @@ -81,9 +81,9 @@

-Uses of Class
de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorContributor

+Uses of Class
de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorContributor
-No usage of de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorContributor +No usage of de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorContributor


@@ -99,7 +99,7 @@ - + diff -r 183c3e96f6c3 -r 361d8c89338a doc/de/mpg/mpiwg/itgroup/digilib/plugin/editors/class-use/DigilibLinkEditorInput.html --- a/doc/de/mpg/mpiwg/itgroup/digilib/plugin/editors/class-use/DigilibLinkEditorInput.html Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/de/mpg/mpiwg/itgroup/digilib/plugin/editors/class-use/DigilibLinkEditorInput.html Sat Jun 18 09:53:01 2011 +0200 @@ -4,7 +4,7 @@ -Uses of Class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorInput +Uses of Class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorInput @@ -15,7 +15,7 @@ function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="Uses of Class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorInput"; + parent.document.title="Uses of Class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorInput"; } } @@ -39,7 +39,7 @@ - + @@ -81,9 +81,9 @@

-Uses of Class
de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorInput

+Uses of Class
de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorInput
-No usage of de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorInput +No usage of de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorInput


@@ -99,7 +99,7 @@ - + diff -r 183c3e96f6c3 -r 361d8c89338a doc/de/mpg/mpiwg/itgroup/digilib/plugin/editors/class-use/DigilibLinkEditorObservable.html --- a/doc/de/mpg/mpiwg/itgroup/digilib/plugin/editors/class-use/DigilibLinkEditorObservable.html Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/de/mpg/mpiwg/itgroup/digilib/plugin/editors/class-use/DigilibLinkEditorObservable.html Sat Jun 18 09:53:01 2011 +0200 @@ -4,7 +4,7 @@ -Uses of Class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorObservable +Uses of Class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorObservable @@ -15,7 +15,7 @@ function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="Uses of Class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorObservable"; + parent.document.title="Uses of Class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorObservable"; } } @@ -39,7 +39,7 @@ - + @@ -81,26 +81,26 @@

-Uses of Class
de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorObservable

+Uses of Class
de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorObservable
Methods in de.mpg.mpiwg.itgroup.digilib.plugin that return ActivatorMethods in de.mpg.mpiwg.itgroup.digilib.core.plugin that return Activator
-static Activator Activator.getDefault()
@@ -135,7 +135,7 @@
-static DigilibLinkEditorObservable INSTANCE
@@ -182,7 +182,7 @@

INSTANCE

-public static final DigilibLinkEditorObservable INSTANCE
+public static final DigilibLinkEditorObservable INSTANCE
@@ -249,8 +249,8 @@
+Packages that use DigilibLinkEditorObservable - +
-Packages that use DigilibLinkEditorObservable
de.mpg.mpiwg.itgroup.digilib.plugin.editorsde.mpg.mpiwg.itgroup.digilib.core.plugin.editors   
 

- + +Uses of DigilibLinkEditorObservable in de.mpg.mpiwg.itgroup.digilib.core.plugin.editors
-Uses of DigilibLinkEditorObservable in de.mpg.mpiwg.itgroup.digilib.plugin.editors
  @@ -108,11 +108,11 @@ - + +static DigilibLinkEditorObservable - + diff -r 183c3e96f6c3 -r 361d8c89338a doc/de/mpg/mpiwg/itgroup/digilib/plugin/editors/class-use/DigilibLinkEditorPart.html --- a/doc/de/mpg/mpiwg/itgroup/digilib/plugin/editors/class-use/DigilibLinkEditorPart.html Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/de/mpg/mpiwg/itgroup/digilib/plugin/editors/class-use/DigilibLinkEditorPart.html Sat Jun 18 09:53:01 2011 +0200 @@ -4,7 +4,7 @@ -Uses of Class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorPart +Uses of Class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorPart @@ -15,7 +15,7 @@ function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="Uses of Class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorPart"; + parent.document.title="Uses of Class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorPart"; } } @@ -39,7 +39,7 @@ - + @@ -81,9 +81,9 @@

-Uses of Class
de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorPart

+Uses of Class
de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorPart
-No usage of de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorPart +No usage of de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorPart


@@ -99,7 +99,7 @@ - + diff -r 183c3e96f6c3 -r 361d8c89338a doc/de/mpg/mpiwg/itgroup/digilib/plugin/editors/package-frame.html --- a/doc/de/mpg/mpiwg/itgroup/digilib/plugin/editors/package-frame.html Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/de/mpg/mpiwg/itgroup/digilib/plugin/editors/package-frame.html Sat Jun 18 09:53:01 2011 +0200 @@ -4,7 +4,7 @@ -de.mpg.mpiwg.itgroup.digilib.plugin.editors +de.mpg.mpiwg.itgroup.digilib.core.plugin.editors @@ -16,20 +16,20 @@ -de.mpg.mpiwg.itgroup.digilib.plugin.editors +de.mpg.mpiwg.itgroup.digilib.core.plugin.editors
Fields in de.mpg.mpiwg.itgroup.digilib.plugin.editors declared as DigilibLinkEditorObservableFields in de.mpg.mpiwg.itgroup.digilib.core.plugin.editors declared as DigilibLinkEditorObservable
-static DigilibLinkEditorObservable DigilibLinkEditorObservable.INSTANCE
@@ -135,7 +135,7 @@
+DigilibLinkEditorPart
Classes 
-DigilibLinkEditorContributor +DigilibLinkEditorContributor
-DigilibLinkEditorInput +DigilibLinkEditorInput
-DigilibLinkEditorObservable +DigilibLinkEditorObservable
-DigilibLinkEditorPart
diff -r 183c3e96f6c3 -r 361d8c89338a doc/de/mpg/mpiwg/itgroup/digilib/plugin/editors/package-summary.html --- a/doc/de/mpg/mpiwg/itgroup/digilib/plugin/editors/package-summary.html Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/de/mpg/mpiwg/itgroup/digilib/plugin/editors/package-summary.html Sat Jun 18 09:53:01 2011 +0200 @@ -4,7 +4,7 @@ -de.mpg.mpiwg.itgroup.digilib.plugin.editors +de.mpg.mpiwg.itgroup.digilib.core.plugin.editors @@ -15,7 +15,7 @@ function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="de.mpg.mpiwg.itgroup.digilib.plugin.editors"; + parent.document.title="de.mpg.mpiwg.itgroup.digilib.core.plugin.editors"; } } @@ -80,7 +80,7 @@


-Package de.mpg.mpiwg.itgroup.digilib.plugin.editors +Package de.mpg.mpiwg.itgroup.digilib.core.plugin.editors

@@ -89,19 +89,19 @@ Class Summary - + - - + + - + - +
DigilibLinkEditorContributorDigilibLinkEditorContributor Manages the installation/deinstallation of global actions for multi-page editors.
DigilibLinkEditorInputEditor input for DigilibLinkEditorPartDigilibLinkEditorInputEditor input for DigilibLinkEditorPart
DigilibLinkEditorObservableDigilibLinkEditorObservable  
DigilibLinkEditorPartDigilibLinkEditorPart Displays an image with digilib an allows image manipulation on the image.
diff -r 183c3e96f6c3 -r 361d8c89338a doc/de/mpg/mpiwg/itgroup/digilib/plugin/editors/package-tree.html --- a/doc/de/mpg/mpiwg/itgroup/digilib/plugin/editors/package-tree.html Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/de/mpg/mpiwg/itgroup/digilib/plugin/editors/package-tree.html Sat Jun 18 09:53:01 2011 +0200 @@ -4,7 +4,7 @@ -de.mpg.mpiwg.itgroup.digilib.plugin.editors Class Hierarchy +de.mpg.mpiwg.itgroup.digilib.core.plugin.editors Class Hierarchy @@ -15,7 +15,7 @@ function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="de.mpg.mpiwg.itgroup.digilib.plugin.editors Class Hierarchy"; + parent.document.title="de.mpg.mpiwg.itgroup.digilib.core.plugin.editors Class Hierarchy"; } } @@ -81,7 +81,7 @@

-Hierarchy For Package de.mpg.mpiwg.itgroup.digilib.plugin.editors +Hierarchy For Package de.mpg.mpiwg.itgroup.digilib.core.plugin.editors

@@ -92,23 +92,23 @@
diff -r 183c3e96f6c3 -r 361d8c89338a doc/de/mpg/mpiwg/itgroup/digilib/plugin/editors/package-use.html --- a/doc/de/mpg/mpiwg/itgroup/digilib/plugin/editors/package-use.html Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/de/mpg/mpiwg/itgroup/digilib/plugin/editors/package-use.html Sat Jun 18 09:53:01 2011 +0200 @@ -4,7 +4,7 @@ -Uses of Package de.mpg.mpiwg.itgroup.digilib.plugin.editors +Uses of Package de.mpg.mpiwg.itgroup.digilib.core.plugin.editors @@ -15,7 +15,7 @@ function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="Uses of Package de.mpg.mpiwg.itgroup.digilib.plugin.editors"; + parent.document.title="Uses of Package de.mpg.mpiwg.itgroup.digilib.core.plugin.editors"; } } @@ -81,29 +81,29 @@

-Uses of Package
de.mpg.mpiwg.itgroup.digilib.plugin.editors

+Uses of Package
de.mpg.mpiwg.itgroup.digilib.core.plugin.editors
+Packages that use de.mpg.mpiwg.itgroup.digilib.core.plugin.editors - +
-Packages that use de.mpg.mpiwg.itgroup.digilib.plugin.editors
de.mpg.mpiwg.itgroup.digilib.plugin.editorsde.mpg.mpiwg.itgroup.digilib.core.plugin.editors   
 

- + +Classes in de.mpg.mpiwg.itgroup.digilib.core.plugin.editors used by de.mpg.mpiwg.itgroup.digilib.core.plugin.editors - diff -r 183c3e96f6c3 -r 361d8c89338a doc/de/mpg/mpiwg/itgroup/digilib/plugin/package-frame.html --- a/doc/de/mpg/mpiwg/itgroup/digilib/plugin/package-frame.html Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/de/mpg/mpiwg/itgroup/digilib/plugin/package-frame.html Sat Jun 18 09:53:01 2011 +0200 @@ -4,7 +4,7 @@ -de.mpg.mpiwg.itgroup.digilib.plugin +de.mpg.mpiwg.itgroup.digilib.core.plugin @@ -16,16 +16,16 @@ -de.mpg.mpiwg.itgroup.digilib.plugin +de.mpg.mpiwg.itgroup.digilib.core.plugin
-Classes in de.mpg.mpiwg.itgroup.digilib.plugin.editors used by de.mpg.mpiwg.itgroup.digilib.plugin.editors
DigilibLinkEditorObservable +DigilibLinkEditorObservable
           
+DigilibHandler
Classes 
-Activator +Activator
-DigilibHandler
diff -r 183c3e96f6c3 -r 361d8c89338a doc/de/mpg/mpiwg/itgroup/digilib/plugin/package-summary.html --- a/doc/de/mpg/mpiwg/itgroup/digilib/plugin/package-summary.html Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/de/mpg/mpiwg/itgroup/digilib/plugin/package-summary.html Sat Jun 18 09:53:01 2011 +0200 @@ -4,7 +4,7 @@ -de.mpg.mpiwg.itgroup.digilib.plugin +de.mpg.mpiwg.itgroup.digilib.core.plugin @@ -15,7 +15,7 @@ function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="de.mpg.mpiwg.itgroup.digilib.plugin"; + parent.document.title="de.mpg.mpiwg.itgroup.digilib.core.plugin"; } } @@ -80,7 +80,7 @@


-Package de.mpg.mpiwg.itgroup.digilib.plugin +Package de.mpg.mpiwg.itgroup.digilib.core.plugin

@@ -89,11 +89,11 @@ Class Summary - + - +
ActivatorActivator The activator class controls the plug-in life cycle
DigilibHandlerDigilibHandler  
diff -r 183c3e96f6c3 -r 361d8c89338a doc/de/mpg/mpiwg/itgroup/digilib/plugin/package-tree.html --- a/doc/de/mpg/mpiwg/itgroup/digilib/plugin/package-tree.html Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/de/mpg/mpiwg/itgroup/digilib/plugin/package-tree.html Sat Jun 18 09:53:01 2011 +0200 @@ -4,7 +4,7 @@ -de.mpg.mpiwg.itgroup.digilib.plugin Class Hierarchy +de.mpg.mpiwg.itgroup.digilib.core.plugin Class Hierarchy @@ -15,7 +15,7 @@ function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="de.mpg.mpiwg.itgroup.digilib.plugin Class Hierarchy"; + parent.document.title="de.mpg.mpiwg.itgroup.digilib.core.plugin Class Hierarchy"; } } @@ -81,7 +81,7 @@

-Hierarchy For Package de.mpg.mpiwg.itgroup.digilib.plugin +Hierarchy For Package de.mpg.mpiwg.itgroup.digilib.core.plugin

@@ -92,11 +92,11 @@
  • java.lang.Object
      -
    • de.mpg.mpiwg.itgroup.digilib.plugin.DigilibHandler (implements org.eclipse.core.commands.IHandler) +
    • de.mpg.mpiwg.itgroup.digilib.core.plugin.DigilibHandler (implements org.eclipse.core.commands.IHandler)
    • org.eclipse.core.runtime.Plugin (implements org.osgi.framework.BundleActivator)
      • org.eclipse.ui.plugin.AbstractUIPlugin
          -
        • de.mpg.mpiwg.itgroup.digilib.plugin.Activator
        +
      • de.mpg.mpiwg.itgroup.digilib.core.plugin.Activator
diff -r 183c3e96f6c3 -r 361d8c89338a doc/de/mpg/mpiwg/itgroup/digilib/plugin/package-use.html --- a/doc/de/mpg/mpiwg/itgroup/digilib/plugin/package-use.html Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/de/mpg/mpiwg/itgroup/digilib/plugin/package-use.html Sat Jun 18 09:53:01 2011 +0200 @@ -4,7 +4,7 @@ -Uses of Package de.mpg.mpiwg.itgroup.digilib.plugin +Uses of Package de.mpg.mpiwg.itgroup.digilib.core.plugin @@ -15,7 +15,7 @@ function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="Uses of Package de.mpg.mpiwg.itgroup.digilib.plugin"; + parent.document.title="Uses of Package de.mpg.mpiwg.itgroup.digilib.core.plugin"; } } @@ -81,29 +81,29 @@

-Uses of Package
de.mpg.mpiwg.itgroup.digilib.plugin

+Uses of Package
de.mpg.mpiwg.itgroup.digilib.core.plugin
+Packages that use de.mpg.mpiwg.itgroup.digilib.core.plugin - +
-Packages that use de.mpg.mpiwg.itgroup.digilib.plugin
de.mpg.mpiwg.itgroup.digilib.pluginde.mpg.mpiwg.itgroup.digilib.core.plugin   
 

- + +Classes in de.mpg.mpiwg.itgroup.digilib.core.plugin used by de.mpg.mpiwg.itgroup.digilib.core.plugin - diff -r 183c3e96f6c3 -r 361d8c89338a doc/index-files/index-1.html --- a/doc/index-files/index-1.html Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/index-files/index-1.html Sat Jun 18 09:53:01 2011 +0200 @@ -82,11 +82,11 @@

A

-
Activator - Class in de.mpg.mpiwg.itgroup.digilib.plugin
The activator class controls the plug-in life cycle
Activator() - -Constructor for class de.mpg.mpiwg.itgroup.digilib.plugin.Activator +
Activator - Class in de.mpg.mpiwg.itgroup.digilib.core.plugin
The activator class controls the plug-in life cycle
Activator() - +Constructor for class de.mpg.mpiwg.itgroup.digilib.core.plugin.Activator
The constructor
addHandlerListener(IHandlerListener) - -Method in class de.mpg.mpiwg.itgroup.digilib.plugin.DigilibHandler +Method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.DigilibHandler
 

diff -r 183c3e96f6c3 -r 361d8c89338a doc/index-files/index-11.html --- a/doc/index-files/index-11.html Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/index-files/index-11.html Sat Jun 18 09:53:01 2011 +0200 @@ -86,7 +86,7 @@ Constructor for class de.mpg.mpiwg.itgroup.indexMeta.Utils.ParseIndexMeta
 
PLUGIN_ID - -Static variable in class de.mpg.mpiwg.itgroup.digilib.plugin.Activator +Static variable in class de.mpg.mpiwg.itgroup.digilib.core.plugin.Activator
 
prevPage() - Method in class de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageController diff -r 183c3e96f6c3 -r 361d8c89338a doc/index-files/index-12.html --- a/doc/index-files/index-12.html Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/index-files/index-12.html Sat Jun 18 09:53:01 2011 +0200 @@ -89,13 +89,13 @@ Method in interface de.mpg.mpiwg.itgroup.digilib.digiImage.IDigiImage
Draws the image defined by the parameter set.
removeHandlerListener(IHandlerListener) - -Method in class de.mpg.mpiwg.itgroup.digilib.plugin.DigilibHandler +Method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.DigilibHandler
 
reset() - Method in class de.mpg.mpiwg.itgroup.digilib.manipulator.extensions.ZoomAreaRectangleListener
 
resourceChanged(IResourceChangeEvent) - -Method in class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorPart +Method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorPart
 
rotate(float) - Method in class de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageController diff -r 183c3e96f6c3 -r 361d8c89338a doc/index-files/index-13.html --- a/doc/index-files/index-13.html Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/index-files/index-13.html Sat Jun 18 09:53:01 2011 +0200 @@ -98,7 +98,7 @@ Constructor for class de.mpg.mpiwg.itgroup.digilib.listener.SelectNavigationListener
 
setActivePage(IEditorPart) - -Method in class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorContributor +Method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorContributor
 
setBaseUrl(String) - Method in class de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImage @@ -110,7 +110,7 @@ Method in class de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageParameter
 
setCursorStatus(int) - -Method in class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorObservable +Method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorObservable
 
setDdpi(int) - Method in class de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageParameter @@ -128,13 +128,13 @@ Method in class de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageParameter
 
setFile(IFile) - -Method in class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorInput +Method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorInput
 
setFn(String) - Method in class de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageParameter
 
setFocus() - -Method in class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorPart +Method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorPart
 
setIconPaths(String, String) - Method in class de.mpg.mpiwg.itgroup.digilib.manipulator.extensions.ManipulatorExtension @@ -182,7 +182,7 @@ Method in class de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageParameter
 
setType(int) - -Method in class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorInput +Method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorInput
 
setWh(float) - Method in class de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageParameter @@ -200,10 +200,10 @@ Method in class de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageParameter
 
start(BundleContext) - -Method in class de.mpg.mpiwg.itgroup.digilib.plugin.Activator +Method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.Activator
 
stop(BundleContext) - -Method in class de.mpg.mpiwg.itgroup.digilib.plugin.Activator +Method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.Activator
 
diff -r 183c3e96f6c3 -r 361d8c89338a doc/index-files/index-15.html --- a/doc/index-files/index-15.html Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/index-files/index-15.html Sat Jun 18 09:53:01 2011 +0200 @@ -83,7 +83,7 @@ U
update(Observable, Object) - -Method in class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorPart +Method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorPart
 

diff -r 183c3e96f6c3 -r 361d8c89338a doc/index-files/index-2.html --- a/doc/index-files/index-2.html Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/index-files/index-2.html Sat Jun 18 09:53:01 2011 +0200 @@ -83,10 +83,10 @@ C
contributeToMenu(IMenuManager) - -Method in class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorContributor +Method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorContributor
 
contributeToToolBar(IToolBarManager) - -Method in class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorContributor +Method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorContributor
 
createImage(Composite) - Method in class de.mpg.mpiwg.itgroup.digilib.manipulator.extensions.ManipulatorExtension @@ -95,7 +95,7 @@ Method in interface de.mpg.mpiwg.itgroup.digilib.manipulator.IDigilibImageManipulator
 
createPartControl(Composite) - -Method in class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorPart +Method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorPart
 

diff -r 183c3e96f6c3 -r 361d8c89338a doc/index-files/index-3.html --- a/doc/index-files/index-3.html Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/index-files/index-3.html Sat Jun 18 09:53:01 2011 +0200 @@ -82,7 +82,7 @@

D

-
de.mpg.mpiwg.itgroup.digilib.digiImage - package de.mpg.mpiwg.itgroup.digilib.digiImage
 
de.mpg.mpiwg.itgroup.digilib.digiImage.exceptions - package de.mpg.mpiwg.itgroup.digilib.digiImage.exceptions
 
de.mpg.mpiwg.itgroup.digilib.listener - package de.mpg.mpiwg.itgroup.digilib.listener
 
de.mpg.mpiwg.itgroup.digilib.manipulator - package de.mpg.mpiwg.itgroup.digilib.manipulator
 
de.mpg.mpiwg.itgroup.digilib.manipulator.extensions - package de.mpg.mpiwg.itgroup.digilib.manipulator.extensions
 
de.mpg.mpiwg.itgroup.digilib.manipulator.extensions.dialogs - package de.mpg.mpiwg.itgroup.digilib.manipulator.extensions.dialogs
 
de.mpg.mpiwg.itgroup.digilib.plugin - package de.mpg.mpiwg.itgroup.digilib.plugin
 
de.mpg.mpiwg.itgroup.digilib.plugin.editors - package de.mpg.mpiwg.itgroup.digilib.plugin.editors
 
de.mpg.mpiwg.itgroup.indexMeta.Utils - package de.mpg.mpiwg.itgroup.indexMeta.Utils
 
DigiImage - Class in de.mpg.mpiwg.itgroup.digilib.digiImage
Refers to an Digilib-Scaler Object either an image or an folder.
DigiImage(Composite, int, DigiImageParameter) - +
de.mpg.mpiwg.itgroup.digilib.digiImage - package de.mpg.mpiwg.itgroup.digilib.digiImage
 
de.mpg.mpiwg.itgroup.digilib.digiImage.exceptions - package de.mpg.mpiwg.itgroup.digilib.digiImage.exceptions
 
de.mpg.mpiwg.itgroup.digilib.listener - package de.mpg.mpiwg.itgroup.digilib.listener
 
de.mpg.mpiwg.itgroup.digilib.manipulator - package de.mpg.mpiwg.itgroup.digilib.manipulator
 
de.mpg.mpiwg.itgroup.digilib.manipulator.extensions - package de.mpg.mpiwg.itgroup.digilib.manipulator.extensions
 
de.mpg.mpiwg.itgroup.digilib.manipulator.extensions.dialogs - package de.mpg.mpiwg.itgroup.digilib.manipulator.extensions.dialogs
 
de.mpg.mpiwg.itgroup.digilib.core.plugin - package de.mpg.mpiwg.itgroup.digilib.core.plugin
 
de.mpg.mpiwg.itgroup.digilib.core.plugin.editors - package de.mpg.mpiwg.itgroup.digilib.core.plugin.editors
 
de.mpg.mpiwg.itgroup.indexMeta.Utils - package de.mpg.mpiwg.itgroup.indexMeta.Utils
 
DigiImage - Class in de.mpg.mpiwg.itgroup.digilib.digiImage
Refers to an Digilib-Scaler Object either an image or an folder.
DigiImage(Composite, int, DigiImageParameter) - Constructor for class de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImage
 
digiImage - @@ -95,32 +95,32 @@ settings and parameter names are described in @see {@link http://developer.berlios.de/docman/?
DigiImageParameter(String) - Constructor for class de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageParameter
  -
DigilibHandler - Class in de.mpg.mpiwg.itgroup.digilib.plugin
 
DigilibHandler() - -Constructor for class de.mpg.mpiwg.itgroup.digilib.plugin.DigilibHandler +
DigilibHandler - Class in de.mpg.mpiwg.itgroup.digilib.core.plugin
 
DigilibHandler() - +Constructor for class de.mpg.mpiwg.itgroup.digilib.core.plugin.DigilibHandler
 
DigilibImageManipulatorProvider - Class in de.mpg.mpiwg.itgroup.digilib.manipulator
This singleton class manages the property extensions.
DigilibInputTypeException - Exception in de.mpg.mpiwg.itgroup.digilib.digiImage.exceptions
 
DigilibInputTypeException() - Constructor for exception de.mpg.mpiwg.itgroup.digilib.digiImage.exceptions.DigilibInputTypeException
  -
DigilibLinkEditorContributor - Class in de.mpg.mpiwg.itgroup.digilib.plugin.editors
Manages the installation/deinstallation of global actions for multi-page editors.
DigilibLinkEditorContributor() - -Constructor for class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorContributor +
DigilibLinkEditorContributor - Class in de.mpg.mpiwg.itgroup.digilib.core.plugin.editors
Manages the installation/deinstallation of global actions for multi-page editors.
DigilibLinkEditorContributor() - +Constructor for class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorContributor
Creates a multi-page contributor. -
DigilibLinkEditorInput - Class in de.mpg.mpiwg.itgroup.digilib.plugin.editors
Editor input for DigilibLinkEditorPart
DigilibLinkEditorInput(IFile, int) - -Constructor for class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorInput +
DigilibLinkEditorInput - Class in de.mpg.mpiwg.itgroup.digilib.core.plugin.editors
Editor input for DigilibLinkEditorPart
DigilibLinkEditorInput(IFile, int) - +Constructor for class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorInput
  -
DigilibLinkEditorObservable - Class in de.mpg.mpiwg.itgroup.digilib.plugin.editors
 
DigilibLinkEditorPart - Class in de.mpg.mpiwg.itgroup.digilib.plugin.editors
Displays an image with digilib an allows image manipulation on the image.
DigilibLinkEditorPart() - -Constructor for class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorPart +
DigilibLinkEditorObservable - Class in de.mpg.mpiwg.itgroup.digilib.core.plugin.editors
 
DigilibLinkEditorPart - Class in de.mpg.mpiwg.itgroup.digilib.core.plugin.editors
Displays an image with digilib an allows image manipulation on the image.
DigilibLinkEditorPart() - +Constructor for class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorPart
 
DigiNav - Class in de.mpg.mpiwg.itgroup.digilib.digiImage
 
DigiNav(Composite, int, DigiImageController) - Constructor for class de.mpg.mpiwg.itgroup.digilib.digiImage.DigiNav
Creates a composite showing the registered navigation elements provided by @see DigilibImageManipulatorProvider.
dispose() - -Method in class de.mpg.mpiwg.itgroup.digilib.plugin.DigilibHandler +Method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.DigilibHandler
 
doSave(IProgressMonitor) - -Method in class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorPart +Method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorPart
 
doSaveAs() - -Method in class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorPart +Method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorPart
 

diff -r 183c3e96f6c3 -r 361d8c89338a doc/index-files/index-4.html --- a/doc/index-files/index-4.html Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/index-files/index-4.html Sat Jun 18 09:53:01 2011 +0200 @@ -83,10 +83,10 @@ E
execute(ExecutionEvent) - -Method in class de.mpg.mpiwg.itgroup.digilib.plugin.DigilibHandler +Method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.DigilibHandler
 
exists() - -Method in class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorInput +Method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorInput
 

diff -r 183c3e96f6c3 -r 361d8c89338a doc/index-files/index-5.html --- a/doc/index-files/index-5.html Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/index-files/index-5.html Sat Jun 18 09:53:01 2011 +0200 @@ -83,7 +83,7 @@ G
getAdapter(Class) - -Method in class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorInput +Method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorInput
 
getAllManipulators() - Method in class de.mpg.mpiwg.itgroup.digilib.manipulator.DigilibImageManipulatorProvider @@ -107,7 +107,7 @@ Method in class de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageParameter
 
getDefault() - -Static method in class de.mpg.mpiwg.itgroup.digilib.plugin.Activator +Static method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.Activator
Returns the shared instance
getDh() - Method in class de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageParameter @@ -116,17 +116,17 @@ Method in class de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageParameter
 
getFile() - -Method in class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorInput +Method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorInput
 
getFn() - Method in class de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageParameter
 
getImageDescriptor(String) - -Static method in class de.mpg.mpiwg.itgroup.digilib.plugin.Activator +Static method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.Activator
Returns an image descriptor for the image file at the given plug-in relative path
getImageDescriptor() - -Method in class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorInput +Method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorInput
 
getImagePath() - Method in class de.mpg.mpiwg.itgroup.digilib.manipulator.extensions.ManipulatorExtension @@ -153,7 +153,7 @@ Method in class de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageParameter
 
getName() - -Method in class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorInput +Method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorInput
 
getParameter() - Method in class de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImage @@ -171,7 +171,7 @@ Method in class de.mpg.mpiwg.itgroup.indexMeta.Utils.ParseIndexMeta
 
getPersistable() - -Method in class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorInput +Method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorInput
 
getPn() - Method in class de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageParameter @@ -192,10 +192,10 @@ Method in class de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageParameter
 
getToolTipText() - -Method in class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorInput +Method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorInput
 
getType() - -Method in class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorInput +Method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorInput
 
getWh() - Method in class de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageParameter diff -r 183c3e96f6c3 -r 361d8c89338a doc/index-files/index-7.html --- a/doc/index-files/index-7.html Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/index-files/index-7.html Sat Jun 18 09:53:01 2011 +0200 @@ -137,31 +137,31 @@ Variable in class de.mpg.mpiwg.itgroup.digilib.manipulator.extensions.ZoomFull
 
IDigiImage - Interface in de.mpg.mpiwg.itgroup.digilib.digiImage
Interface for an general scalable image object.
IDigilibImageManipulator - Interface in de.mpg.mpiwg.itgroup.digilib.manipulator
Interface for the extensions for manipulation the digilib extensions
imageHasChanged(DigiImage) - -Method in class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorObservable +Method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorObservable
 
INDEX_META - -Static variable in class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorInput +Static variable in class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorInput
 
init(IEditorSite, IEditorInput) - -Method in class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorPart +Method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorPart
 
INSTANCE - Static variable in class de.mpg.mpiwg.itgroup.digilib.manipulator.DigilibImageManipulatorProvider
 
INSTANCE - -Static variable in class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorObservable +Static variable in class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorObservable
 
isDirty() - -Method in class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorPart +Method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorPart
 
isEnabled() - -Method in class de.mpg.mpiwg.itgroup.digilib.plugin.DigilibHandler +Method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.DigilibHandler
 
isHandled() - -Method in class de.mpg.mpiwg.itgroup.digilib.plugin.DigilibHandler +Method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.DigilibHandler
 
isSaveAsAllowed() - -Method in class de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorPart +Method in class de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorPart
 

diff -r 183c3e96f6c3 -r 361d8c89338a doc/overview-frame.html --- a/doc/overview-frame.html Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/overview-frame.html Sat Jun 18 09:53:01 2011 +0200 @@ -42,9 +42,9 @@
de.mpg.mpiwg.itgroup.digilib.manipulator.extensions.dialogs
-de.mpg.mpiwg.itgroup.digilib.plugin +de.mpg.mpiwg.itgroup.digilib.core.plugin
-de.mpg.mpiwg.itgroup.digilib.plugin.editors +de.mpg.mpiwg.itgroup.digilib.core.plugin.editors
de.mpg.mpiwg.itgroup.indexMeta.Utils
diff -r 183c3e96f6c3 -r 361d8c89338a doc/overview-summary.html --- a/doc/overview-summary.html Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/overview-summary.html Sat Jun 18 09:53:01 2011 +0200 @@ -110,11 +110,11 @@
- + - + diff -r 183c3e96f6c3 -r 361d8c89338a doc/overview-tree.html --- a/doc/overview-tree.html Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/overview-tree.html Sat Jun 18 09:53:01 2011 +0200 @@ -84,7 +84,7 @@ Hierarchy For All Packages
-
Package Hierarchies:
de.mpg.mpiwg.itgroup.digilib.digiImage, de.mpg.mpiwg.itgroup.digilib.digiImage.exceptions, de.mpg.mpiwg.itgroup.digilib.listener, de.mpg.mpiwg.itgroup.digilib.manipulator, de.mpg.mpiwg.itgroup.digilib.manipulator.extensions, de.mpg.mpiwg.itgroup.digilib.manipulator.extensions.dialogs, de.mpg.mpiwg.itgroup.digilib.plugin, de.mpg.mpiwg.itgroup.digilib.plugin.editors, de.mpg.mpiwg.itgroup.indexMeta.Utils
+
Package Hierarchies:
de.mpg.mpiwg.itgroup.digilib.digiImage, de.mpg.mpiwg.itgroup.digilib.digiImage.exceptions, de.mpg.mpiwg.itgroup.digilib.listener, de.mpg.mpiwg.itgroup.digilib.manipulator, de.mpg.mpiwg.itgroup.digilib.manipulator.extensions, de.mpg.mpiwg.itgroup.digilib.manipulator.extensions.dialogs, de.mpg.mpiwg.itgroup.digilib.core.plugin, de.mpg.mpiwg.itgroup.digilib.core.plugin.editors, de.mpg.mpiwg.itgroup.indexMeta.Utils

Class Hierarchy @@ -92,19 +92,19 @@
  • java.lang.Object
  • org.eclipse.core.commands.common.EventManager
    • org.eclipse.ui.part.WorkbenchPart (implements org.eclipse.core.runtime.IExecutableExtension, org.eclipse.ui.IWorkbenchPart3, org.eclipse.ui.part.IWorkbenchPartOrientation)
      • org.eclipse.ui.part.EditorPart (implements org.eclipse.ui.IEditorPart)
          -
        • de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorPart (implements org.eclipse.core.resources.IResourceChangeListener, java.util.Observer) +
        • de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorPart (implements org.eclipse.core.resources.IResourceChangeListener, java.util.Observer)
    @@ -112,11 +112,11 @@
    • de.mpg.mpiwg.itgroup.digilib.manipulator.extensions.MirrorHorizontal
    • de.mpg.mpiwg.itgroup.digilib.manipulator.extensions.MirrorVertical
    • de.mpg.mpiwg.itgroup.digilib.manipulator.extensions.NextPage
    • de.mpg.mpiwg.itgroup.digilib.manipulator.extensions.PrevPage
    • de.mpg.mpiwg.itgroup.digilib.manipulator.extensions.Rotate
    • de.mpg.mpiwg.itgroup.digilib.manipulator.extensions.ScaleDown
    • de.mpg.mpiwg.itgroup.digilib.manipulator.extensions.ScaleUp
    • de.mpg.mpiwg.itgroup.digilib.manipulator.extensions.ZoomArea
    • de.mpg.mpiwg.itgroup.digilib.manipulator.extensions.ZoomFull
  • java.util.Observable +
  • de.mpg.mpiwg.itgroup.digilib.core.plugin.editors.DigilibLinkEditorObservable
  • de.mpg.mpiwg.itgroup.indexMeta.Utils.ParseIndexMeta
  • org.eclipse.core.runtime.Plugin (implements org.osgi.framework.BundleActivator)
    • org.eclipse.ui.plugin.AbstractUIPlugin
        -
      • de.mpg.mpiwg.itgroup.digilib.plugin.Activator
      +
    • de.mpg.mpiwg.itgroup.digilib.core.plugin.Activator
  • de.mpg.mpiwg.itgroup.digilib.manipulator.extensions.dialogs.RotateDialog
  • de.mpg.mpiwg.itgroup.digilib.listener.SelectNavigationListener (implements org.eclipse.swt.events.MouseListener)
  • java.lang.Throwable (implements java.io.Serializable) diff -r 183c3e96f6c3 -r 361d8c89338a doc/package-list --- a/doc/package-list Mon Jan 10 12:01:25 2011 +0100 +++ b/doc/package-list Sat Jun 18 09:53:01 2011 +0200 @@ -4,6 +4,6 @@ de.mpg.mpiwg.itgroup.digilib.manipulator de.mpg.mpiwg.itgroup.digilib.manipulator.extensions de.mpg.mpiwg.itgroup.digilib.manipulator.extensions.dialogs -de.mpg.mpiwg.itgroup.digilib.plugin -de.mpg.mpiwg.itgroup.digilib.plugin.editors +de.mpg.mpiwg.itgroup.digilib.core.plugin +de.mpg.mpiwg.itgroup.digilib.core.plugin.editors de.mpg.mpiwg.itgroup.indexMeta.Utils diff -r 183c3e96f6c3 -r 361d8c89338a libs/jaxen-1.1.1.jar Binary file libs/jaxen-1.1.1.jar has changed diff -r 183c3e96f6c3 -r 361d8c89338a plugin.xml --- a/plugin.xml Mon Jan 10 12:01:25 2011 +0100 +++ b/plugin.xml Sat Jun 18 09:53:01 2011 +0200 @@ -2,55 +2,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + name="Show (digilib)"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a schema/DigilibImageManipulation.exsd --- a/schema/DigilibImageManipulation.exsd Mon Jan 10 12:01:25 2011 +0100 +++ b/schema/DigilibImageManipulation.exsd Sat Jun 18 09:53:01 2011 +0200 @@ -1,9 +1,9 @@ - + - + [Enter description of this extension point.] diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/digiImage/DigiImage.java --- a/src/de/mpg/mpiwg/itgroup/digilib/digiImage/DigiImage.java Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,280 +0,0 @@ -package de.mpg.mpiwg.itgroup.digilib.digiImage; - -import java.io.IOException; -import java.io.InputStream; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Map; - -import org.apache.commons.lang.StringUtils; -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.ISelectionChangedListener; -import org.eclipse.jface.viewers.ISelectionProvider; -import org.eclipse.jface.viewers.SelectionChangedEvent; -import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Label; -import org.eclipse.ui.views.properties.IPropertySource; - -import de.mpg.mpiwg.itgroup.digilib.digiImage.properties.DigiImageProperties; -import de.mpg.mpiwg.itgroup.digilib.manipulator.extensions.ZoomAreaRectangleListener; -import de.mpg.mpiwg.itgroup.digilib.plugin.Activator; -import de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorObservable; -import de.mpg.mpiwg.itgroup.digilib.plugin.preferences.PluginPreferencePage; - - - - -/** - * Refers to an Digilib-Scaler Object either an image or an folder. The object contains an swt-label object, so that it can be embedded e.g. in Eclipse. - * @author dwinter - * - */ -public class DigiImage implements IDigiImage, IAdaptable, ISelectionProvider{ - - /** - * Implemens a connection to Digilib. - */ - - - - private List selectionChangeListener = new ArrayList(); - - /* some parameters should not occur in the URL constructed by {@link #createUrlFromParameter(DigiImageParameter)} if set to negative values. - * - */ - private static String[] omitIfNegativeArray = {"dw","dh","ddpi","ddpix","ddpiy"}; - private static List omitIfNegative = Arrays.asList(omitIfNegativeArray); - - - //private String baseUrl="http://digilib.mpiwg-berlin.mpg.de/digitallibrary/servlet/Scaler"; - - /** - * Get the Url of the digilib scaler, set to http://digilib.mpiwg-berlin.mpg.de/digitallibrary/servlet/Scaler, if not changed. - * TODO should be part of a configuration/preference file - * @return - */ - public String getBaseUrl() { - return baseUrl; - } - - /** - * Setze die Basis url des Digilib-Scalers - * @param baseUrl - */ - public void setBaseUrl(String baseUrl) { - this.baseUrl = baseUrl; - } - - private Label label; - - /* (non-Javadoc) - * @see de.mpg.mpiwg.itgroup.digilib.digiImage.IDigiImage#getLabel() - */ - public Label getLabel() { - return label; - } - - /* (non-Javadoc) - * @see de.mpg.mpiwg.itgroup.digilib.digiImage.IDigiImage#setLabel(org.eclipse.swt.widgets.Label) - */ - public void setLabel(Label label) { - this.label = label; - } - - //private URL url; - private Composite parent; - - private DigiImageParameter dp; - - private String baseUrl; - - - /** - * - * @param parent Composite where the image should be become a child of. - * @param style SWT Style how to display the image as a composite. For more the the style parameter at @see import org.eclipse.swt.widgets.Label - * @param dp Set of Parameters which define how the image should be displayed. - */ - public DigiImage(Composite parent, int style, DigiImageParameter dp) { - //super(parent,style); - label = new Label(parent, style); - this.parent = parent; - this.dp=dp; - this.baseUrl = Activator.getDefault().getPreferenceStore().getString(PluginPreferencePage.baseUrl_id); - try { - setNewURL(createUrlFromParameter(dp)); - } catch (MalformedURLException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } - - /** - * Sets the complete URL of the manipulated image and changes the image object in the composite. - * @param url - */ - private void setNewURL(URL url) { - //this.url = url; - - - InputStream is; - try { - is = url.openStream(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - return; - } - Image img = new Image(parent.getDisplay(),is); - //Label label = new Label(parent, SWT.None); - label.setImage(img); - - label.setVisible(true); - } - - - /* (non-Javadoc) - * @see de.mpg.mpiwg.itgroup.digilib.digiImage.IDigiImage#getParent() - */ - public Composite getParent() { - return parent; - } - - - /** - * Creates the URL to digilib from the given parameter set. For the documentation @see {@link http://developer.berlios.de/docman/display_doc.php?docid=106&group_id=251}. - * @param dp - * @return - * @throws MalformedURLException - */ - private URL createUrlFromParameter(DigiImageParameter dp) throws MalformedURLException{ - - Map qa = dp.createMapFromParameters(omitIfNegative); - - List queryArray = new ArrayList(); - for(String key:qa.keySet()){ - queryArray.add(key+"="+qa.get(key)); - } - String queryString = StringUtils.join(queryArray,"&"); - - String stringUrl=baseUrl+"?"+queryString; - - return new URL(stringUrl); - } - - - - /* (non-Javadoc) - * @see de.mpg.mpiwg.itgroup.digilib.digiImage.IDigiImage#getParameter() - */ - public DigiImageParameter getParameter() { - - return dp; - } - - /* (non-Javadoc) - * @see de.mpg.mpiwg.itgroup.digilib.digiImage.IDigiImage#setParameter(de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageParameter) - */ - public void setParameter(DigiImageParameter dp) { - this.dp=dp; - - } - - /* (non-Javadoc) - * @see de.mpg.mpiwg.itgroup.digilib.digiImage.IDigiImage#redraw() - */ - public void redraw(){ - try { - setNewURL(createUrlFromParameter(dp)); - setSelection(new StructuredSelection(this)); - DigilibLinkEditorObservable.INSTANCE.imageHasChanged(this); - - } catch (MalformedURLException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - - private ZoomAreaRectangleListener rectangleListener=null; - - /* (non-Javadoc) - * @see de.mpg.mpiwg.itgroup.digilib.digiImage.IDigiImage#getRectangleListener() - */ - public ZoomAreaRectangleListener getRectangleListener() { - - return rectangleListener; - } - - /* (non-Javadoc) - * @see de.mpg.mpiwg.itgroup.digilib.digiImage.IDigiImage#setRectangleListener(de.mpg.mpiwg.itgroup.digilib.manipulator.extensions.RectangleListener) - */ - public void setRectangleListener(ZoomAreaRectangleListener rectangleListener) { - this.rectangleListener = rectangleListener; - } - - /* (non-Javadoc) - * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class) - * - * Digiimage shows properties if asked to. - */ - @SuppressWarnings("rawtypes") - public Object getAdapter(Class adapter) { - if (adapter == IPropertySource.class) - return new DigiImageProperties(this); - - return null; - - } - - /* (non-Javadoc) - * @see org.eclipse.jface.viewers.ISelectionProvider#addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener) - * Digiimage registeres selelection changers - */ - public void addSelectionChangedListener(ISelectionChangedListener listener) { - selectionChangeListener.add(listener); - - } - - /* (non-Javadoc) - * @see org.eclipse.jface.viewers.ISelectionProvider#getSelection() - * Selection is the object itself. - */ - public ISelection getSelection() { - - return new StructuredSelection(this); - } - - public void removeSelectionChangedListener( - ISelectionChangedListener listener) { - selectionChangeListener.remove(listener); - - } - - /* (non-Javadoc) - * @see org.eclipse.jface.viewers.ISelectionProvider#setSelection(org.eclipse.jface.viewers.ISelection) - * Informs all listeners that selection has changed. - */ - public void setSelection(ISelection selection) { - - for (ISelectionChangedListener sl: selectionChangeListener){ - SelectionChangedEvent event = new SelectionChangedEvent(this, selection); - sl.selectionChanged(event); - - - } - - } - - - -} - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/digiImage/DigiImageController.java --- a/src/de/mpg/mpiwg/itgroup/digilib/digiImage/DigiImageController.java Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,215 +0,0 @@ -package de.mpg.mpiwg.itgroup.digilib.digiImage; - -import java.util.ArrayList; -import java.util.List; - -import org.apache.commons.lang.StringUtils; -import org.eclipse.swt.graphics.Point; - - -/** Contains methods to manipulate an digilib image @see {#link de.mpiwg.itgroup.digilib.digiImage.Digimage}. - * The parameters are documented at the digilib pages @see {@link http://developer.berlios.de/docman/display_doc.php?docid=106&group_id=251}. - * - */ - -public class DigiImageController{ - - public static String VMIR="vmir"; // vertical mirroring - public static String HMIR="hmir"; // horizontal mirroring - - public DigiImage digiImage; // the image to be controlled. - //private DigiImageParameter parameter; - - - protected DigiImageController(){} - - /** Create a new controller on the image object. - * - * @param di - */ - public DigiImageController(DigiImage di){ - this.digiImage=di; - } - - - - /** Mirrors the image - * @param modes can be @see {@value #VMIR} or {@link #HMIR}. - */ - public void mir(String mode) { - - DigiImageParameter dp = digiImage.getParameter(); - - String parameter = dp.getMo(); - - - // mo kann mehrere durch komma getrennte parameter haben - String[] splittmo= parameter.split(","); - Boolean hasMir = false; - List newmo = new ArrayList(); - for(String m: splittmo){ - if (m.equals(mode)){ - hasMir=true; - } else { - newmo.add(m); - } - } - if(!hasMir){ // kein hmir dann dazufuegen - newmo.add(mode); - } - String newmoString = StringUtils.join(newmo,","); - - dp.setMo(newmoString); - - - digiImage.setParameter(dp); - digiImage.redraw(); - } - - - public void vmir() { - mir(VMIR); - - } - - public void hmir() { - mir(HMIR); - - } - - public void rotate(float rotateValue) { - digiImage.getParameter().setRot(rotateValue); - digiImage.redraw(); - } - - - - -/** Zoom the area given by the rectangle (x,y), (x2,y2). Alle point are given in absolute coordinates. - * @param x - * @param y - * @param x2 - * @param y2 - */ -public void zoomArea(int x, int y, int x2, int y2) { - - Point size = digiImage.getLabel().getSize(); - - float relx = new Float(x)/new Float(size.x); - float rely = new Float(y)/new Float(size.y); - - float relx2 = new Float(x2)/new Float(size.x); - float rely2 = new Float(y2)/new Float(size.y); - - DigiImageParameter dp = digiImage.getParameter(); - - float Ww = dp.getWw(); - float Wh = dp.getWh(); - - float Wx = dp.getWx(); - float Wy = dp.getWy(); - - - float nWx = relx*Ww+Wx; - float nWy = rely*Wh+Wy; - - float nWw = (relx2-relx)*Ww; - float nWh = (rely2-rely)*Wh; - - - - dp.setWx(nWx); - dp.setWy(nWy); - dp.setWw(nWw); - dp.setWh(nWh); - digiImage.setParameter(dp); - digiImage.redraw(); - - - // setRot(rotateValue); -} - - /** - * Show the whole image. - * - */ - public void zoomFull(){ - DigiImageParameter dp = digiImage.getParameter(); - dp.setWw(1); - dp.setWh(1); - - dp.setWx(0); - dp.setWy(0); - - digiImage.setParameter(dp); - digiImage.redraw(); - } - - /** - * scales the image down (ws --> ws-1) - * - */ - public void scaleDown() { - DigiImageParameter dp = digiImage.getParameter(); - float ws = dp.getWs(); - if (ws>1){ - dp.setWs(ws-1); - digiImage.setParameter(dp); - digiImage.redraw(); - - } - - } - - /** - * scales the image up (ws --> ws+1) - * - */ - public void scaleUp() { - DigiImageParameter dp = digiImage.getParameter(); - float ws = dp.getWs(); - - dp.setWs(ws+1); - digiImage.setParameter(dp); - digiImage.redraw(); - - - - - } - - /** - * If the image object points to a folder the previous image in the folder is displayed. - * - */ - public void prevPage() { - DigiImageParameter dp = digiImage.getParameter(); - int pn = dp.getPn(); - if (pn>1) - pn=pn-1; - dp.setPn(pn); - digiImage.setParameter(dp); - digiImage.redraw(); - - } - - /** - * If the image object points to a folder the next image in the folder is displayed. - * TODO currently no check is made if we are already on the last image in the folder. - */ - public void nextPage() { - DigiImageParameter dp = digiImage.getParameter(); - int pn = dp.getPn(); - - pn=pn+1; - dp.setPn(pn); - digiImage.setParameter(dp); - digiImage.redraw(); - - - } - - - - -} diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/digiImage/DigiImageParameter.java --- a/src/de/mpg/mpiwg/itgroup/digilib/digiImage/DigiImageParameter.java Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,281 +0,0 @@ -package de.mpg.mpiwg.itgroup.digilib.digiImage; - -import java.lang.reflect.Field; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * Parameter which describe the state of an Digilib-Image, - * settings and parameter names are described in @see {@link http://developer.berlios.de/docman/?group_id=251} - * @author dwinter - * - */ -public class DigiImageParameter { - - public String fn; - - public int pn=1; - - public int dw=-1; - public int dh=-1; - - public float wx=0; - public float wy=0; - - public float ww=1; - public float wh=1; - public float ws=1; - - public String mo="fit"; - - public float cont=0; - public float brgt=0; - - public float rot=0; - - public String rgbm="0/0/0"; - public String rgba="0/0/0"; - - public int ddpi=-1; - public int ddpix=-1; - public int ddpiy=-1; - - public DigiImageParameter(String fn){ - this.fn = fn; - } - - public DigiImageParameter(Map params){ - - for(String key: params.keySet()){ - Field f; - try { - f = this.getClass().getField(key); - } catch (SecurityException e) { - continue; - } catch (NoSuchFieldException e) { - continue; - } - if (f!=null){ - try { - Class T = f.getType(); - String name= T.getName(); - String valueString = params.get(key); - Object value = valueString; - if (name.equals("float")){ - value = Float.valueOf(valueString); - } else if (name.equals("double")){ - value = Double.valueOf(valueString); - } else if (name.equals("int")){ - value = Integer.valueOf(valueString); - } else if (name.equals("Float")){ - value = Float.valueOf(valueString); - } else if (name.equals("Double")){ - value = Double.valueOf(valueString); - } else if (name.equals("Integer")){ - value = Integer.valueOf(valueString); - } - - - f.set(this, value); - - } catch (IllegalArgumentException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - continue; - } catch (IllegalAccessException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - continue; - - } - } - } - } - - - public String getFn() { - return fn; - } - public void setFn(String fn) { - this.fn = fn; - } - public int getPn() { - return pn; - } - public void setPn(int pn) { - this.pn = pn; - } - public int getDw() { - return dw; - } - public void setDw(int dw) { - this.dw = dw; - } - public int getDh() { - return dh; - } - public void setDh(int dh) { - this.dh = dh; - } - public float getWx() { - return wx; - } - public void setWx(float wx) { - this.wx = wx; - } - public float getWy() { - return wy; - } - public void setWy(float wy) { - this.wy = wy; - } - public float getWw() { - return ww; - } - public void setWw(float ww) { - this.ww = ww; - } - public float getWh() { - return wh; - } - public void setWh(float wh) { - this.wh = wh; - } - public float getWs() { - return ws; - } - public void setWs(float ws) { - this.ws = ws; - } - public String getMo() { - return mo; - } - public void setMo(String mo) { - this.mo = mo; - } - public float getCont() { - return cont; - } - public void setCont(float cont) { - this.cont = cont; - } - public float getBrgt() { - return brgt; - } - public void setBrgt(float brgt) { - this.brgt = brgt; - } - public float getRot() { - return rot; - } - public void setRot(float rot) { - this.rot = rot; - } - public String getRgbm() { - return rgbm; - } - public void setRgbm(String rgbm) { - this.rgbm = rgbm; - } - public String getRgba() { - return rgba; - } - public void setRgba(String rgba) { - this.rgba = rgba; - } - public int getDdpi() { - return ddpi; - } - public void setDdpi(int ddpi) { - this.ddpi = ddpi; - } - public int getDdpix() { - return ddpix; - } - public void setDdpix(int ddpix) { - this.ddpix = ddpix; - } - public int getDdpiy() { - return ddpiy; - } - public void setDdpiy(int ddpiy) { - this.ddpiy = ddpiy; - } - - - - /** - * Converts the parameters in to map. - * @param omitIfNegative list of parameters not to be included in the map if negative - * @return Map with parameter names and values. - */ - public Map createMapFromParameters(List omitIfNegative) { - - - Map qa= new HashMap(); - - setPm(qa,"fn",getFn(),omitIfNegative); - setPm(qa,"pn",getPn(),omitIfNegative); - - setPm(qa,"dw",getDw(),omitIfNegative); - setPm(qa,"dh",getDh(),omitIfNegative); - - setPm(qa,"wx",getWx(),omitIfNegative); - setPm(qa,"wy",getWy(),omitIfNegative); - setPm(qa,"ws",getWs(),omitIfNegative); - setPm(qa,"ww",getWw(),omitIfNegative); - setPm(qa,"wh",getWh(),omitIfNegative); - - - setPm(qa,"mo",getMo(),omitIfNegative); - - setPm(qa,"cont",getCont(),omitIfNegative); - setPm(qa,"brgt",getBrgt(),omitIfNegative); - - setPm(qa,"rot",getRot(),omitIfNegative); - - setPm(qa,"rgba",getRgba(),omitIfNegative); - setPm(qa,"rgbm",getRgbm(),omitIfNegative); - - setPm(qa,"ddpi",getDdpi(),omitIfNegative); - setPm(qa,"ddpix",getDdpix(),omitIfNegative); - setPm(qa,"ddpiy",getDdpiy(),omitIfNegative); - return qa; - } - - - - -/** - * Puts the parameter as key-value into the map respecting the setting omitIfNegative. - * @param qa Map to be filled - * @param key - * @param value - * @param omitIfNegative list of parameters not to be included in the map if negative - */ -private void setPm(Map qa, String key, Object value, List omitIfNegative){ - String v; - - if (omitIfNegative==null){ - qa.put(key, String.valueOf(value)); - return; - } - if (String.class.isInstance(value)){ - v=(String)value; - qa.put(key, v); - } else if (Integer.class.isInstance(value)){ - if (!((Integer)value==-1 & omitIfNegative.indexOf(key)>-1)) { // nicht vernachlaessigen - v=String.valueOf(value); - qa.put(key, v); - } - } else { - v=String.valueOf(value); - qa.put(key, v); - } - -} - - - -} diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/digiImage/DigiNav.java --- a/src/de/mpg/mpiwg/itgroup/digilib/digiImage/DigiNav.java Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -package de.mpg.mpiwg.itgroup.digilib.digiImage; - -import java.util.List; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Label; - -import de.mpg.mpiwg.itgroup.digilib.listener.SelectNavigationListener; -import de.mpg.mpiwg.itgroup.digilib.manipulator.DigilibImageManipulatorProvider; -import de.mpg.mpiwg.itgroup.digilib.manipulator.IDigilibImageManipulator; - -public class DigiNav { - - - - private Composite navigationComposite; - - /** Creates a composite showing the registered navigation elements provided by @see {@link de.mpg.mpiwg.itgroup.digilib.manipulator.DigilibImageManipulatorProvider}. - * @param parent parent element for the composite - * @param style style for the composite as defined in @see {@link org.eclipse.swt.SWT}. - * @param dc Controller of the image to be controlled. - */ - public DigiNav(Composite parent, int style, DigiImageController dc) { - - navigationComposite = new Composite(parent, style); - navigationComposite.setLayout(new GridLayout(1, true)); - - List mps = DigilibImageManipulatorProvider.INSTANCE.getAllManipulators(); - - for (IDigilibImageManipulator mp:mps){ - Image img = mp.createImage(parent); - Label label = new Label(navigationComposite, SWT.None); - label.setImage(img); - - label.setToolTipText(mp.getKeyword()); - label.addMouseListener(new SelectNavigationListener(mp.getKeyword(),dc,label)); - } - - } -} diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/digiImage/IDigiImage.java --- a/src/de/mpg/mpiwg/itgroup/digilib/digiImage/IDigiImage.java Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -package de.mpg.mpiwg.itgroup.digilib.digiImage; - -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Label; - -import de.mpg.mpiwg.itgroup.digilib.manipulator.extensions.ZoomAreaRectangleListener; - - -/** - * Interface for an general scalable image object. - * @author dwinter - * - */ -public interface IDigiImage { - - /** - * Gets the current set of parameters. - * @return - */ - public DigiImageParameter getParameter(); - - /** Set the parameter, no other action, image is only recreated by calling @see {@link #redraw()}. - * @param dp - */ - public void setParameter(DigiImageParameter dp); - - /** - * Draws the image defined by the parameter set. - * - */ - public void redraw(); - - /** - * - * @return the label @object which contains the image - */ - public Label getLabel(); - - /** - * Sets a new label object, should normally not be externally called. Label should be set by @see {@link #redraw()}. - * @param label - */ - public void setLabel(Label label); - - - /** - * Get the listener to a rectangle object used for marking a part of the image for zooming. - * @return - */ - public ZoomAreaRectangleListener getRectangleListener(); - /** - * et the listener to a rectangle object used for marking a part of the image for zooming. - * @param rectangleListener - */ - public void setRectangleListener(ZoomAreaRectangleListener rectangleListener); - - /** - * @return Parent of the composite object of the label. - */ - public Composite getParent(); - -} diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/digiImage/exceptions/DigilibInputTypeException.java --- a/src/de/mpg/mpiwg/itgroup/digilib/digiImage/exceptions/DigilibInputTypeException.java Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ -package de.mpg.mpiwg.itgroup.digilib.digiImage.exceptions; - -public class DigilibInputTypeException extends Exception { - - /** - * - */ - private static final long serialVersionUID = 4342441319100794309L; - -} diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/digiImage/properties/DigiImageProperties.java --- a/src/de/mpg/mpiwg/itgroup/digilib/digiImage/properties/DigiImageProperties.java Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ -package de.mpg.mpiwg.itgroup.digilib.digiImage.properties; - -import java.util.Map; - -import org.eclipse.ui.views.properties.IPropertyDescriptor; -import org.eclipse.ui.views.properties.IPropertySource; -import org.eclipse.ui.views.properties.TextPropertyDescriptor; - -import de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImage; -import de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageParameter; - -public class DigiImageProperties implements IPropertySource { - - //private DigiImageParameter dp; - private DigiImage digiImage; - //private Map pt; - - public DigiImageProperties(DigiImage digiImage) { - //this.dp = digiImage.getParameter(); - this.digiImage = digiImage; - //this.pt = digiImage.getParameter().createMapFromParameters(null); - } - - public Object getEditableValue() { - // TODO Auto-generated method stub - return null; - } - - public IPropertyDescriptor[] getPropertyDescriptors() { - - Map pt = digiImage.getParameter().createMapFromParameters(null); - - IPropertyDescriptor[] propertyDescriptors = new IPropertyDescriptor[pt.keySet().size()]; - int i=0; - for (String key: pt.keySet()) { - // Add each property supported. - - //PropertyDescriptor descriptor; - - TextPropertyDescriptor des = new TextPropertyDescriptor(key, key); - - propertyDescriptors[i] = des; - - des.setCategory("Image parameters"); - i++; - } - - // Return it. - return propertyDescriptors; - - - } - - public Object getPropertyValue(Object id) { - Map pt = digiImage.getParameter().createMapFromParameters(null); - return pt.get(id); - } - - public boolean isPropertySet(Object id) { - // TODO Auto-generated method stub - return false; - } - - public void resetPropertyValue(Object id) { - // TODO Auto-generated method stub - - } - - public void setPropertyValue(Object id, Object value) { - Map pt = digiImage.getParameter().createMapFromParameters(null); - String oldValue = pt.get(id); - if(oldValue.equals(value)){ - return; - } - - - pt.put((String)id, (String)value); - digiImage.setParameter(new DigiImageParameter(pt)); - digiImage.redraw(); - - } - - public void setPropertyValueNoDraw(Object id, Object value) { - - Map pt = digiImage.getParameter().createMapFromParameters(null); - String oldValue = pt.get(id); - if(oldValue.equals(value)){ - return; - } - - - pt.put((String)id, (String)value); - digiImage.setParameter(new DigiImageParameter(pt)); - } - -} diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/digiImage/properties/DigiImagePropertyListener.java --- a/src/de/mpg/mpiwg/itgroup/digilib/digiImage/properties/DigiImagePropertyListener.java Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -package de.mpg.mpiwg.itgroup.digilib.digiImage.properties; - -import org.eclipse.swt.events.ModifyEvent; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.widgets.Text; -import org.eclipse.ui.views.properties.IPropertySource; - -import de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImage; - -/** - * @author dwinter - * - * Listener on digiImage properties - */ -public class DigiImagePropertyListener implements ModifyListener { - - private String key; - private DigiImage digiImage; - public DigiImagePropertyListener(String key, DigiImage digiImage){ - this.key = key; - this.digiImage = digiImage; - } - - - - public void modifyText(ModifyEvent event) { - DigiImageProperties properties = (DigiImageProperties) digiImage - .getAdapter(IPropertySource.class); - Text t = (Text)event.getSource(); - String c = t.getText(); - System.out.println(c); - - properties.setPropertyValueNoDraw(key, (String)c); - } - - - - } - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/digiImage/properties/DigiImagePropertySection.java --- a/src/de/mpg/mpiwg/itgroup/digilib/digiImage/properties/DigiImagePropertySection.java Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,132 +0,0 @@ -package de.mpg.mpiwg.itgroup.digilib.digiImage.properties; - -import java.util.HashMap; -import java.util.Map; - -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.swt.SWT; -import org.eclipse.swt.custom.CLabel; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.layout.FormAttachment; -import org.eclipse.swt.layout.FormData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Text; -import org.eclipse.ui.IWorkbenchPart; -import org.eclipse.ui.views.properties.IPropertySource; -import org.eclipse.ui.views.properties.tabbed.AbstractPropertySection; -import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants; -import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage; - -import de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImage; -import de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageParameter; - -/** - * @author dwinter - * Shows the properties of a digiImage - * - */ -public class DigiImagePropertySection extends AbstractPropertySection { - - private DigiImage digiImage; - private Map texts = new HashMap(); - - - private Map listeners = new HashMap(); - private Button button; - - - - /* (non-Javadoc) - * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage) - */ - public void createControls(Composite parent, - TabbedPropertySheetPage aTabbedPropertySheetPage) { - super.createControls(parent, aTabbedPropertySheetPage); - - DigiImageParameter dp = new DigiImageParameter(""); - GridLayout gridLayout = new GridLayout(1,false); - parent.setLayout(gridLayout); - for (String key: dp.createMapFromParameters(null).keySet()){ - - Composite composite = getWidgetFactory() - .createFlatFormComposite(parent); - FormData data; - - Text t = getWidgetFactory().createText(composite, ""); - texts.put(key, t); - data = new FormData(); - data.left = new FormAttachment(0, STANDARD_LABEL_WIDTH); - data.right = new FormAttachment(100, 0); - data.top = new FormAttachment(0, ITabbedPropertyConstants.VSPACE); - t.setLayoutData(data); - - - CLabel labelLabel = getWidgetFactory() - .createCLabel(composite, key); //$NON-NLS-1$ - data = new FormData(); - data.left = new FormAttachment(0, 0); - data.right = new FormAttachment(t, - -ITabbedPropertyConstants.HSPACE); - data.top = new FormAttachment(t, 0, SWT.CENTER); - labelLabel.setLayoutData(data); - } - Composite composite = getWidgetFactory() - .createFlatFormComposite(parent); - button = getWidgetFactory().createButton(composite, "redraw", SWT.None); - - } - - /* (non-Javadoc) - * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection) - */ - public void setInput(IWorkbenchPart part, ISelection selection) { - super.setInput(part, selection); - - //Assert.isTrue(selection instanceof IStructuredSelection); - assert (IStructuredSelection.class.isInstance(selection)==true) : "wrong instance type"; - - Object input = ((IStructuredSelection) selection).getFirstElement(); - //Assert.isTrue(input instanceof DigiImage); - - assert (DigiImage.class.isInstance(input)==true) : "wrong instance type for input"; - this.digiImage = (DigiImage) input; - - //Map pms = digiImage.getParameter().createMapFromParameters(null); - - for(String key: digiImage.getParameter().createMapFromParameters(null).keySet()){ - - - ModifyListener listener = new DigiImagePropertyListener(key,digiImage); - - texts.get(key).addModifyListener(listener); - listeners.put(key, listener); - } - button.addMouseListener(new RedrawButtonListener(digiImage,texts)); - - } - - /* (non-Javadoc) - * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh() - */ - public void refresh() { - - DigiImageProperties properties = (DigiImageProperties) digiImage - .getAdapter(IPropertySource.class); - - for(String key: texts.keySet()){ - - Text labelText=texts.get(key); - labelText.removeModifyListener(listeners.get(key)); - - labelText.setText((String)properties.getPropertyValue(key)); - labelText.addModifyListener(listeners.get(key)); - - } - super.refresh(); - } - - -} diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/digiImage/properties/RedrawButtonListener.java --- a/src/de/mpg/mpiwg/itgroup/digilib/digiImage/properties/RedrawButtonListener.java Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -package de.mpg.mpiwg.itgroup.digilib.digiImage.properties; - -import java.util.Map; - -import org.eclipse.swt.events.MouseEvent; -import org.eclipse.swt.events.MouseListener; -import org.eclipse.swt.widgets.Text; - -import de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImage; - -/** - * @author dwinter - * Listens on a button to redraw the image. - * - */ -public class RedrawButtonListener implements MouseListener { - - - private DigiImage digiImage; - - public RedrawButtonListener(DigiImage digiImage, Map texts) { - this.digiImage=digiImage; - - } - - public void mouseDoubleClick(MouseEvent e) { - // TODO Auto-generated method stub - - } - - public void mouseDown(MouseEvent e) { - // TODO Auto-generated method stub - - } - - public void mouseUp(MouseEvent e) { - - digiImage.redraw(); - } - -} diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/back.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/back.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/back.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/back.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/baselib.js --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/baselib.js Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,981 +0,0 @@ -/* Copyright (C) 2003-2006 IT-Group MPIWG, WTWG Uni Bern and others - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - -Authors: - Christian Luginbuehl, 01.05.2003 (first version) - DW 24.03.2004 (Changed for digiLib in Zope) - Robert Casties, 2.11.2004 (almost complete rewrite) - Martin Raspe, 12.12.2005 (changes for Digilib NG) - Robert Casties, 3.9.2009 -*/ - -// was: function base_init() { -baseLibVersion = "2.011"; -browserType = getBrowserType(); - -sliders = {}; -activeSlider = null; - -function getInt(n) { - // returns always an integer - n = parseInt(n); - return (isNaN(n)) ? 0 : n; -} - -function defined(x) { - // returns if x is defined - return (typeof arguments[0] != "undefined"); -} - -function cropFloat(x) { - // auxiliary function to crop senseless precision - return parseInt(10000 * x) / 10000; -} - -function getBrowserType() { - // browser sniffer - var bt = Object(); - bt.doDHTML = false; - bt.versIE = 0; - - if ((! document.cssonly && document.layers) || document.all || document.getElementById) { - var vers = navigator.appVersion.split('MSIE '); - vers = vers[vers.length - 1]; - bt.versIE = getInt(vers); - bt.isIE = navigator.userAgent.indexOf('MSIE') >= 0; - bt.isMac = navigator.platform.indexOf('Mac') >= 0; - bt.isWin = navigator.platform.indexOf('Win') >= 0; - bt.isN4 = (navigator.userAgent.indexOf('Mozilla/4.') >= 0) && ! bt.isIE; - bt.isIEWin = bt.versIE > 0 && bt.isWin; - if (navigator.appVersion.indexOf('MSIE') < 0 || ! bt.isMac || bt.versIE >= 5) { - bt.doDHTML = true; - bt.isOpera = navigator.userAgent.indexOf(' Opera ') >= 0; - bt.isKonq = navigator.userAgent.indexOf(' Konqueror') >= 0; - } - } - return bt; -} - -// fixes for javascript < 1.2 -if (! Array.prototype.push) { - Array.prototype.push = function(val) { - this[this.length] = val; - return this.length; - } - Array.prototype.pop = function() { - var val = this[this.length-1]; - this.length -= 1; - return val; - } -} - - -/* ********************************************** - * geometry classes - * ******************************************** */ - -/* - * Size class - */ -function Size(w, h) { - this.width = parseFloat(w); - this.height = parseFloat(h); - return this; -} -Size.prototype.toString = function() { - return this.width + "x" + this.height; -} -Size.prototype.equals = function(other) { - return (this.width == other.width - && this.height == other.height) - } - -/* - * Position class - */ -function Position(x, y) { - this.x = parseFloat(x); - this.y = parseFloat(y); - return this; -} -Position.prototype.toString = function() { - return this.x + "," + this.y; -} -Position.prototype.equals = function(other) { - return (this.x == other.x - && this.y == other.y) -} -/* - * Rectangle class - */ -function Rectangle(x, y, w, h) { - if (typeof x == "object") { - // assume x and y are Position - this.x = x.x; - this.y = x.y; - this.width = y.x - x.x; - this.height = y.y - x.y; - return this; - } - this.x = parseFloat(x); - this.y = parseFloat(y); - this.width = parseFloat(w); - this.height = parseFloat(h); - return this; -} -Rectangle.prototype.toString = function() { - return this.width+"x"+this.height+"@"+this.x+","+this.y; -} -Rectangle.prototype.copy = function() { - // returns a copy of this Rectangle - return new Rectangle(this.x, this.y, this.width, this.height); -} -Rectangle.prototype.getPosition = function() { - // returns the position of this Rectangle - return new Position(this.x, this.y); -} -Rectangle.prototype.getPt1 = Rectangle.prototype.getPosition; -// returns the upper left corner position - -Rectangle.prototype.getPt2 = function() { - // returns the lower right corner position of this Rectangle - return new Position(this.x + this.width, this.y + this.height); -} -Rectangle.prototype.setPt1 = function(pos) { - // sets the upper left corner to position pos - this.x = pos.x; - this.y = pos.y; - return this; -} -Rectangle.prototype.setPt2 = function(pos) { - // sets the lower right corner to position pos - this.width = pos.x - this.x; - this.height = pos.y - this.y; - return this; -} -Rectangle.prototype.getCenter = function() { - // returns the center position of this Rectangle - return new Position(this.x + this.width / 2, this.y + this.height / 2); -} -Rectangle.prototype.setCenter = function(pos) { - // moves this Rectangle's center to position pos - this.x = pos.x - this.width / 2; - this.y = pos.y - this.height / 2; - return this; -} -Rectangle.prototype.getSize = function() { - // returns the size of this Rectangle - return new Size(this.width, this.height); -} -Rectangle.prototype.equals = function(other) { - // equal props - return (this.getPosition().equals(other.getPosition()) - && this.getSize().equals(other.getSize()) - ); -} -Rectangle.prototype.getArea = function() { - // returns the area of this Rectangle - return (this.width * this.height); -} -Rectangle.prototype.normalize = function() { - // eliminates negative width and height - var p = this.getPt2(); - this.x = Math.min(this.x, p.x); - this.y = Math.min(this.y, p.y); - this.width = Math.abs(this.width); - this.height = Math.abs(this.height); - return this; -} -Rectangle.prototype.containsPosition = function(pos) { - // returns if Position "pos" lies inside of this rectangle - return ((pos.x >= this.x) - && (pos.y >= this.y) - && (pos.x <= this.x + this.width) - && (pos.y <= this.y + this.width) - ); -} -Rectangle.prototype.containsRect = function(rect) { - // returns if rectangle "rect" is contained in this rectangle - return (this.containsPosition(rect.getPt1()) - && this.containsPosition(rect.getPt2())); -} -Rectangle.prototype.stayInside = function(rect) { - // changes this rectangle's x/y values so it stays inside of rectangle rect - // keeping the proportions - if (this.x < rect.x) this.x = rect.x; - if (this.y < rect.y) this.y = rect.y; - if (this.x + this.width > rect.x + rect.width) - this.x = rect.x + rect.width - this.width; - if (this.y + this.height > rect.y + rect.height) - this.y = rect.y + rect.height - this.height; - return this; -} -Rectangle.prototype.clipTo = function(rect) { - // clips this rectangle so it stays inside of rectangle rect - var p1 = rect.getPt1(); - var p2 = rect.getPt2(); - var this2 = this.getPt2(); - this.setPt1(new Position(Math.max(this.x, p1.x), Math.max(this.y, p1.y))); - this.setPt2(new Position(Math.min(this2.x, p2.x), Math.min(this2.y, p2.y))); - return this; -} -Rectangle.prototype.intersect = function(rect) { - // returns the intersection of the given Rectangle and this one - // FIX ME: not really, it should return null if there is no overlap - var sec = rect.copy(); - if (sec.x < this.x) { - sec.width = sec.width - (this.x - sec.x); - sec.x = this.x; - } - if (sec.y < this.y) { - sec.height = sec.height - (this.y - sec.y); - sec.y = this.y; - } - if (sec.x + sec.width > this.x + this.width) { - sec.width = (this.x + this.width) - sec.x; - } - if (sec.y + sec.height > this.y + this.height) { - sec.height = (this.y + this.height) - sec.y; - } - return sec; -} -Rectangle.prototype.fit = function(rect) { - // returns a Rectangle that fits into this one (by moving first) - var sec = rect.copy(); - sec.x = Math.max(sec.x, this.x); - sec.y = Math.max(sec.y, this.x); - if (sec.x + sec.width > this.x + this.width) { - sec.x = this.x + this.width - sec.width; - } - if (sec.y + sec.height > this.y + this.height) { - sec.y = this.y + this.height - sec.height; - } - return sec.intersect(this); -} - -/* - * Transform class - * - * defines a class of affine transformations - */ -function Transform() { - this.m00 = 1.0; - this.m01 = 0.0; - this.m02 = 0.0; - this.m10 = 0.0; - this.m11 = 1.0; - this.m12 = 0.0; - this.m20 = 0.0; - this.m21 = 0.0; - this.m22 = 1.0; - return this; -} -Transform.prototype.concat = function(traf) { - // add Transform traf to this Transform - for (var i = 0; i < 3; i++) { - for (var j = 0; j < 3; j++) { - var c = 0.0; - for (var k = 0; k < 3; k++) { - c += traf["m"+i+k] * this["m"+k+j]; - } - this["m"+i+j] = c; - } - } - return this; -} -Transform.prototype.transform = function(rect) { - // returns transformed Rectangle or Position with this Transform applied - var x = this.m00 * rect.x + this.m01 * rect.y + this.m02; - var y = this.m10 * rect.x + this.m11 * rect.y + this.m12; - if (rect.width) { - // transform the other corner points - var pt2 = rect.getPt2(); - var x2 = this.m00 * pt2.x + this.m01 * pt2.y + this.m02; - var y2 = this.m10 * pt2.x + this.m11 * pt2.y + this.m12; - var width = x2 - x; - var height = y2 - y; - return new Rectangle(x, y, width, height); - } - return new Position(x, y); -} -Transform.prototype.invtransform = function(rect) { - // returns transformed Rectangle or Position with the inverse of this Transform applied - var det = this.m00 * this.m11 - this.m01 * this.m10; - var x = (this.m11 * rect.x - this.m01 * rect.y - this.m11 * this.m02 + this.m01 * this.m12) / det; - var y = (- this.m10 * rect.x + this.m00 * rect.y + this.m10 * this.m02 - this.m00 * this.m12) / det; - if (rect.width) { - /* transforming width and height like points seems to be wrong - var width = (this.m11 * rect.width - this.m01 * rect.height - this.m11 * this.m02 + this.m01 * this.m12) / det; - var height = (- this.m10 * rect.width + this.m00 * rect.height + this.m10 * this.m02 - this.m00 * this.m12) / det; - */ - // transform the other corner points - var pt2 = rect.getPt2(); - var x2 = (this.m11 * pt2.x - this.m01 * pt2.y - this.m11 * this.m02 + this.m01 * this.m12) / det; - var y2 = (- this.m10 * pt2.x + this.m00 * pt2.y + this.m10 * this.m02 - this.m00 * this.m12) / det; - var width = x2 - x; - var height = y2 - y; - return new Rectangle(x, y, width, height); - } - return new Position(x, y); -} -function getRotation(angle, pos) { - // returns a Transform that is a rotation by angle degrees around [pos.x, pos.y] - var traf = new Transform(); - if (angle != 0) { - var t = 2.0 * Math.PI * parseFloat(angle) / 360.0; - traf.m00 = Math.cos(t); - traf.m01 = - Math.sin(t); - traf.m10 = Math.sin(t); - traf.m11 = Math.cos(t); - traf.m02 = pos.x - pos.x * Math.cos(t) + pos.y * Math.sin(t); - traf.m12 = pos.y - pos.x * Math.sin(t) - pos.y * Math.cos(t); - } - return traf; -} -Transform.prototype.getRotation = getRotation; -function getTranslation(pos) { - // returns a Transform that is a translation by [pos.x, pos,y] - var traf = new Transform(); - traf.m02 = pos.x; - traf.m12 = pos.y; - return traf; -} -Transform.prototype.getTranslation = getTranslation; -function getScale(size) { - // returns a Transform that is a scale by [size.width, size.height] - var traf = new Transform(); - traf.m00 = size.width; - traf.m11 = size.height; - return traf; -} -Transform.prototype.getScale = getScale; - - -/* - * parameters class - */ - -function Parameters() { - this.params = new Object(); - this.PARAM_ALL = 65535; - return this; -} -Parameters.prototype.define = function(name, defaultValue, detail) { - // create a new parameter with a name and a default value - if (!this.params[name]) this.params[name] = new Object(); - this.params[name].defaultValue = defaultValue; - this.params[name].hasValue = false; - this.params[name].value = defaultValue; - this.params[name].detail = detail; - return this.params[name]; -} -Parameters.prototype.reset = function(name) { - // resets the given parameter to its default value - if (!this.params[name]) { - alert("Could not reset non-existing parameter '" + name + "'"); - return false; - } - this.params[name].hasValue = false; - this.params[name].value = this.params[name].defaultValue; - return this.params[name]; -} -Parameters.prototype.resetAll = function() { - // resets all parameters to their default values - for (var p in this.params) { - this.reset(p); - } - return true; -} -Parameters.prototype.remove = function(name) { - if (!defined(this.params[name])) return false; - delete this.params[name]; - return true; -} -Parameters.prototype.get = function(name) { - // returns the named parameter value or its default value - if (!defined(this.params[name])) return null; - return this.params[name].hasValue ? this.params[name].value : this.params[name].defaultValue; -} -Parameters.prototype.set = function(name, value, relative) { - // sets parameter value (relative values with +/- if relative=true) - if (!defined(this.params[name])) return null; - var p = this.params[name]; - if (relative && value.slice) { - // value is a string -- check if it starts with +/- - var sign = value.slice(0, 1); - if (sign == '+') { - p.value = parseFloat(p.value) + parseFloat(value.slice(1)); - } else if (sign == '-') { - p.value = parseFloat(p.value) - parseFloat(value.slice(1)); - } else { - p.value = value; - } - } else { - p.value = value; - } - p.hasValue = true; - return p.value; -} -Parameters.prototype.isSet = function(name) { - // returns if the parameter's value has been set - if (!defined(this.params[name])) return null; - return this.params[name].hasValue; -} -Parameters.prototype.getAll = function(detail) { - // returns a string of all parameters in query format - if (!detail) detail = this.PARAM_ALL; - var pa = new Array(); - for (p in this.params) { - if (((this.params[p].detail & detail) > 0) - && (this.params[p].hasValue)) { - var val = this.params[p].value; - if (val != "") { - pa.push(p + "=" + val); - } - } - } - return pa.join("&"); -} -Parameters.prototype.parse = function(query) { - // gets parameter values from query format string - var pa = query.split("&"); - for (var i = 0; i < pa.length; i++) { - var keyval = pa[i].split("="); - if (keyval.length == 2) { - this.set(keyval[0], keyval[1]); - } - } -} - -/* - * Flags class - * - * Flags are (hash-) collections of unique strings. - */ -function Flags() { - this.flags = new Object(); - return this; -} -Flags.prototype.define = function(name, detail) { - // create a new flag with a name and detail level - this.flags[name] = new Object(); - this.flags[name].set = false; - this.flags[name].detail = detail; - return this.flags[name]; -} -Flags.prototype.get = function(name) { - return (this.flags[name]) ? this.flags[name].set : false; -} -Flags.prototype.set = function(name, value) { - if (!defined(value)) value = true; - if (!this.flags[name]) this.flags[name] = new Object; - this.flags[name].set = value; -} -Flags.prototype.reset = function(name) { - if (!this.flags[name]) this.flags[name] = new Object; - this.flags[name].set = false; -} -Flags.prototype.toggle = function(name) { - if (!this.flags[name]) this.flags[name] = new Object; - this.flags[name].set = !this.flags[name].set; -} -Flags.prototype.resetAll = function() { - for (var f in this.flags) { - this.flags[f].set = false; - } -} -Flags.prototype.parse = function(query, sep) { - // sets the flags from the string query - if (!sep) sep = ","; - var fa = query.split(sep); - for (var i = 0; i < fa.length ; i++) { - var f = fa[i]; - if (f != "") { - this.set(f); - } - } -} -Flags.prototype.getAll = function(detail, sep) { - // returns a string of all flags in query format - if (!detail) detail = 255; - if (!sep) sep = ","; - var fa = new Array(); - for (f in this.flags) { - if (this.flags[f].set) { - // if the flag has a detail level it must match - // otherwise we assume detail=128 - if (this.flags[f].detail) { - if ((this.flags[f].detail & detail) > 0) { - fa.push(f); - } - } else { - if ((detail & 128) > 0) { - fa.push(f); - } - } - } - } - return fa.join(sep); -} - - -/* ********************************************** - * HTML/DOM routines - * ******************************************** */ - -function getElement(tagid, quiet) { - // returns the element object with the id tagid - var e; - if (document.getElementById) { - e = document.getElementById(tagid); - } else if (document.all) { - alert("document.all!"); - e = document.all[tagid]; - } else if (document.layers) { - e = document.layers[tagid]; - } - if (e) { - return e; - } else { - if (! quiet) { - alert("unable to find element: "+tagid); - } - return null; - } -} - -function getElementPosition(elem) { - // returns a Position with the position of the element - var x = 0; - var y = 0; - if (defined(elem.offsetLeft)) { - var e = elem; - while (e) { - if (browserType.isIE) { - if (browserType.isMac) { - if (e.offsetParent.tagName == "BODY") { - // IE for Mac extraspecial - x += e.clientLeft; - y += e.clientTop; - break; - } - } else { - if ((e.tagName != "TABLE") && (e.tagName != "BODY")) { - x += e.clientLeft; - y += e.clientTop; - } - } - } - x += e.offsetLeft; - y += e.offsetTop; - e = e.offsetParent; - } - } else if (defined(elem.x)) { - // use .x for other (which?) - x = elem.x; - y = elem.y; - } else if (defined(elem.pageX)) { - // use pageX for N4 - x = elem.pageX; - y = elem.pageY; - } else { - alert("unable to get position of " + elem + " (id:" + elem.id + ")"); - } - return new Position(getInt(x), getInt(y)); -} - -function getElementSize(elem) { - // returns a Rectangle with the size of the element - var width = 0; - var height = 0; - if (defined(elem.offsetWidth)) { - width = elem.offsetWidth; - height = elem.offsetHeight; - } else if (defined(elem.width)) { - width = elem.width; - height = elem.height; - } else if (defined(elem.clip.width)) { - width = elem.clip.width; - height = elem.clip.height; - } else { - alert("unable to get size of " + elem + " (id:" + elem.id + ")"); - } - return new Size(getInt(width), getInt(height)); -} - -function getElementRect(elem) { - // returns a Rectangle with the size and position of the element - // FIX ME: what about borders? - var pos = getElementPosition(elem); - var size = getElementSize(elem); - return new Rectangle(pos.x, pos.y, size.width, size.height); -} - -function moveElement(elem, rect) { - // moves and sizes the element - if (elem.style) { - if (defined(rect.x)) { - elem.style.left = Math.round(rect.x) + "px"; - elem.style.top = Math.round(rect.y) + "px"; - } - if (defined(rect.width)) { - elem.style.width = Math.round(rect.width) + "px"; - elem.style.height = Math.round(rect.height) + "px"; - } - } else if (document.layers) { - if (defined(rect.x)) { - elem.pageX = getInt(rect.x); - elem.pageY = getInt(rect.y); - } - if (defined(rect.width)) { - elem.clip.width = getInt(rect.width); - elem.clip.height = getInt(rect.height); - } - } else { - alert("moveElement(): element has no style or layer property!"); - return false; - } - return true; -} - -function showElement(elem, show) { - // shows or hides the element - if (elem.style) - elem.style.visibility = show ? "visible" : "hidden"; - else if (defined(elem.visibility)) - elem.visibility = show ? "show" : "hide"; - else - alert("showElement(): element has no style or layer property!"); - return true; -} - -function evtPosition(evt) { - // returns the on-screen Position of the Event - var x; - var y; - evt = (evt) ? evt : window.event; - if (!evt) { - alert("no event found! " + evt); - return; - } - if (defined(evt.pageX)) { - x = parseInt(evt.pageX); - y = parseInt(evt.pageY); - } else if (defined(evt.clientX)) { - x = parseInt(document.body.scrollLeft + evt.clientX); - y = parseInt(document.body.scrollTop + evt.clientY); - } else { - alert("evtPosition(): don't know how to deal with " + evt); - } - return new Position(x, y); -} - -function registerEvent(type, elem, handler) { - // register the given event handler on the indicated element - if (elem.addEventListener) { - elem.addEventListener(type, handler, false); // bubble - } - else if (elem.attachEvent) { - elem.attachEvent("on" + type, handler); - } - else if (elem.captureEvents) { - if (Event) { - t = type.toUpperCase(); - elem.captureEvents(Event[t]); - elem[ "on" + type ] = handler; - } - } - else { - alert("Could not register event of type " + type); - return false; - } - return true; - } - -function unregisterEvent(type, elem, handler) { - // unregister the given event handler from the indicated element - if (elem.removeEventListener) { - elem.removeEventListener(type, handler, false); - } - else if (elem.detachEvent) { - elem.detachEvent("on" + type, handler); - } - else if (elem.releaseEvents) { - if (Event) { - t = type.toUpperCase(); - elem.releaseEvents(Event[t]); - elem[ "on" + type ] = null; - } - } - else { - alert("Could not register event of type " + type); - return false; - } - return true; -} - -function registerEventById(type, id, handler) { - registerEvent(type, getElement(id), handler); - } - -function unregisterEventById(type, id, handler) { - unregisterEvent(type, getElement(id), handler); - } - -function stopEvent(e) { - if (!e) var e = window.event; - e.cancelBubble = true; - if (e.stopPropagation) e.stopPropagation(); - return false; -} - -function getEventSrc(e) { - if (e.target) return e.target; - if (e.srcElement) return e.srcElement; -} - -// old registerXXYY API for compatibility -function registerMouseDown(elem, handler) { - return registerEvent("mousedown", elem, handler); -} -function unregisterMouseDown(elem, handler) { - return unregisterEvent("mousedown", elem, handler); -} -function registerMouseMove(elem, handler) { - return registerEvent("mousemove", elem, handler); -} -function unregisterMouseMove(elem, handler) { - return unregisterEvent("mousemove", elem, handler); -} -function registerKeyDown(handler) { - return registerEvent("keypress", elem, handler); -} - - -function getWinSize() { - // returns a Size with the current window size (mostly from www.quirksmode.org) - var wsize = new Size(100, 100); - if (defined(self.innerHeight)) { - // all except Explorer - if ((self.innerWidth == 0)||(self.innerHeight == 0)) { - // Safari 1.2 (and other) bug - if (parent) { - wsize.height = parent.innerHeight; - wsize.width = parent.innerWidth; - } - } else { - wsize.width = self.innerWidth; - wsize.height = self.innerHeight; - } - } else if (document.documentElement && document.documentElement.clientHeight) { - // Explorer 6 Strict Mode - wsize.width = document.documentElement.clientWidth; - wsize.height = document.documentElement.clientHeight; - } else if (document.body) { - // other Explorers - wsize.width = document.body.clientWidth; - wsize.height = document.body.clientHeight; - } - return wsize; -} - -function getWinRect() { - var size = getWinSize(); - return new Rectangle(0, 0, size.width, size.height); -} - -function openWin(url, name, params) { - // open browser window - var ow = window.open(url, name, params); - ow.focus(); -} - -/* ********************************************** - * cookie class - * ******************************************** */ - -function Cookie() { - return this.read(); -} - -Cookie.prototype.read = function() { - var s = document.cookie; - var lines = s.split("; "); // semicolon and space for all browsers? - for (var i in lines) { - var line = lines[i]; - var sep = line.indexOf("="); - if (sep != -1) this.add( - line.substr(0, sep), - line.substr(sep + 1) - ); - } - return this; -} - -Cookie.prototype.store = function() { - var lines = new Array(); - for (var i in this) { - var item = this[i]; - if (typeof(item) == typeof(lines)) // Array - lines.push(i + "=" + item.join(",")); - else if (typeof(item) != "function") // single item - lines.push(i + "=" + item); - } - // var s = lines.join(";") - for (line in lines) document.cookie = lines[line]; - return this; - } - -Cookie.prototype.add = function(key, value) { - value = value.toString(); - if (value.indexOf(",") == -1) - this[key] = value; // single value - else - this[key] = value.split(","); // list of values - return this[key]; - } - -Cookie.prototype.get = function(key) { - return this[key]; - } - -Cookie.prototype.addbool = function(key, value) { - this[key] = Boolean(value).toString(); - return this[key]; - } - -Cookie.prototype.getbool = function(key) { - var val = this[key]; - return (val > "") && (val != "0") && (val != "false"); - } - -Cookie.prototype.remove = function(key) { - delete this[key]; - } - -function Slider(id, valMin, valMax, valStart, stepSize, onChange) { - // a (horizontal) slider widget - this.id = id; - this.elem = getElement(id); - this.slider = getElement(id + "-slider"); // the slider handle - this.input = getElement(id + "-input", 1); // optional input field - this.bar = getElement(id + "-bar"); // the slider bar - this.barRect = getElementRect(this.bar); - this.sliderRect = getElementRect(this.slider); - this.xMin = this.barRect.x; - this.xMax = this.xMin + this.barRect.width; - this.xDiff = this.xMax - this.xMin; - this.Y = this.barRect.getCenter().y; // middle axis of bar - this.valMin = valMin; - this.valMax = valMax; - this.valDiff = Math.abs(valMax - valMin); - this.valStart = valStart; - this.value = valStart; - this.stepSize = stepSize; - this.valueLabel = getElement(id + "-value", 1); - this.valMinLabel = getElement(id + "-valmin", 1); - this.valMaxLabel = getElement(id + "-valmax", 1); - this.onChange = onChange ? onChange : function() {}; - this.update(); - this.activate(); - sliders[id + '-slider'] = this; // make a handle to the object - return this; - } - -Slider.prototype.show = function(show) { - showElement(this.elem, show); - this.activate(); - } - -Slider.prototype.activate = function() { - this.setupEvents(); - } - -Slider.prototype.deactivate = function() { - unregisterEvent("mousedown", this.slider, this.onDragStart); - } - -Slider.prototype.reset = function() { - this.setValue(this.startVal); - } - -Slider.prototype.setValue = function(newVal) { - // sets slider to new value and updates - this.value = newVal; - this.update(); - } - -Slider.prototype.calcValue = function() { - // calculates value from slider position - var xSlider = this.sliderRect.getCenter().x - this.xMin; - this.value = xSlider * this.valDiff / this.xDiff; - return this.value; - } - -Slider.prototype.update = function() { - // updates slider position to new value - var xSlider = this.value * this.xDiff / this.valDiff; - moveElement(this.slider, this.sliderRect.setCenter( - new Position(xSlider + this.xMin, this.Y))); - var strVal = this.value.toString(); - if (this.valueLabel) this.valueLabel.innerHTML = strVal; - if (this.input) this.input.value = strVal; - } - -Slider.prototype.setupEvents = function() { - // installs all event callbacks - registerEvent("mousedown", this.slider, this.onDragStart); - } - -Slider.prototype.onDragStart = function(evt) { - var slider = sliders[this.id]; - activeSlider = slider; - unregisterEvent("mousedown", slider.slider, slider.onDragStart); - registerEvent("mousemove", document, slider.onDrag); - registerEvent("mouseup", document, slider.onDragEnd); - slider.startPos = evtPosition(evt); - slider.startX = slider.sliderRect.getCenter().x; - return stopEvent(evt); - } - -Slider.prototype.onDrag = function(evt) { - var slider = activeSlider; - var pos = evtPosition(evt); - var currX = slider.slider - var newX = pos.x - slider.startPos + slider.startX; - if (newX < slider.xMin) newX = slider.xMin; - if (newX > slider.xMax) newX = slider.xMax; - moveElement(slider.slider, slider.sliderRect.setCenter( - new Position(newX, slider.Y))); - return stopEvent(evt); - } - -Slider.prototype.onDragEnd = function(evt) { - var slider = activeSlider; - unregisterEvent("mousemove", document, slider.onDrag); - unregisterEvent("mouseup", document, slider.onDragEnd); - slider.onChange(slider.calcValue()); - activeSlider = null; - return stopEvent(evt); - } - -Slider.prototype.onInputChange = function() { - var slider = activeSlider; - slider.onChange(s.value); - } - -// :tabSize=4:indentSize=4:noTabs=true: - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/bg.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/bg.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/bg.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/bg.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,63 +0,0 @@ - - - - - - - - - image/svg+xml - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/birds-eye.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/birds-eye.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/birds-eye.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/birds-eye.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/blue.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/blue.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/brightness-on.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/brightness-on.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/brightness-on.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/brightness-on.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,157 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/brightness.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/brightness.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/brightness.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/brightness.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,157 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/calibration-x.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/calibration-x.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/calibration-x.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/calibration-x.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,139 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/calibration-y.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/calibration-y.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/calibration-y.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/calibration-y.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,143 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/cat.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/cat.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/cat.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/cat.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,131 +0,0 @@ - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/contrast-on.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/contrast-on.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/contrast-on.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/contrast-on.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,112 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/contrast.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/contrast.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/contrast.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/contrast.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,112 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/corona.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/corona.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/corona.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/corona.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,214 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/debug.js --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/debug.js Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,111 +0,0 @@ -var Debug = null; -var _now = {}; - -function element(name, content) { - var E = document.createElement(name); - if (content) { - if (content.nodeType) // it's a node - E.appendChild(content) - else // it's text - E.appendChild(document.createTextNode(content)) - }; - return E; - } - -function appendElement(node, name, content) { - if (node == null || ! node.appendChild) - return node; - return node.appendChild(element(name,content)); - } - -function getDebug() { - if (Debug == null) { - Debug = document.getElementById('debug'); - if (Debug == null) { - Debug = appendElement(document.body, 'div'); - Debug.setAttribute('class', 'debug'); - Debug.setAttribute('id', 'debug'); - Debug.innerhtml = '

    Debug

    '; - }; - }; - return Debug; - } - -function debug() { - var D = getDebug(); - // return alertObject(D); - var msg = ""; - for (var i = 0; i -1; - var A = new Array(); - for (var prop in obj) A.push(prop); - A.sort(); - var D = getDebug(); - var T = appendElement(D, "table"); - for (var i = 0; i < A.length; i++) { - var key = A[i]; - var value = obj[key]; - var type = typeof(value); - // exclude specified types - if (exclude.indexOf(type) > -1) - continue; - // exclude uppercase-only properties (= constants) - if (noConst && key.search(/^[A-Z0-9_]+$/) > -1) - continue; - var TR = appendElement(T, "tr"); - appendElement(TR, "td", element("b", key)); - appendElement(TR, "td", type); - appendElement(TR, "td", value + ""); - if (type == "function") - appendElement(TR, "td", value.toSource()); - }; - } - -function strObject(obj) { - var res = ""; - var A = new Array(); - try { - for (var i in obj) A[i] = typeof(obj[i]); - } - catch(e) { typ = "unknown" }; - var count = 0; - for (var item in A) { - count++; - typ = A[item]; - res += item + " (" + typ + "): "; - if (typ != "function") res += obj[item]; - res += "\t"; - if (count % 4 == 0) - res += "\n"; - } - return res; - } - -function alertObject(obj) { - return alert(strObject(obj)); - } - -function alertHTML(obj) { - if (obj) - return alert(obj.tagName + ".innerHTML:\n" + obj.innerHTML); - } - -function serialize(xmlobject) { - return (new XMLSerializer()).serializeToString(xmlobject); - } - -function startTime(s) { - _now[s] = new Date(); - } - -function elapsedTime(s) { - var diff = new Date(new Date - _now[s]); - debug(s + ": " + diff.getSeconds() + "." + diff.getMilliseconds() + " sec."); - } - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/delmark.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/delmark.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/delmark.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/delmark.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,129 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - 1 - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/digimage-neu.jsp --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/digimage-neu.jsp Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,443 +0,0 @@ -<%@ page language="java" %><%! -// -- JSP init ------------- - -// create DocumentBean instance for all JSP requests -digilib.servlet.DocumentBean docBean = new digilib.servlet.DocumentBean(); - -// initialize DocumentBean instance in JSP init -public void jspInit() { - try { - // set servlet init-parameter - docBean.setConfig(getServletConfig()); - } catch (javax.servlet.ServletException e) { - System.out.println(e); - } -} -// -- end of JSP init ------------- -%><% -// -- JSP request ------------- - -// parsing the query -// ----------------- -digilib.servlet.DigilibRequest dlRequest = new digilib.servlet.DigilibRequest(request); -docBean.setRequest(dlRequest); -// check if authentication is needed and redirect if necessary -docBean.doAuthentication(response); -// add number of pages -dlRequest.setValue("pt", docBean.getNumPages()); -// store objects for jsp:include -pageContext.setAttribute("docBean", docBean, pageContext.REQUEST_SCOPE); -%> - - Digital Document Library NG - - - - - - - - - - - - - - -
    - <% if (dlRequest.hasOption("clop", "noarrows")) { - %><% - } else { - %><% - } - %> -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/digimage.jsp --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/digimage.jsp Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,459 +0,0 @@ -<%@ page language="java" %><%! - // -- JSP init ------------- - - // create DocumentBean instance for all JSP requests - digilib.servlet.DocumentBean docBean = new digilib.servlet.DocumentBean(); - - // initialize DocumentBean instance in JSP init - public void jspInit() { - try { - // set servlet init-parameter - docBean.setConfig(getServletConfig()); - } catch (javax.servlet.ServletException e) { - System.out.println(e); - } - } - // -- end of JSP init ------------- -%> - -<% - // -- JSP request ------------- - - // parsing the query - // ----------------- - digilib.servlet.DigilibRequest dlRequest = new digilib.servlet.DigilibRequest(request); - docBean.setRequest(dlRequest); - // check if authentication is needed and redirect if necessary - docBean.doAuthentication(response); - // add number of pages - dlRequest.setValue("pt", docBean.getNumPages()); - // store objects for jsp:include - pageContext.setAttribute("docBean", docBean, pageContext.REQUEST_SCOPE); -%> - - - - - Digital Document Library NG - - - - - - - - - - - - -
    -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    -
    -
    - - -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/digimage_img_inc.jsp --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/digimage_img_inc.jsp Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -<%@ page language="java" %><% -// retrieve objects from context -digilib.servlet.DocumentBean docBean = (digilib.servlet.DocumentBean) pageContext.getAttribute("docBean", pageContext.REQUEST_SCOPE); -digilib.servlet.DigilibRequest dlRequest = docBean.getRequest(); -String ua = request.getHeader("User-Agent"); -boolean isN4 = ((ua.indexOf("Mozilla/4.") > -1)&&(ua.indexOf("MSIE") == -1)); -%> -<% - if (isN4) { -%><% - } else { -%>
    <% - } -%> - -<% - if (isN4) { -%><% - } else { -%>
    <% - } -%> diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/digimage_tbl_inc.jsp --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/digimage_tbl_inc.jsp Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -<%@ page language="java" %><% -// retrieve objects from context -digilib.servlet.DocumentBean docBean = (digilib.servlet.DocumentBean) pageContext.getAttribute("docBean", pageContext.REQUEST_SCOPE); -digilib.servlet.DigilibRequest dlRequest = docBean.getRequest(); -String ua = request.getHeader("User-Agent"); -boolean isN4 = ((ua.indexOf("Mozilla/4.") > -1)&&(ua.indexOf("MSIE") == -1)); -%> -
  • -Classes in de.mpg.mpiwg.itgroup.digilib.plugin used by de.mpg.mpiwg.itgroup.digilib.plugin
    Activator +Activator
              The activator class controls the plug-in life cycle
     
    de.mpg.mpiwg.itgroup.digilib.pluginde.mpg.mpiwg.itgroup.digilib.core.plugin  
    de.mpg.mpiwg.itgroup.digilib.plugin.editorsde.mpg.mpiwg.itgroup.digilib.core.plugin.editors  
    - - - - - - - - - - - - - - - -
    <% - if (docBean.canMoveUp()) { - %><% - } - %>
    <% - if (docBean.canMoveLeft()) { - %><% - } - %> -<% - if(isN4) { - %><% - } else { - %>
    <% - } -%> - -<% - if(isN4) { - %><% - } else { - %>
    <% - } -%> -
    <% - if (docBean.canMoveRight()) { - %><% - } - %>
    <% - if (docBean.canMoveDown()) { - %><% - } - %>
    diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/diginew.css --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/diginew.css Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,276 +0,0 @@ -/* Styles for Digilib NG */ -/* (c) 2005 by Martin Raspe */ -/* Bibliotheca Hertziana (Max-Planck-Institute for Art History), Rome */ - -body { - background-color: #E0E0E0; - color: black; - font-size: 8pt; - margin-left: 8px; - margin-top: 8px; - padding: 0px; - } - -code { - font-family: monospace; - color: blue; - } - -pre { color: #006060; } - - -a.icon { - margin: 0px; - padding: 0px; - } - -a.arrow { - display: block; - position: absolute; - border: none; - z-index: 50; - background-repeat: no-repeat; - background-position: center; - } - -a#up:hover { - background-image: url('up.png'); - } - -a#down:hover { - background-image: url('down.png'); - } - -a#left:hover { - background-image: url('left.png'); - } - -a#right:hover { - background-image: url('right.png'); - } - -/* Images */ - -img.logo { - border: none; - } - -img.png { - border: none; - } - -img.png:hover { - background-image: url('corona.png'); - } - -img#bird-image { - border: none; - position: fixed; - bottom: 8px; - right: 48px; - visibility: hidden; - z-index: 1; - } - -/* DIVs */ - -div.button { - padding: 0px; - } - -div.separator { - margin-bottom: 4px; - border-top: 2px solid lightgrey; - } - -div.mark { - position: absolute; - color: white; - background: url('mark-bg-16.png'); - font-family: Verdana, Arial, Helvetica, sans-serif; - font-weight: bold; - font-size:11px; - height: 15px; - width: 16px; - padding-top: 1px; - text-align: center; - z-index: 10; - visibility: hidden; - /* filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='mark-bg-16.png') */ - } - -div#bg { - position: absolute; - background-color: grey; - background-repeat:no-repeat; - cursor: move; - visibility: hidden; -} - -div#scaler { - margin-right: 50px; - /* position: absolute; - left: 8px; - top: 8px; - bottom: 8px; - right: 44px; -*/ /* overflow: auto; */ - } - -div#scaler img { - cursor: default; -} - -div#overlay, div#bird-overlay { - position: fixed; - background-color: transparent; - border: none; - z-index: 100; - visibility: hidden; - /* box-sizing: border-box; - -moz-box-sizing: border-box; */ - } - -div#buttons { - position: fixed; - right: 5px; - top: 5px; - padding: 3px; -/* background-color: #E0E0E0; */ - background-color: lightgrey; - } - -div#dloptions { - position: fixed; - right: 5px; - top: 5px; - padding: 3px; -/* background-color: #E0E0E0; */ - background-color: lightgrey; - visibility: hidden; - } - -div#zoom { - position: absolute; - /* border: 2px solid #ffa060; */ - border: 2px solid #ff0000; - z-index: 200; - visibility: hidden; - /* box-sizing: border-box; - -moz-box-sizing: border-box; */ - } - -div#bird-area { - position: fixed; - /* border: 2px solid #ffa060; */ - border: 2px solid #ff0000; - background-color: transparent; - /* box-sizing: border-box; - -moz-box-sizing: border-box; */ - z-index: 10; - visibility: hidden; - } - -div#calibration { - background: url('blue.png'); - position: absolute; - top: 0px; - width: 400px; - padding: 0px; - visibility: hidden; - z-index: 1000; - } - -div#calibration div { - width: 100%; - height: 100%; - margin: 0px; - padding: 0px; - font-family: Verdana, Arial, Helvetica, sans-serif; - text-align: center; - color: lightcyan; - border: 1px solid lightcyan; - background: url('ruler-top.gif') 0px -1px repeat-x; - z-index: 1001; - } - -p.cm { - font-weight: bold; - } - -div.popup-menu { - position: absolute; - top: 0px; - padding: 0px 2px; - font-family: Verdana, Arial, Helvetica, sans-serif; - border: 2px solid lightcyan; - background-color: lightgrey; - text-align: center; - visibility: hidden; - z-index: 1005; - } - -div.popup-menu p { - margin: 2px 0px; - padding: 0px; - } - -div.popup-menu p:hover { - background-color: #ffa060; - } - -div.popup-menu a { - text-decoration: none; - color: black; - } - -div#about { - position: absolute; - width: 200px; - top: 100px; - left: 350px; - height: 200px; - padding: 0px 2px; - font-family: Verdana, Arial, Helvetica, sans-serif; - border: 2px solid lightcyan; - background-color: lightgrey; - text-align: center; - visibility: hidden; - z-index: 1000; - } - -div#about p { - margin: 6px; - } - - -/* DEBUG elements */ - -div#debug { - position: absolute; - width: 150px; - top: 50px; - right: 36px; - bottom: 50px; - overflow: auto; - padding: 0px 2px; - font-family: Verdana, Arial, Helvetica, sans-serif; - color: lightgreen; - border: 1px dotted black; - background-color: transparent; - visibility: hidden; - } - -div#debug p.debug, h1 { - font-weight: bold; - color: lightcyan; - } - -div#debug p, h1 { - margin: 0px; - padding: 2px 0px; - font-size: 9px; - background-color: black; - } - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/diginew.jsp --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/diginew.jsp Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,618 +0,0 @@ - -<%@ page language="java" pageEncoding="UTF-8"%><%! - // -- JSP init ------------- - - // create DocumentBean instance for all JSP requests - digilib.servlet.DocumentBean docBean = new digilib.servlet.DocumentBean(); - - // initialize DocumentBean instance in JSP init - public void jspInit() { - try { - // set servlet init-parameter - docBean.setConfig(getServletConfig()); - } catch (javax.servlet.ServletException e) { - System.out.println(e); - } - } - // -- end of JSP init ------------- -%><% - // -- JSP request ------------- - - // parsing the query - // ----------------- - digilib.servlet.DigilibRequest dlRequest = new digilib.servlet.DigilibRequest(request); - docBean.setRequest(dlRequest); - // check if authentication is needed and redirect if necessary - docBean.doAuthentication(response); - // add number of pages - dlRequest.setValue("pt", docBean.getNumPages()); - // store objects for jsp:include - pageContext.setAttribute("docBean", docBean, pageContext.REQUEST_SCOPE); - -%> - - - Digital Document Library NG - - - - - - - - - - - - - - - -

    - -
    - -
    - - -
    -
    - - -
    - - - - - -
    - - - - - - - - -
    -

    Digilib Graphic Viewer

    - - - -

    -

    -

    -

    -
    - - -
    -
    -

    measure the length of this scale on your screen

    -
    -
    - - - - - - - - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - - - - -
    -
    -
    - - - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    -
    - -
    - -

    Debug

    - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/dlMenu.html --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/dlMenu.html Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,175 +0,0 @@ - - - - - - - - - - -
    -
    -
    -

    -
    -

    -
    -
    -
    -

    -

    -

    - - - - - - - - - - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/dllib.js --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/dllib.js Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1045 +0,0 @@ -/* Copyright (C) 2003,2004 IT-Group MPIWG, WTWG Uni Bern and others - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - -Authors: - Christian Luginbuehl, 01.05.2003 (first version) - DW 24.03.2004 (Changed for digiLib in Zope) - Robert Casties, 8.11.2005 - Martin Raspe , 12.12.2005 - Robert Casties, 4.9.2009 - - ! Requires baselib.js ! -*/ -digilibVersion = "Digilib NG"; -dllibVersion = "2.042"; - -function identify() { - // used for identifying a digilib instance - // Relato uses that function - lugi - return digilibVersion; -} - -function createMarkDiv(index) { - var div = document.createElement("div"); - div.className = "mark"; - div.id = "mark" + index; - div.innerHTML = index + 1; - document.body.appendChild(div); - return div; -} - -function bestPicSize(elem, inset) { - // returns a Size with the best image size for the given element - if (! defined(inset)) { - inset = 0; - // original value was 25 - // digilib seems to use the available space better without inset - } - var ws = getWinSize(); - var es = getElementPosition(elem); - if (es) { - ws.width = ws.width - es.x - inset; - ws.height = ws.height - es.y - inset; - } - return ws; -} - - -/**************************************************** - * digilib specific classes (must be defined first) - ****************************************************/ - -/* - * Marks class - */ -function Marks() { - return this; -} -// Marks inherits from Array -Marks.prototype = new Array(); -Marks.prototype.parse = function(query) { - this.length = 0; - if (query.indexOf(";") >= 0) { - var pa = query.split(";"); // old format with ";" - } else { - var pa = query.split(","); // new format - } - for (var i = 0; i < pa.length ; i++) { - var pos = pa[i].split("/"); - if (pos.length > 1) this.push(new Position(pos[0], pos[1])); - } -} -Marks.prototype.getAll = function() { - var ma = new Array(); - for (var i = 0; i < this.length; i++) { - ma.push(cropFloat(this[i].x) + "/" + cropFloat(this[i].y)); - } - return ma.join(","); -} -Marks.prototype.addEvent = function(evt, digilib) { - // add a mark from a screen event - if (!digilib) digilib = dl; - var pos = digilib.trafo.invtransform(evtPosition(evt)); - this.push(pos); -} - -/* - * DLParameters -- digilib parameter class - */ -function DLParameters() { - // flags for parameter sets - this.PARAM_FILE = 1; - this.PARAM_MODE = 2; - this.PARAM_DIM = 4; - this.PARAM_IMAGE = 8; - this.PARAM_DPI = 16; - this.PARAM_SIZE = 32; - this.PARAM_MARK = 64; - this.PARAM_PAGES = 128; - this.PARAM_CLIENT = 256; - /* request parameters */ - with (this) { - // file - define('fn', '', PARAM_FILE); - define('pn', '1', PARAM_FILE); - // mode - define('mo', '', PARAM_MODE); - // relative dimensions of zoomed image - define('wx', '0.0', PARAM_DIM); - define('wy', '0.0', PARAM_DIM); - define('ww', '1.0', PARAM_DIM); - define('wh', '1.0', PARAM_DIM); - // image manipulation - define('brgt', '0.0', PARAM_IMAGE); - define('cont', '0.0', PARAM_IMAGE); - define('rot', '0.0', PARAM_IMAGE); - define('rgba', '', PARAM_IMAGE); - define('rgbm', '', PARAM_IMAGE); - // resolution - define('ddpi', '', PARAM_DPI); - define('ddpix', '', PARAM_DPI); - define('ddpiy', '', PARAM_DPI); - // marks - define('mk', '', PARAM_MARK); - // pages total - define('pt', '0', PARAM_PAGES); - // size - define('ws', '1.0', PARAM_SIZE); - // client side options - define('clop', '', PARAM_CLIENT); - } - return this; -} -DLParameters.prototype = new Parameters(); -// move the inherited getAll because we need it later -DLParameters.prototype._getAll = Parameters.prototype.getAll; -DLParameters.prototype.getAll = function(paDetail, moDetail, digilib) { - if (!digilib) digilib = dl; - // get Flags and Marks first - var mo = digilib.flags.getAll(moDetail); - this.set("mo", mo); - var clop = digilib.opts.getAll(); - this.set("clop", clop); - var mk = digilib.marks.getAll(); - this.set("mk", mk); - var ret = this._getAll(paDetail); - return ret; -} - -/* - * DLModes -- digilib flags class - */ -function DLFlags() { - // flags for mode sets - this.MODE_QUAL = 1; - this.MODE_SIZE = 2; - this.MODE_MIR = 4; - this.MODE_OTHER = 128; - this.MODE_ALL = 255; - /* mode flags */ - with (this) { - define('q0', MODE_QUAL); - define('q1', MODE_QUAL); - define('q2', MODE_QUAL); - define('fit', MODE_SIZE); - define('clip', MODE_SIZE); - define('osize', MODE_SIZE); - define('vmir', MODE_MIR); - define('hmir', MODE_MIR); - } - return this; -} -// inherits from Flags -DLFlags.prototype = new Flags(); - - -/* - * Digilib -- digilib base class - */ -function Digilib() { - if (!baseLibVersion) alert("ERROR: baselib.js not loaded!"); - /* constants */ - this.MAX_AREA = new Rectangle(0.0, 0.0, 1.0, 1.0); - // default inset (for scalerImg relativ to scalerDiv - this.INSET = 40; // because of scrollbars of main window and scaler [Firefox bug?] - // mouse drag area that counts as one click - this.MIN_AREA_SIZE = 3 * 3 + 1; - // standard zoom factor - this.ZOOMFACTOR = Math.sqrt(2); - // bird's eye view dimensions - this.BIRD_MAXX = 200; - this.BIRD_MAXY = 200; - // witdh of arrow bars - this.ARROW_WIDTH = 32; - // width of calibration bar - this.CALIBRATION_WIDTH = 64; - /* variables */ - this.fitOnlyWidth = false; - this.fitOnlyHeight = false; - this.trafo = null; - // page elements - this.scalerDiv = null; - this.scalerImg = null; - this.buttons1Div = null; - this.buttons2Div = null; - /* parse parameters */ - this.params = new DLParameters(); - // put the query parameters (sans "?") in the parameters array - this.params.parse(location.search.slice(1)); - // treat special parameters - this.area = this.parseArea(); - this.marks = new Marks(); - this.marks.parse(this.params.get("mk")); - this.flags = new DLFlags(); - this.flags.parse(this.params.get("mo")); - this.opts = new Flags(); - this.opts.parse(this.params.get("clop")); - return this; -} -Digilib.prototype.setDLParam = function(e, s, relative) { - // sets parameter based on HTML event - var nam; - var val; - if (s.type && (s.type == "select-one")) { - nam = s.name; - val = s.options[s.selectedIndex].value; - } else if (s.name && s.value) { - nam = s.name; - val = s.value; - } - if (nam && val) { - dl.params.set(nam, val, relative); - display(); - } else { - alert("ERROR: unable to process event!"); - } - return true; -} -Digilib.prototype.parseArea = function() { - // returns area Rectangle from current parameters - return new Rectangle( - this.params.get("wx"), - this.params.get("wy"), - this.params.get("ww"), - this.params.get("wh")); -} -Digilib.prototype.setParamFromArea = function(rect) { - // sets digilib wx etc. from rect - this.params.set("wx", cropFloat(rect.x)); - this.params.set("wy", cropFloat(rect.y)); - this.params.set("ww", cropFloat(rect.width)); - this.params.set("wh", cropFloat(rect.height)); - return true; -} - -Digilib.prototype.parseTrafo = function(elem) { - // returns Transform from current dlArea and picsize - var picsize = getElementRect(elem); - var trafo = new Transform(); - // subtract area offset and size - trafo.concat(trafo.getTranslation(new Position(-this.area.x, -this.area.y))); - trafo.concat(trafo.getScale(new Size(1/this.area.width, 1/this.area.height))); - // scale to screen size - trafo.concat(trafo.getScale(picsize)); - trafo.concat(trafo.getTranslation(picsize)); - // FIX ME: Robert, kannst Du mal nachsehen, ob das folgende tut, was es soll? - // oder gibt es dafuer neuen Code? -- ROC: Bisher funktioniert es nicht! - // rotate - //var rot = getRotation(- dl.params.get("rot"), new Position(0.5*picsize.width, 0.5*picsize.height)); - //trafo.concat(rot); - // mirror - //if (hasFlag("hmir")) trafo.m00 = - trafo.m00; // ?? - //if (hasFlag("vmir")) trafo.m11 = - trafo.m11; // ?? - return trafo; -} - -Digilib.prototype.onLoad = function() { - // initialize digilib; called by body.onload - this.scalerDiv = getElement("scaler", true); - this.scalerImg = getElement("pic", true); - this.buttons1Div = getElement("buttons", true); - this.buttons2Div = getElement("options", true); - /* - * if (this.scalerImg == null && this.scalerDiv) { // in N4 pic is in the - * scaler layer this.scalerImg = this.scalerDiv.document.images[0]; } - */ - if ((!this.scalerImg)||(!this.scalerDiv)) { - alert("Sorry, digilib doesn't work here!"); - return false; - } - // fix fixed menus - var ms1 = getElementSize(this.buttons1Div); - var ms2 = getElementSize(this.buttons2Div); - var maxh = (ms1.height > ms2.height) ? ms1.height : ms2.height; - var wins = getWinSize(); - if ((wins.height <= maxh) || (browserType.isIE && (browserType.versIE < 7))) { - // unlock fixed menus to absolute if window is too small or IE - this.buttons1Div.style.position = "absolute"; - this.buttons2Div.style.position = "absolute"; - } - this.setScalerImage(); // setzt auch onImgLoad - this.setBirdImage(); // laedt das Bird's Eye Bild -} - -Digilib.prototype.setScalerImage = function() { - // set the scaler image source (needs the browser size) - var picsize = bestPicSize(this.scalerDiv); - var menusize = getElementSize(this.buttons1Div); - // subtract menu width - picsize.width -= menusize.width; - picsize.height -= this.INSET; - // compose Scaler URL - var src = "../servlet/Scaler?" - + this.params.getAll(this.params.PARAM_ALL & ~(this.params.PARAM_MARK | this.params.PARAM_PAGES)); - if (this.opts.get('fitwidth')) { - src += "&dw=" + picsize.width; - } else if (this.opts.get('fitheight')) { - src += "&dh=" + picsize.height; - } else { - src += "&dw=" + picsize.width + "&dh=" + picsize.height; - } - // debug(src); - this.scalerImg.onload = onImgLoad; - this.scalerImg.src = src; - - var digilib = this; - // this is a local callback function that can use the current scope - - function onImgLoad() { - if (! digilib) - return; - // make sure the image is loaded so we know its size - /* this test seems to have problems sometimes :-( - if (defined(digilib.scalerImg.complete) && !digilib.scalerImg.complete) { - alert("ERROR: the image seems not to be complete in onImgLoad!?"); - } */ - digilib.trafo = digilib.parseTrafo(digilib.scalerImg); - // display marks - digilib.renderMarks(); - digilib.showBirdDiv(isBirdDivVisible); - digilib.showArrows(); // show arrow overlays for zoom navigation - //digilib.moveCenter(true); // click to move point to center - // new Slider("sizes", 1, 5, 2); - - //Drag Image (8.9.2009) - if (!digilib.isFullArea()) - registerEvent("mousedown", digilib.scalerDiv, dragImage); - - focus(); - } -} - -Digilib.prototype.renderMarks = function() { - // make sure the image is loaded so we know its size - if (!this.trafo) { - alert("ERROR: trafo missing, cannot render marks!"); - return; - } - // debugProps(dlArea, "dlArea"); - for (var i = 0; i < this.marks.length; i++) { - var div = getElement("mark" + i, true) || createMarkDiv(i); - var mark = this.marks[i]; - // debugProps(mark, "mark"); - if (this.area.containsPosition(mark)) { - var mpos = this.trafo.transform(mark); - // debugProps(mark, "mpos"); - // better not hide the marked spot (MR) - // suboptimal to place -5 pixels and not half size of mark-image - // mpos.x = mpos.x -5; - // mpos.y = mpos.y -5; - moveElement(div, mpos); - showElement(div, true); - } else { - // hide the other marks - showElement(div, false); - } - } -} - -Digilib.prototype.display = function(detail, moDetail) { - // redisplay the page - var queryString = this.params.getAll(detail, moDetail); - location.href - = location.protocol + "//" - + location.host - + location.pathname - + "?" + queryString; -} - -/* ********************************************** - * interactive digilib functions - * ******************************************** */ - -Digilib.prototype.setMark = function() { - // add a mark where clicked - window.focus(); - this.moveCenter(false); - - // start event capturing - registerEvent("mousedown", this.scalerDiv, markEvent); - - // our own reference to this for the local function - var digilib = this; - - function markEvent(evt) { - // event handler adding a new mark - unregisterEvent("mousedown", digilib.scalerDiv, markEvent); - digilib.marks.addEvent(evt); - digilib.display(); - return stopEvent(evt); - } - -} - -Digilib.prototype.removeMark = function() { - // remove the last mark - this.marks.pop(); - this.display(); -} - -Digilib.prototype.resetImage = function() { - // reset the image to its original state - this.display(this.params.PARAM_FILE); // keep only fn/pn -} - -Digilib.prototype.dragImage = function(evt) { - // drag the image and load a new detail on mouse up - // makes sense only when zoomed - if (this.isFullArea()) - return; - if(evt.preventDefault) evt.preventDefault(); // no Firefox drag and drop - var digilib = this; // our own reference to this for the local function - var startPos = evtPosition(evt); - var pic = this.scalerImg; - var picRect = getElementRect(pic); - // fit the grey div to the scaler image - var div = getElement("bg"); - var dx = 0; - var dy = 0; - moveElement(div, picRect); - // hide the scaler image, show it as background of div instead - showElement(pic, false); - showElement(div, true); - div.style.backgroundImage = "url(" + pic.src + ")"; - div.style.cursor = "move"; - // start event capturing - registerEvent("mousemove", document, moveDragEvent); - registerEvent("mouseup", document, moveEndEvent); - window.focus(); - - function moveDragEvent(evt) { - // mousemove handler: drag - var pos = evtPosition(evt); - // don't use Firefox Drag and Drop feature - if(evt.preventDefault) evt.preventDefault(); - dx = pos.x - startPos.x; - dy = pos.y - startPos.y; - // move the background image to the new position - div.style.backgroundPosition = dx + "px " + dy + "px"; - return stopEvent(evt); - } - - function moveEndEvent(evt) { - // mouseup handler: reload digilib - div.style.cursor = "default"; - unregisterEvent("mousemove", document, moveDragEvent); - unregisterEvent("mouseup", document, moveEndEvent); - // calculate relative offset - var x = -dx / pic.width; - var y = -dy / pic.height; - stopEvent(evt); - if (dx == 0 && dy == 0) - return // no movement - // reload with scaler image showing the new ausschnitt - return digilib.moveBy(x, y); - } -} - -Digilib.prototype.zoomArea = function() { - var pt1, pt2; - var zoomdiv = getElement("zoom"); - var overlay = getElement("overlay"); - // use overlay div to avoid mousemove problems - var picRect = getElementRect(this.scalerImg); - // FIX ME: is there a way to query the border width from CSS info? - // rect.x -= 2; // account for overlay borders - // rect.y -= 2; - moveElement(overlay, picRect); - showElement(overlay, true); - // start event capturing - registerEvent("mousedown", overlay, zoomStart); - registerEvent("mousedown", this.scalerImg, zoomStart); - window.focus(); - - // our own reference to "this" for the local functions - var digilib = this; - - // mousedown handler: start moving - function zoomStart(evt) { - pt1 = evtPosition(evt); - unregisterEvent("mousedown", overlay, zoomStart); - unregisterEvent("mousedown", digilib.scalerImg, zoomStart); - // setup and show zoom div - moveElement(zoomdiv, Rectangle(pt1.x, pt1.y, 0, 0)); - showElement(zoomdiv, true); - // register events - registerEvent("mousemove", document, zoomMove); - registerEvent("mouseup", document, zoomEnd); - return stopEvent(evt); - } - - // mouseup handler: end moving - function zoomEnd(evt) { - pt2 = evtPosition(evt); - // assume a click if the area is too small (up to 3 x 3 pixel) - var clickRect = new Rectangle(pt1, pt2); - clickRect.normalize(); - if (clickRect.getArea() <= digilib.MIN_AREA_SIZE) { - return stopEvent(evt); - } - // hide zoom div - showElement(zoomdiv, false); - showElement(overlay, false); - // unregister events - unregisterEvent("mousemove", document, zoomMove); - unregisterEvent("mouseup", document, zoomEnd); - // clip and transform - clickRect.clipTo(picRect); - var area = digilib.trafo.invtransform(clickRect); - digilib.setParamFromArea(area); - // zoomed is always fit - digilib.params.set("ws", 1); - digilib.display(); - return stopEvent(evt); - } - - // mouse move handler - function zoomMove(evt) { - pt2 = evtPosition(evt); - var rect = new Rectangle(pt1, pt2); - rect.normalize(); - rect.clipTo(picRect); - // update zoom div - moveElement(zoomdiv, rect); - return stopEvent(evt); - } -} - -Digilib.prototype.zoomBy = function(factor) { - // zooms by the given factor - var newarea = this.area.copy(); - newarea.width /= factor; - newarea.height /= factor; - newarea.x -= 0.5 * (newarea.width - this.area.width); - newarea.y -= 0.5 * (newarea.height - this.area.height); - newarea = this.MAX_AREA.fit(newarea); - this.setParamFromArea(newarea); - this.display(); -} - - -Digilib.prototype.zoomFullpage = function(fit) { - // zooms out to show the whole image - this.params.set("wx", 0.0); - this.params.set("wy", 0.0); - this.params.set("ww", 1.0); - this.params.set("wh", 1.0); - if (fit == "width") { - this.opts.set('fitwidth'); - } else if (fit == "height") { - this.opts.set('fitheight'); - } else { - this.opts.reset('fitwidth'); - this.opts.reset('fitheight'); - } - this.display(); -} - - -Digilib.prototype.moveCenter = function(on) { - // move visible area so that it's centered around the clicked point - if (this.isFullArea()) return; // nothing to do - // starting event capture - if (on) registerEvent("mousedown", this.scalerImg, moveCenterEvent); - else unregisterEvent("mousedown", this.scalerImg, moveCenterEvent); - window.focus(); - - // our own reference to this for the local function - var digilib = this; - - function moveCenterEvent(evt) { - // move to handler - var pt = digilib.trafo.invtransform(evtPosition(evt)); - var newarea = digilib.area.copy(); - newarea.setCenter(pt); - newarea.stayInside(this.MAX_AREA); - // newarea = dlMaxArea.fit(newarea); - // debugProps(newarea, "newarea"); - // debugProps(dlArea, "dlArea"); - if (newarea.equals(digilib.area)) return; // keep event handler - unregisterEvent("mousedown", digilib.scalerImg, moveCenterEvent); - // set parameters - digilib.setParamFromArea(newarea); - digilib.display(); - } -} - -Digilib.prototype.isFullArea = function(area) { - if (!area) area = this.area; - return (area.width == 1.0) && (area.height == 1.0); -} - -Digilib.prototype.canMove = function(movx, movy) { - if (this.isFullArea()) return false; - var x2 = this.area.x + this.area.width; - var y2 = this.area.y + this.area.height; - // debugProps(dlArea); - return ((movx < 0) && (this.area.x > 0)) - || ((movx > 0) && (x2 < 1.0)) - || ((movy < 0) && (this.area.y > 0)) - || ((movy > 0) && (y2 < 1.0)) -} - -Digilib.prototype.moveBy = function(movx, movy) { - // move visible area by movx and movy (in units of ww, wh) - if (!this.canMove(movx, movy)) return; // nothing to do - var newarea = this.area.copy(); - newarea.x += parseFloat(movx)*this.area.width; - newarea.y += parseFloat(movy)*this.area.height; - newarea = this.MAX_AREA.fit(newarea); - // set parameters - this.setParamFromArea(newarea); - this.display(); -} - -Digilib.prototype.getRef = function(baseUrl) { - // returns a reference to the current digilib set - if (!baseUrl) baseUrl - = location.protocol - + "//" - + location.host - + location.pathname; - var hyperlinkRef = baseUrl; - with (this.params) { - // all without ddpi, pt - var ps = getAll(PARAM_ALL & ~(PARAM_DPI | PARAM_PAGES | PARAM_CLIENT)); - } - if (ps.length > 0) hyperlinkRef += "?" + ps; - return hyperlinkRef; -} - -Digilib.prototype.getRefWin = function(type, msg) { - // shows an alert with a reference to the current digilib set - if (! msg) msg = "URL reference to the current view"; - prompt(msg, this.getRef()); -} - -Digilib.prototype.getQuality = function() { - // returns the current q setting - for (var i = 0; i < 3; i++) { - if (this.flags.get("q"+i)) return i; - } - return 1 -} - -Digilib.prototype.setQuality = function(qual) { - // set the image quality - if ((qual < 0)||(qual > 2)) return alert("Quality setting not supported"); - for (var i = 0; i < 3; i++) this.flags.reset("q" + i); - this.flags.set("q" + qual); - this.display(); -} - -Digilib.prototype.setQualityWin = function(msg) { - // dialog for setting quality - if (! msg) msg = "Quality (0..2)"; - var q = this.getQuality(); - var newq = window.prompt(msg, q); - if (newq) this.setQuality(newq); -} - -Digilib.prototype.mirror = function(dir) { - // mirror the image horizontally or vertically - if (dir == "h") { - this.flags.toggle("hmir"); - } else { - this.flags.toggle("vmir"); - } - this.display(); -} - -Digilib.prototype.gotoPage = function(gopage, keep) { - // goto given page nr (+/-: relative) - var oldpn = parseInt(this.params.get("pn")); - // set with relative=true uses the sign - this.params.set("pn", gopage, true); - // now check the outcome - var pn = parseInt(this.params.get("pn")); - if (pn < 1) { - alert("No such page! (Page number too low)"); - this.params.set("pn", oldpn); - return; - } - if (this.params.isSet("pt")) { - pt = parseInt(this.params.get("pt")) - if (pn > pt) { - alert("No such page! (Page number too high)"); - this.params.set("pn", oldpn); - return; - } - } - if (keep) { - this.display(this.params.PARAM_ALL & ~this.params.PARAM_MARK); // all, no mark - } else { - this.display(this.params.PARAM_FILE | this.params.PARAM_MODE | this.params.PARAM_PAGES, this.params.MODE_QUAL | this.params.MODE_OTHER); // fn, pn, ws, mo + pt - } -} - -Digilib.prototype.gotoPageWin = function() { - // dialog to ask for new page nr - var pn = this.params.get("pn"); - var gopage = window.prompt("Go to page", pn); - if (gopage) this.gotoPage(gopage); -} - -Digilib.prototype.setParamWin = function(param, text, relative) { - // dialog to ask for new parameter value - var val = this.params.get(param); - var newval = window.prompt(text, val); - if (newval) { - this.params.set(param, newval, relative); - this.display(); - } -} - -Digilib.prototype.showOptions = function(show) { - // show or hide option div - var elem = getElement("dloptions"); - showElement(elem, show); - // FIX ME: get rid of the dotted line around the buttons when focused - } - -Digilib.prototype.showAboutDiv = function(show) { - // show or hide "about" div - var elem = getElement("about"); - if (elem == null) { - if (show) alert("About Digilib - dialog missing in HTML code!" - + "\nDigilib Version: " + digilibVersion - + "\JSP Version: " + jspVersion - + "\ndlLib Version: " + dllibVersion - + "\nbaseLib Version: " + baseLibVersion); - return; - } - if (show) { - getElement("digilib-version").innerHTML = "Digilib Version: " + digilibVersion; - getElement("jsp-version").innerHTML = "JSP Version: " + jspVersion; - getElement("baselib-version").innerHTML = "baseLib Version: " + baseLibVersion; - getElement("dllib-version").innerHTML = "dlLib Version: " + dllibVersion; - var aboutRect = getElementRect(elem); - aboutRect.setCenter(getWinRect().getCenter()); - moveElement(elem, aboutRect); - } - showElement(elem, show); - } - -Digilib.prototype.setBirdImage = function() { - var img = getElement("bird-image"); - var src = "../servlet/Scaler?" - + this.params.getAll(this.params.PARAM_FILE) - + "&dw=" + this.BIRD_MAXX - + "&dh=" + this.BIRD_MAXY; - img.src = src; -} - -Digilib.prototype.showBirdDiv = function(show) { - // show or hide "bird's eye" div - var startPos; // anchor for dragging - var newRect; // position after drag - var birdImg = getElement("bird-image"); - var birdArea = getElement("bird-area"); - var overlay = getElement("bird-overlay"); - showElement(birdImg, show); - // dont show selector if area has full size - if (!show || this.isFullArea()) { - // hide area - showElement(birdArea, false); - showElement(overlay, false); - return; - }; - var birdImgRect = getElementRect(birdImg); - var area = this.area; - if (this.flags.get("osize") || this.flags.get("clip")) { - // in original-size and pixel-by-pixel mode the area size is not valid - var birdAreaRect = new Rectangle( - birdImgRect.x + birdImgRect.width * area.x, - birdImgRect.y + birdImgRect.height * area.y, - 5, - 5); - } else { - // scale area down to img size - var birdAreaRect = new Rectangle( - // what about borders ?? - birdImgRect.x + birdImgRect.width * area.x, - birdImgRect.y + birdImgRect.height * area.y, - birdImgRect.width * area.width, - birdImgRect.height * area.height); - } - moveElement(birdArea, birdAreaRect); - showElement(birdArea, true); - moveElement(overlay, birdImgRect); - showElement(overlay, true); - registerEvent("mousedown", overlay, birdAreaStartDrag); - registerEvent("mousedown", birdImg, birdAreaStartDrag); - - // our own reference to this for local functions - var digilib = this; - - function birdAreaStartDrag(evt) { - // mousedown handler: start drag - startPos = evtPosition(evt); - unregisterEvent("mousedown", overlay, birdAreaStartDrag); - unregisterEvent("mousedown", birdImg, birdAreaStartDrag); - registerEvent("mousemove", document, birdAreaMove); - registerEvent("mouseup", document, birdAreaEndDrag); - // debugProps(getElementRect(bird)) - return stopEvent(evt); - } - - function birdAreaMove(evt) { - // mousemove handler: drag - var pos = evtPosition(evt); - var dx = pos.x - startPos.x; - var dy = pos.y - startPos.y; - // move birdArea div, keeping size - newRect = new Rectangle( - birdAreaRect.x + dx, - birdAreaRect.y + dy, - birdAreaRect.width, - birdAreaRect.height); - // stay within image - newRect.stayInside(birdImgRect); - moveElement(birdArea, newRect); - showElement(birdArea, true); - return stopEvent(evt); - } - - function birdAreaEndDrag(evt) { - // mouseup handler: reload page - unregisterEvent("mousemove", document, birdAreaMove); - unregisterEvent("mouseup", document, birdAreaEndDrag); - showElement(overlay, false); - if (newRect == null) { // no movement happened - startPos = birdAreaRect.getCenter(); - birdAreaMove(evt); // set center to click position - } - digilib.params.set("wx", cropFloat((newRect.x - birdImgRect.x) / birdImgRect.width)); - digilib.params.set("wy", cropFloat((newRect.y - birdImgRect.y) / birdImgRect.height)); - // zoomed is always fit - digilib.params.set("ws", 1); - digilib.display(); - return stopEvent(evt); - } -} - -Digilib.prototype.showArrow = function(name, rect, show) { - var arrow = getElement(name); - moveElement(arrow, rect); - showElement(arrow, show); -} - -Digilib.prototype.showArrows = function() { - // show the 4 arrow bars on top of scaler img according to current dlArea - var r = getElementRect(this.scalerImg); - this.showArrow('up', - new Rectangle(r.x, r.y, r.width, this.ARROW_WIDTH), - this.canMove(0, -1) - ); - this.showArrow('down', - new Rectangle(r.x, r.y + r.height - this.ARROW_WIDTH, r.width, this.ARROW_WIDTH), - this.canMove(0, 1) - ); - this.showArrow('left', - new Rectangle(r.x, r.y, this.ARROW_WIDTH, r.height), - this.canMove(-1, 0) - ); - this.showArrow('right', - new Rectangle(r.x + r.width - this.ARROW_WIDTH, r.y, this.ARROW_WIDTH, r.height), - this.canMove(1, 0) - ); - } - -Digilib.prototype.calibrate = function() { - // calibrate screen resolution - var calDiv = getElement("calibration"); - var calRect = getElementRect(calDiv); - moveCenter(false); - var wins = getWinSize(); - calRect.setCenter(new Position(wins.width / 2, wins.height / 2)); - moveElement(calDiv, calRect); - showElement(calDiv, true); - var cm = window.prompt("The length of the scale on your screen in centimeter:"); - if (cm) { - var dpi = calRect.width / parseFloat(cm) * 2.54; - this.params.set("ddpi", cropFloat(dpi)); - } - showElement(calDiv, false); -} - - -Digilib.prototype.setScale = function(scale) { - // sets original-size, pixel-by-pixel or fit-to-screen scale type - if (scale == "pixel") { - // pixel by pixel - this.flags.set("clip"); - this.flags.reset("osize"); - this.flags.reset("fit"); - } else if (scale == "original") { - // original size -- needs calibrated screen - if (!this.params.isSet("ddpi")) { - var dpi = cookie.get("ddpi"); - if (dpi == null) { - alert("Your screen has not yet been calibrated - using default value of 72 dpi"); - dpi = 72; - } - this.params.set("ddpi", dpi); - } - this.flags.set("osize"); - this.flags.reset("clip"); - this.flags.reset("fit"); - } else { - // scale to screen size (default) - this.flags.reset("clip"); - this.flags.reset("osize"); - } - this.display(); -} - -Digilib.prototype.getScale = function() { - // returns scale type - if (this.flags.get("clip")) { - return "pixel"; - } else if (this.flags.get("osize")) { - return "original"; - } else { - return "fit"; - } -} - -Digilib.prototype.pageWidth = function() { - this.zoomFullpage('width'); -} - -Digilib.prototype.setSize = function(factor) { - this.params.set("ws", factor); - this.display(); -} - -Digilib.prototype.showMenu = function(menuId, buttonId, show) { - var menu = getElement(menuId); - if (show) { - // align right side of menu with button - var buttonPos = getElementPosition(getElement(buttonId)); - var menusize = getElementSize(menu); - moveElement(menu, new Position(buttonPos.x - menusize.width - 3, buttonPos.y)); - } - showElement(menu, show); -} - - -/******************************** - * global variables - ********************************/ - -var dl = new Digilib(); - -/* old parameter function compatibility stuff */ -function newParameter(a,b,c) {return dl.params.define(a,b,c)}; -function resetParameter(a) {return dl.params.reset(a)}; -function deleteParameter(a) {return dl.params.remove(a)}; -function getParameter(a) {return dl.params.get(a)}; -function setParameter(a,b,c) {return dl.params.set(a,b,c)}; -function hasParameter(a) {return dl.params.isSet(a)}; -function getAllParameters(a) {return dl.params.getAll(a)}; -getQueryString = getAllParameters; -function parseParameters(a) {return dl.params.parse(a)}; -function getAllMarks() {return dl.marks.getAll()}; -getMarksQueryString = getAllMarks; -function addMark(evt) {return dl.marks.addEvent(evt)}; -function deleteMark() {return dl.marks.pop()}; -function deleteAllMarks() {return dl.marks = new Marks()}; -function hasFlag(mode) {return dl.flags.get(mode)}; -function addFlag(mode) {return dl.flags.set(mode)}; -function removeFlag(mode) {return dl.flags.reset(mode)}; -function toggleFlag(mode) {return dl.flags.toggle(mode)}; -function getAllFlags() {return dl.flags.getAll()}; -/* old digilib function compatibility */ -function setDLParam(e, s, relative) {dl.setDLParam(e, s, relative)}; -function display(detail, moDetail) {dl.display(detail, moDetail)}; -function setMark(reload) {dl.setMark(reload)}; -function removeMark(reload) {dl.removeMark(reload)}; -function resetImage() {dl.resetImage()}; -function dragImage(evt) {dl.dragImage(evt)}; -function zoomArea() {dl.zoomArea()}; -function zoomBy(factor) {dl.zoomBy(factor)}; -function zoomFullpage(a) {dl.zoomFullpage(a)}; -function moveCenter(on) {dl.moveCenter(on)}; -function isFullArea(area) {dl.isFullArea(area)}; -function canMove(movx, movy) {dl.canMove(movx, movy)}; -function moveBy(movx, movy) {dl.moveBy(movx, movy)}; -function getRef(baseURL) {dl.getRef(baseURL)}; -function getRefWin(type, msg) {dl.getRefWin(type, msg)}; -function getQuality() {dl.getQuality()}; -function setQuality(qual) {dl.setQuality(qual)}; -function setQualityWin(msg) {dl.setQualityWin(msg)}; -function mirror(dir) {dl.mirror(dir)}; -function gotoPage(gopage, keep) {dl.gotoPage(gopage, keep)}; -function gotoPageWin() {dl.gotoPageWin()}; -function setParamWin(param, text, relative) {dl.setParamWin(param, text, relative)}; -function showOptions(show) {dl.showOptions(show)}; -function showBirdDiv(show) {dl.showBirdDiv(show)}; -function showAboutDiv(show) {dl.showAboutDiv(show)}; -function calibrate(direction) {dl.calibrate(direction)}; -function setScale(a) {dl.setScale(a)}; -function getScale(a) {dl.getScale(a)}; -function originalSize(on) {dl.originalSize(on)}; -function pixelByPixel(on) {dl.pixelByPixel(on)}; -function pageWidth() {dl.pageWidth()}; -function setSize(factor) {dl.setSize(factor)}; -function showMenu(a,b,c) {dl.showMenu(a,b,c)}; - - -// :tabSize=4:indentSize=4:noTabs=true: - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/down.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/down.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/down.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/down.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/first.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/first.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/first.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/first.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,106 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/firstlast.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/firstlast.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,111 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/fixed.js --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/fixed.js Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,354 +0,0 @@ -// fixed.js: fix fixed positioning and fixed backgrounds in IE/Win -// version 1.8, 08-Aug-2003 -// written by Andrew Clover , use freely - -/*@cc_on -@if (@_win32 && @_jscript_version>4) - -var fixed_positions= new Array(); -var fixed_backgrounds= new Array(); -var fixed_viewport; - -// Initialisation. Called when the tag arrives. Set up viewport so the -// rest of the script knows we're going, and add a measurer div, used to detect -// font size changes and measure image sizes for backgrounds later - -function fixed_init() { - fixed_viewport= (document.compatMode=='CSS1Compat') ? - document.documentElement : document.body; - var el= document.createElement('div'); - el.setAttribute('id', 'fixed-measure'); - el.style.position= 'absolute'; - el.style.top= '0'; el.style.left= '0'; - el.style.overflow= 'hidden'; el.style.visibility= 'hidden'; - el.style.fontSize= 'xx-large'; el.style.height= '5em'; - el.style.setExpression('width', 'fixed_measureFont()'); - document.body.insertBefore(el, document.body.firstChild); -} - -// Binding. Called every time an element is added to the document, check it -// for fixed features, if found add to our lists and set initial props - -function fixed_bind(el) { - var needLayout= false; - var tag= el.tagName.toLowerCase(); - var st= el.style; - var cst= el.currentStyle; - var anc; - - // find fixed-position elements - if (cst.position=='fixed') { - needLayout= true; - fixed_positions[fixed_positions.length]= el; - // store original positioning as we'll overwrite it - st.position= 'absolute'; - st.fixedPLeft= cst.left; - st.fixedPTop= cst.top; - st.fixedPRight= cst.right; - st.fixedPBottom= cst.bottom; - st.fixedPWidth= fixed_parseLength(cst.width); - st.fixedPHeight= fixed_parseLength(cst.height); - // find element that will act as containing box, for convenience later - st.fixedCB= null; - for (anc= el; (anc= anc.parentElement).parentElement;) { - if (anc.currentStyle.position!='static') { - st.fixedCB= anc; - break; - } } - // detect nested fixed positioning (only ancestor need move) - st.fixedNest= false; - for (anc= el; anc= anc.parentElement;) { - if (anc.style.fixedNest!=null) - st.fixedNest= true; - break; - } - } - - // find fixed-background elements (not body/html which IE already gets right) - if (cst.backgroundAttachment=='fixed' && tag!='body' && tag!='html') { - needLayout= true; - fixed_backgrounds[fixed_backgrounds.length]= el; - // get background offset, converting from keyword if necessary - st.fixedBLeft= fixed_parseLength(cst.backgroundPositionX); - st.fixedBTop= fixed_parseLength(cst.backgroundPositionY); - // if it's a non-zero %age, need to know size of image for layout - if (st.fixedBLeft[1]=='%' || st.fixedBTop[1]=='%') { - st.fixedBWidth= 0; st.fixedBHeight= 0; - fixed_measureBack(el); - } - } - if (needLayout) fixed_layout(); -} - -// Layout. On every window or font size change, recalculate positioning - -// Request re-layout at next free moment -var fixed_delaying= false; -function fixed_delayout() { - if (fixed_delaying) return; - fixed_delaying= true; - window.setTimeout(fixed_layout, 0); -} - -var fixed_ARBITRARY= 200; - -function fixed_layout() { - fixed_delaying= false; - if (!fixed_viewport) return; - var i, el, st, j, pr, tmp, A= 'auto'; - var cb, cbLeft, cbTop, cbRight, cbBottom, oLeft, oTop, oRight, oBottom; - var vpWidth=fixed_viewport.clientWidth, vpHeight=fixed_viewport.clientHeight; - - // calculate initial position for fixed-position elements [black magic] - for (i= fixed_positions.length; i-->0;) { - el= fixed_positions[i]; st= el.style; - // find positioning of containing block - cb= st.fixedCB; if (!cb) cb= fixed_viewport; - cbLeft= fixed_pageLeft(cb); cbTop= fixed_pageTop(cb); - if (cb!=fixed_viewport) { cbLeft+= cb.clientLeft; cbTop+= cb.clientTop; } - cbRight= fixed_viewport.clientWidth-cbLeft-cb.clientWidth; - cbBottom= fixed_viewport.clientHeight-cbTop-cb.clientHeight; - // if size is in %, must recalculate relative to viewport - if (st.fixedPWidth[1]=='%') - st.width= Math.round(vpWidth*st.fixedPWidth[0]/100)+'px'; - if (st.fixedPHeight[1]=='%') - st.height= Math.round(vpHeight*st.fixedPHeight[0]/100)+'px'; - // find out offset values at max size, to account for margins - st.left= A; st.right= '0'; st.top= A; st.bottom= '0'; - oRight= el.offsetLeft+el.offsetWidth; oBottom= el.offsetTop+el.offsetHeight; - st.left= '0'; st.right= A; st.top= '0'; st.bottom= A; - oLeft= el.offsetLeft; oTop= el.offsetTop; - // use this to convert all edges to pixels - st.left= A; st.right= st.fixedPRight; - st.top= A; st.bottom= st.fixedPBottom; - oRight-= el.offsetLeft+el.offsetWidth; - oBottom-= el.offsetTop+el.offsetHeight; - st.left= st.fixedPLeft; st.top= st.fixedPTop; - oLeft= el.offsetLeft-oLeft; oTop= el.offsetTop-oTop; - // edge positioning fix - if (st.fixedPWidth[1]==A && st.fixedPLeft!=A && st.fixedPRight!=A) { - tmp= el.offsetLeft; st.left= A; st.width= fixed_ARBITRARY+'px'; - tmp= fixed_ARBITRARY+el.offsetLeft-tmp+cbLeft+cbRight; - st.left= st.fixedPLeft; st.width= ((tmp<1)?1:tmp)+'px'; - } - if (st.fixedPHeight[1]==A && st.fixedPTop!=A && st.fixedPBottom!=A) { - tmp= el.offsetTop; st.top= A; st.height= fixed_ARBITRARY+'px'; - tmp= fixed_ARBITRARY+el.offsetTop-tmp+cbTop+cbBottom; - st.top= st.fixedPTop; st.height= ((tmp<1)?1:tmp)+'px'; - } - // move all non-auto edges relative to the viewport - st.fixedCLeft= (st.fixedPLeft=='auto') ? oLeft : oLeft-cbLeft; - st.fixedCTop= (st.fixedPTop=='auto') ? oTop : oTop-cbTop; - st.fixedCRight= (st.fixedPRight=='auto') ? oRight : oRight-cbRight; - st.fixedCBottom= (st.fixedPBottom=='auto') ? oBottom : oBottom-cbBottom; - // remove left-positioning of right-positioned elements - if (st.fixedPLeft=='auto' && st.fixedPRight!='auto') st.fixedCLeft= 'auto'; - if (st.fixedPTop=='auto' && st.fixedPBottom!='auto') st.fixedCTop= 'auto'; - } - - - // calculate initial positioning of fixed backgrounds - for (i= fixed_backgrounds.length; i-->0;) { - el= fixed_backgrounds[i]; st= el.style; - tmp= st.fixedBImage; - if (tmp) { - if (tmp.readyState!='uninitialized') { - st.fixedBWidth= tmp.offsetWidth; - st.fixedBHeight= tmp.offsetHeight; - st.fixedBImage= window.undefined; - } - } - st.fixedBX= fixed_length(el, st.fixedBLeft, vpWidth-st.fixedBWidth); - st.fixedBY= fixed_length(el, st.fixedBTop, vpHeight-st.fixedBHeight); - } - - // now call scroll() to set the positions from the values just calculated - fixed_scroll(); -} - -// Scrolling. Offset fixed elements relative to viewport scrollness - -var fixed_lastX, fixed_lastY; -var fixed_PATCHDELAY= 300; -var fixed_patching= false; - -// callback function after a scroll, because incorrect scroll position is -// often reported first go! -function fixed_patch() { - fixed_patching= false; - var scrollX= fixed_viewport.scrollLeft, scrollY= fixed_viewport.scrollTop; - if (scrollX!=fixed_lastX && scrollY!=fixed_lastY) fixed_scroll(); -} - -function fixed_scroll() { - if (!fixed_viewport) return; - var i, el, st, viewportX, viewportY; - var scrollX= fixed_viewport.scrollLeft, scrollY= fixed_viewport.scrollTop; - fixed_lastX= scrollX; fixed_lastY= scrollY; - - // move non-nested fixed-position elements - for (i= fixed_positions.length; i-->0;) { - st= fixed_positions[i].style; - viewportX= (st.fixedNest) ? 0 : scrollX; - viewportY= (st.fixedNest) ? 0 : scrollY; - if (st.fixedCLeft!='auto') st.left= (st.fixedCLeft+viewportX)+'px'; - if (st.fixedCTop!='auto') st.top= (st.fixedCTop+viewportY)+'px'; - viewportX= (st.fixedCB==null || st.fixedCB==fixed_viewport) ? 0 : viewportX; - viewportY= (st.fixedCB==null || st.fixedCB==fixed_viewport) ? 0 : viewportY; - st.right= (st.fixedCRight-viewportX+1)+'px'; st.right= (st.fixedCRight-viewportX)+'px'; - st.bottom= (st.fixedCBottom-viewportY+1)+'px'; st.bottom= (st.fixedCBottom-viewportY)+'px'; - } - - // align fixed backgrounds to viewport - for (i= fixed_backgrounds.length; i-->0;) { - el= fixed_backgrounds[i]; st= el.style; - viewportX= scrollX; - viewportY= scrollY; - while (el.offsetParent) { - viewportX-= el.offsetLeft+el.clientLeft; - viewportY-= el.offsetTop +el.clientTop; - el= el.offsetParent; - } - st.backgroundPositionX= (st.fixedBX+viewportX)+'px'; - st.backgroundPositionY= (st.fixedBY+viewportY)+'px'; - } - - // call back again in a tic - if (!fixed_patching) { - fixed_patching= true; - window.setTimeout(fixed_patch, fixed_PATCHDELAY); - } -} - -// Measurement. Load bg-image into an invisible element on the page, when -// loaded write the width/height to an element's style for layout use; detect -// when font size changes - -function fixed_measureBack(el) { - var measure= document.getElementById('fixed-measure'); - var img= document.createElement('img'); - img.setAttribute('src', fixed_parseURL(el.currentStyle.backgroundImage)); - measure.appendChild(img); - el.style.fixedBImage= img; - if (img.readyState=='uninitialized') - img.attachEvent('onreadystatechange', fixed_measureBackImage_ready); -} - -function fixed_measureBackImage_ready() { - var img= event.srcElement; - if (img && img.readyState!='uninitialized') { - img.detachEvent('onreadystatechange', fixed_measureBackImage_ready); - fixed_layout(); - } -} - -var fixed_fontsize= 0; -function fixed_measureFont() { - var fs= document.getElementById('fixed-measure').offsetHeight; - if (fixed_fontsize!=fs && fixed_fontsize!=0) - fixed_delayout(); - fixed_fontsize= fs; - return '5em'; -} - -// Utility. General-purpose functions - -// parse url() to get value inside - -function fixed_parseURL(v) { - v= v.substring(4, v.length-1); - if (v.charAt(0)=='"' && v.charAt(v.length-1)=='"' || - v.charAt(0)=="'" && v.charAt(v.length-1)=="'") - return v.substring(1, v.length-1); - else return v; -} - -// parse length or auto or background-position keyword into number and unit - -var fixed_numberChars= '+-0123456789.'; -var fixed_ZERO= new Array(0, 'px'); -var fixed_50PC= new Array(50, '%'); -var fixed_100PC= new Array(100, '%'); -var fixed_AUTO= new Array(0, 'auto'); - -function fixed_parseLength(v) { - var num, i; - if (v=='left' || v=='top') return fixed_ZERO; - if (v=='right' || v=='bottom') return fixed_100PC; - if (v=='center') return fixed_50PC; - if (v=='auto') return fixed_AUTO; - i= 0; - while (i arrives, then call main init. Pass any new elements -// found on each scan to be bound - -var fixed_SCANDELAY= 500; - -function fixed_scan() { - if (!document.body) return; - if (!fixed_viewport) fixed_init(); - var el; - for (var i= 0; i - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/help.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/help.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/help.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/help.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,115 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - ? - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/last.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/last.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/last.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/last.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,106 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/left.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/left.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/left.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/left.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mark-bg-16.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mark-bg-16.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mark-bg.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mark-bg.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mark-bg.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mark-bg.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,119 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mark-bg_old.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mark-bg_old.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mark.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mark.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mark.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mark.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - 1 - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mirror-horizontal-on.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mirror-horizontal-on.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mirror-horizontal-on.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mirror-horizontal-on.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,103 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mirror-horizontal.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mirror-horizontal.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mirror-horizontal.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mirror-horizontal.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,103 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mirror-vertical-on.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mirror-vertical-on.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mirror-vertical-on.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mirror-vertical-on.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mirror-vertical.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mirror-vertical.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mirror-vertical.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mirror-vertical.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mirror.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mirror.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,112 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/options.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/options.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/options.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/options.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/original-size.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/original-size.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/original-size.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/original-size.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,137 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - 1 - 1 - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/page.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/page.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/page.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/page.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,102 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/pagewidth.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/pagewidth.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/pagewidth.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/pagewidth.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,136 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/pixel-by-pixel.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/pixel-by-pixel.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/pixel-by-pixel.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/pixel-by-pixel.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,135 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/quality.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/quality.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/quality.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/quality.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,114 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - Q - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/reference.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/reference.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/reference.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/reference.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,107 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - http: - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/reset.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/reset.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/reset.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/reset.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,138 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/rgb-on.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/rgb-on.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/rgb-on.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/rgb-on.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,119 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/rgb.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/rgb.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/rgb.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/rgb.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,125 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/right.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/right.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/right.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/right.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/rightleft.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/rightleft.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,103 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/rotate-on.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/rotate-on.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/rotate-on.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/rotate-on.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/rotate.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/rotate.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/rotate.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/rotate.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/ruler-top.gif Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/ruler-top.gif has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/size.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/size.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/size.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/size.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,174 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/trans.gif Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/trans.gif has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/up.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/up.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/up.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/up.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/zoom-area.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/zoom-area.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/zoom-area.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/zoom-area.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,114 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/zoom-full.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/zoom-full.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/zoom-full.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/zoom-full.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,107 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/zoom-in.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/zoom-in.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/zoom-in.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/zoom-in.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,136 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/zoom-out.png Binary file src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/zoom-out.png has changed diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/zoom-out.svg --- a/src/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/zoom-out.svg Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,129 +0,0 @@ - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/listener/SelectNavigationListener.java --- a/src/de/mpg/mpiwg/itgroup/digilib/listener/SelectNavigationListener.java Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -package de.mpg.mpiwg.itgroup.digilib.listener; - -import org.eclipse.swt.events.MouseEvent; -import org.eclipse.swt.events.MouseListener; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Label; - -import de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageController; -import de.mpg.mpiwg.itgroup.digilib.manipulator.DigilibImageManipulatorProvider; -import de.mpg.mpiwg.itgroup.digilib.manipulator.IDigilibImageManipulator; - -/** - * Listenes if a navigation element has benn selected - * @author dwinter - * - */ -public class SelectNavigationListener implements MouseListener { - - private String keyword; - private DigiImageController dc; - private Label label; - - /** - * @param keyword identified the handler - * @param dc Controller to be handled. - * @param label Label which contains the Image of the Navigationelement. - */ - public SelectNavigationListener(String keyword,DigiImageController dc, Label label) { - this.dc=dc; - this.keyword=keyword; - this.label=label; - - } - /** - * @param event - */ - public void handleEvent(Event event) { - // TODO Auto-generated method stub - System.out.println(event); - } - - /* (non-Javadoc) - * @see org.eclipse.swt.events.MouseListener#mouseDoubleClick(org.eclipse.swt.events.MouseEvent) - */ - public void mouseDoubleClick(MouseEvent e) { - // TODO Auto-generated method stub - - } - - /* (non-Javadoc) - * @see org.eclipse.swt.events.MouseListener#mouseDown(org.eclipse.swt.events.MouseEvent) - */ - public void mouseDown(MouseEvent e) { - // TODO Auto-generated method stub - - } - - /* (non-Javadoc) - * @see org.eclipse.swt.events.MouseListener#mouseUp(org.eclipse.swt.events.MouseEvent) - */ - public void mouseUp(MouseEvent e) { - // TODO Auto-generated method stub - IDigilibImageManipulator action = (IDigilibImageManipulator)DigilibImageManipulatorProvider.INSTANCE.getManipulator(keyword); - - - action.run(dc); - - this.label.setImage(action.createImage(label.getParent())); - - - - - } - - - -} diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/manipulator/DigilibImageManipulatorProvider.java --- a/src/de/mpg/mpiwg/itgroup/digilib/manipulator/DigilibImageManipulatorProvider.java Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ -package de.mpg.mpiwg.itgroup.digilib.manipulator; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.Platform; - - - - -/** - * This singleton class manages the property extensions. - * - * @author Julia Damerow - * @author Dirk Wintergruen - * - */ -public class DigilibImageManipulatorProvider { - - public static DigilibImageManipulatorProvider INSTANCE = new DigilibImageManipulatorProvider(); - - private List propertyExtensions; - private HashMap propertyExtensionsMap; - - - private DigilibImageManipulatorProvider() { - propertyExtensions = new ArrayList(); - propertyExtensionsMap = new HashMap(); - - IConfigurationElement[] configs = Platform.getExtensionRegistry().getConfigurationElementsFor("de.mpg.mpiwg.itgroup.digilib.plugin","DigilibImageManipulation"); - for (IConfigurationElement e : configs) - { - Object o = null; - try { - o = e.createExecutableExtension("class"); - - } catch (CoreException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - continue; - } - if (o != null) - { - IDigilibImageManipulator dim = (IDigilibImageManipulator)o; - propertyExtensions.add(dim); - propertyExtensionsMap.put(dim.getKeyword(), dim); - } - } - } - - /** - * Get all registered DigilibImageManipulations. - * @return a list with all registered DigilibImageManipulations - */ - public List getAllManipulators() - { - - return propertyExtensions; - } - - public IDigilibImageManipulator getManipulator(String keyword) { - return propertyExtensionsMap.get(keyword); - } - - -} diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/manipulator/IDigilibImageManipulator.java --- a/src/de/mpg/mpiwg/itgroup/digilib/manipulator/IDigilibImageManipulator.java Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -package de.mpg.mpiwg.itgroup.digilib.manipulator; - -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.widgets.Composite; - -import de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageController; - -/** - * Interface for the extensions for manipulation the digilib extensions - * @author dwinter - * - */ -public interface IDigilibImageManipulator { - - - - public Image createImage(Composite parent); - public String getKeyword(); - public void run(DigiImageController dc); - - -} diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/manipulator/extensions/ManipulatorExtension.java --- a/src/de/mpg/mpiwg/itgroup/digilib/manipulator/extensions/ManipulatorExtension.java Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,104 +0,0 @@ -package de.mpg.mpiwg.itgroup.digilib.manipulator.extensions; - -import java.io.InputStream; - -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.widgets.Composite; - -import de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageController; -import de.mpg.mpiwg.itgroup.digilib.manipulator.IDigilibImageManipulator; - -/** - * Abstract class where all Digilib Manipulator extensions shoud be derived from - * - * @author dwinter - * - */ -public abstract class ManipulatorExtension implements IDigilibImageManipulator { - - private String iconOff; - private String iconOn; - - private String imagePath; - private String keyword; - - - /* (non-Javadoc) - * @see de.mpg.mpiwg.itgroup.digilib.manipulator.IDigilibImageManipulator#getKeyword() - */ - public String getKeyword() { - return keyword; - } - - - /* (non-Javadoc) - * @see de.mpg.mpiwg.itgroup.digilib.manipulator.IDigilibImageManipulator#run(de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageController) - */ - public void run(DigiImageController dc) {}; - - - /** - * Set path to icon. path is path with in classpath - * @param ip - */ - public void setImagePath(String ip) { - imagePath=ip; - - } - - /** - * @return path to the current icon within the class path - */ - public String getImagePath() { - return imagePath; - - } - - /** - * @param keyword keyword which identifies the extension, used by - * @see {@link de.mpg.mpiwg.itgroup.digilib.manipulator.DigilibImageManipulatorProvider}. - * - */ - public void setKeyword(String keyword) { - this.keyword = keyword; - } - - /* (non-Javadoc) - * @see de.mpg.mpiwg.itgroup.digilib.manipulator.IDigilibImageManipulator#createImage(org.eclipse.swt.widgets.Composite) - */ - public Image createImage(Composite parent) { - InputStream is = getClass().getResourceAsStream(getImagePath()); - Image img = new Image(parent.getDisplay(),is); - return img; - } - - /** - * Toggle selection state of the navigation icon - */ - public void toggleIcon(){ - if(imagePath.equals(iconOff)){ - setImagePath(iconOn); - } else { - setImagePath(iconOff); - } - } - - /** - * Set icon to off state. - */ - public void setOffIcon(){ - setImagePath(iconOff); - } - - /** - * Setze die Pfade zu den Icons innerhalb des class path. - * @param iconOff - * @param iconOn - */ - public void setIconPaths(String iconOff, String iconOn) { - this.iconOff=iconOff; - this.iconOn=iconOn; - - } - -} diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/manipulator/extensions/MirrorHorizontal.java --- a/src/de/mpg/mpiwg/itgroup/digilib/manipulator/extensions/MirrorHorizontal.java Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -package de.mpg.mpiwg.itgroup.digilib.manipulator.extensions; - -import org.eclipse.swt.SWT; - -import de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageController; -import de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorObservable; - - -/** - * Calls the mirror funcion on digiimage - * @author dwinter - * - */ -public class MirrorHorizontal extends ManipulatorExtension { - - public String iconOff="/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mirror-horizontal.png"; - public String iconOn="/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mirror-horizontal-on.png"; - - - public MirrorHorizontal() { - setIconPaths(iconOff,iconOn); - setOffIcon(); - setKeyword("mirrorHorizontal"); - } - - - - - public void run(DigiImageController dc) { - - DigilibLinkEditorObservable.INSTANCE.setCursorStatus(SWT.CURSOR_WAIT); - dc.hmir(); - DigilibLinkEditorObservable.INSTANCE.setCursorStatus(SWT.CURSOR_ARROW); - toggleIcon(); - //DigilibLinkEditorObservable.INSTANCE.imageHasChanged(dc.digiImage); - } - - -} diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/manipulator/extensions/MirrorVertical.java --- a/src/de/mpg/mpiwg/itgroup/digilib/manipulator/extensions/MirrorVertical.java Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -package de.mpg.mpiwg.itgroup.digilib.manipulator.extensions; - -import org.eclipse.swt.SWT; - -import de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageController; -import de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorObservable; - -/** - * Calls the mirror funcion on digiimage - * @author dwinter - * - */ -public class MirrorVertical extends ManipulatorExtension{ - - public String iconOff="/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mirror-vertical.png"; - public String iconOn="/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/mirror-vertical-on.png"; - - public MirrorVertical() { - setIconPaths(iconOff,iconOn); - setOffIcon(); - setKeyword("mirrorVertical"); - } - - - - public void run(DigiImageController dc) { - - DigilibLinkEditorObservable.INSTANCE.setCursorStatus(SWT.CURSOR_WAIT); - dc.vmir(); - DigilibLinkEditorObservable.INSTANCE.setCursorStatus(SWT.CURSOR_ARROW); - - toggleIcon(); - - //DigilibLinkEditorObservable.INSTANCE.imageHasChanged(dc.digiImage); - } - - - -} diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/manipulator/extensions/NextPage.java --- a/src/de/mpg/mpiwg/itgroup/digilib/manipulator/extensions/NextPage.java Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -package de.mpg.mpiwg.itgroup.digilib.manipulator.extensions; - - - - -import org.eclipse.swt.SWT; - -import de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageController; -import de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorObservable; -/** - * Calls the the next page function on digiimage - * @author dwinter - * - */ -public class NextPage extends ManipulatorExtension { - - public String iconOff="/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/fwd.png"; - public String iconOn="/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/fwd.png"; - - - public NextPage() { - setIconPaths(iconOff,iconOn); - setOffIcon(); - setKeyword("Forward"); - } - - public void run(final DigiImageController dc) { - - DigilibLinkEditorObservable.INSTANCE.setCursorStatus(SWT.CURSOR_WAIT); - - dc.nextPage(); - DigilibLinkEditorObservable.INSTANCE.setCursorStatus(SWT.CURSOR_ARROW); - - //DigilibLinkEditorObservable.INSTANCE.imageHasChanged(dc.digiImage); - - } -} diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/manipulator/extensions/PrevPage.java --- a/src/de/mpg/mpiwg/itgroup/digilib/manipulator/extensions/PrevPage.java Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -package de.mpg.mpiwg.itgroup.digilib.manipulator.extensions; - - - - -import org.eclipse.swt.SWT; - -import de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageController; -import de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorObservable; - -/** - * Calls the previous page function on digiimage - * @author dwinter - * - */ -public class PrevPage extends ManipulatorExtension { - - public String iconOff="/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/back.png"; - public String iconOn="/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/back.png"; - - - public PrevPage() { - setIconPaths(iconOff,iconOn); - setOffIcon(); - setKeyword("PreviousPage"); - } - - public void run(final DigiImageController dc) { - - DigilibLinkEditorObservable.INSTANCE.setCursorStatus(SWT.CURSOR_WAIT); - - dc.prevPage(); - DigilibLinkEditorObservable.INSTANCE.setCursorStatus(SWT.CURSOR_ARROW); - - //DigilibLinkEditorObservable.INSTANCE.imageHasChanged(dc.digiImage); - - } -} diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/manipulator/extensions/Rotate.java --- a/src/de/mpg/mpiwg/itgroup/digilib/manipulator/extensions/Rotate.java Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -package de.mpg.mpiwg.itgroup.digilib.manipulator.extensions; - - - -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Listener; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.swt.widgets.Text; -import org.eclipse.swt.widgets.Widget; - -import de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageController; -import de.mpg.mpiwg.itgroup.digilib.manipulator.extensions.dialogs.RotateDialog; - -/** - * Open an dialog for entering the ration angle. - * @author dwinter - * - */ -public class Rotate extends ManipulatorExtension { - - public String iconOff="/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/rotate.png"; - public String iconOn="/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/rotate-on.png"; - - - public Rotate() { - setIconPaths(iconOff,iconOn); - setOffIcon(); - setKeyword("rotateHorizontal"); - } - - public void run(final DigiImageController dc) { - - //digiImage.hmir(); - //toggleIcon(); - - Listener buttonListener = new Listener() { - int rotateValue=0; - public void handleEvent(Event event) { - Widget wg = event.widget; - if (Button.class.isInstance(wg)){ - dc.rotate(rotateValue); - Shell sh = ((Button)wg).getShell(); - //DigilibLinkEditorObservable.INSTANCE.imageHasChanged(dc.digiImage); - setOffIcon(); - sh.close(); - } else if (Text.class.isInstance(wg)) { - Text txt = (Text)wg; - if (txt.getText()!=null){ - String t = txt.getText(); - try{ - rotateValue=Integer.valueOf(t); - } catch (NumberFormatException e) { - // TODO: handle exception - } - } - } - } - }; - - RotateDialog rd = new RotateDialog(buttonListener,dc); - rd.open(); - } -} diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/manipulator/extensions/ScaleDown.java --- a/src/de/mpg/mpiwg/itgroup/digilib/manipulator/extensions/ScaleDown.java Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -package de.mpg.mpiwg.itgroup.digilib.manipulator.extensions; - - - -import org.eclipse.swt.SWT; - -import de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageController; -import de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorObservable; - -/** - * Calls the scale down function on digiimage - * @author dwinter - * - */ -public class ScaleDown extends ManipulatorExtension { - - public String iconOff="/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/zoom-out.png"; - public String iconOn="/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/zoom-out.png"; - - - public ScaleDown() { - setIconPaths(iconOff,iconOn); - setOffIcon(); - setKeyword("scaleDown"); - } - - public void run(final DigiImageController dc) { - - DigilibLinkEditorObservable.INSTANCE.setCursorStatus(SWT.CURSOR_WAIT); - - dc.scaleDown(); - DigilibLinkEditorObservable.INSTANCE.setCursorStatus(SWT.CURSOR_ARROW); - //DigilibLinkEditorObservable.INSTANCE.imageHasChanged(dc.digiImage); - - } -} diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/manipulator/extensions/ScaleUp.java --- a/src/de/mpg/mpiwg/itgroup/digilib/manipulator/extensions/ScaleUp.java Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -package de.mpg.mpiwg.itgroup.digilib.manipulator.extensions; - - - - -import org.eclipse.swt.SWT; - -import de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageController; -import de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorObservable; - -/** - * Calls the scale up function on digiimage - * @author dwinter - * - */ -public class ScaleUp extends ManipulatorExtension { - - public String iconOff="/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/zoom-in.png"; - public String iconOn="/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/zoom-in.png"; - - - public ScaleUp() { - setIconPaths(iconOff,iconOn); - setOffIcon(); - setKeyword("ScaleUp"); - } - - public void run(final DigiImageController dc) { - - DigilibLinkEditorObservable.INSTANCE.setCursorStatus(SWT.CURSOR_WAIT); - - dc.scaleUp(); - DigilibLinkEditorObservable.INSTANCE.setCursorStatus(SWT.CURSOR_ARROW); - - //DigilibLinkEditorObservable.INSTANCE.imageHasChanged(dc.digiImage); - - } -} diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/manipulator/extensions/ZoomArea.java --- a/src/de/mpg/mpiwg/itgroup/digilib/manipulator/extensions/ZoomArea.java Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -package de.mpg.mpiwg.itgroup.digilib.manipulator.extensions; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Label; - - -import de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageController; -import de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorObservable; - -/** - * Set ZoomAreaRectangleListener on the digiimage, which then calls zoom area after selecting an area. - * - * @author dwinter - * - */ -public class ZoomArea extends ManipulatorExtension { - - public String iconOff="/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/zoom-area.png"; - public String iconOn="/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/zoom-area.png"; - - public ZoomArea() { - setIconPaths(iconOff,iconOn); - setOffIcon(); - setKeyword("zoomArea"); - } - - - - public void run(DigiImageController dc) { - - DigilibLinkEditorObservable.INSTANCE.setCursorStatus(SWT.CURSOR_HAND); - ZoomAreaRectangleListener ml = dc.digiImage.getRectangleListener(); - Label label = dc.digiImage.getLabel(); - if (ml!=null){ - try { - label.removeMouseListener(ml); - } catch (Exception e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } else { - ml = new ZoomAreaRectangleListener(dc); - dc.digiImage.setRectangleListener(ml); - } - ml.reset(); - label.addMouseListener(ml); - - - - } -} diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/manipulator/extensions/ZoomAreaRectangleListener.java --- a/src/de/mpg/mpiwg/itgroup/digilib/manipulator/extensions/ZoomAreaRectangleListener.java Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,93 +0,0 @@ -package de.mpg.mpiwg.itgroup.digilib.manipulator.extensions; - - -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.MouseEvent; -import org.eclipse.swt.events.MouseListener; -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.widgets.Label; - -import de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageController; -import de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorObservable; - -/** - * Listener to select the zoom area for the zoomarea function on digiimage. - * calls zoom area after an area on the image was selected. - * @author dwinter - * - */ -public class ZoomAreaRectangleListener implements MouseListener { - static int FIRST_CLICK=1; - static int SECOND_CLICK=2; - static int NO_CLICK=0; - int status=NO_CLICK; - private Label label; - private Point firstPoint; - private DigiImageController dc; - - - @SuppressWarnings("unused") - private ZoomAreaRectangleListener() {}; - - public ZoomAreaRectangleListener(DigiImageController dc){ - this.label = dc.digiImage.getLabel(); - this.dc=dc; - } - public void reset(){ - status=0; - } - public void mouseDoubleClick(MouseEvent e) { - // TODO Auto-generated method stub - - } - - public void mouseDown(MouseEvent e) { - // TODO Auto-generated method stub - - } - - public void mouseUp(MouseEvent e) { - if (status==NO_CLICK){ - handleFirstClick(e); - } else if (status==FIRST_CLICK){ - handleSecondClick(e); - } - - } - - private void handleSecondClick(MouseEvent e) { - //Canvas canvas = new Canvas(label.getParent(),SWT.NO_BACKGROUND); - - GC gc = new GC(label.getImage()); - - gc.setForeground(new Color(label.getDisplay(),255,0,0)); - - gc.drawRectangle(firstPoint.x, firstPoint.y, e.x-firstPoint.x, e.y-firstPoint.y); - gc.dispose(); - label.redraw(); - status=SECOND_CLICK; - dc.zoomArea(firstPoint.x,firstPoint.y,e.x,e.y); - dc.digiImage.getLabel().removeMouseListener(this); - DigilibLinkEditorObservable.INSTANCE.setCursorStatus(SWT.CURSOR_ARROW); - //DigilibLinkEditorObservable.INSTANCE.imageHasChanged(dc.digiImage); - - } - - private void handleFirstClick(MouseEvent e) { - //Canvas canvas = new Canvas(label.getParent(),SWT.NO_BACKGROUND); - - GC gc = new GC(label.getImage()); - - gc.setForeground(new Color(label.getDisplay(),255,0,0)); - firstPoint = new Point(e.x,e.y); - gc.drawOval(e.x, e.y, 10, 10); - gc.dispose(); - status=FIRST_CLICK; - label.redraw(); - DigilibLinkEditorObservable.INSTANCE.setCursorStatus(SWT.CURSOR_CROSS); - } - - -} diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/manipulator/extensions/ZoomFull.java --- a/src/de/mpg/mpiwg/itgroup/digilib/manipulator/extensions/ZoomFull.java Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -package de.mpg.mpiwg.itgroup.digilib.manipulator.extensions; - - - -import org.eclipse.swt.SWT; - -import de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageController; -import de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorObservable; - -public class ZoomFull extends ManipulatorExtension { - - public String iconOff="/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/zoom-full.png"; - public String iconOn="/de/mpg/mpiwg/itgroup/digilib/icons/greyskin/zoom-full.png"; - - - public ZoomFull() { - setIconPaths(iconOff,iconOn); - setOffIcon(); - setKeyword("zoomFull"); - } - - public void run(final DigiImageController dc) { - DigilibLinkEditorObservable.INSTANCE.setCursorStatus(SWT.CURSOR_WAIT); - - - dc.zoomFull(); - //DigilibLinkEditorObservable.INSTANCE.imageHasChanged(dc.digiImage); - - DigilibLinkEditorObservable.INSTANCE.setCursorStatus(SWT.CURSOR_ARROW); - - } -} diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/manipulator/extensions/dialogs/RotateDialog.java --- a/src/de/mpg/mpiwg/itgroup/digilib/manipulator/extensions/dialogs/RotateDialog.java Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -package de.mpg.mpiwg.itgroup.digilib.manipulator.extensions.dialogs; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Listener; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.swt.widgets.Text; - -import de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageController; - -/** - * Dialog to enter the roation angle. - * @author dwinter - * - */ -public class RotateDialog { - static boolean deleteFlag = false; - private Listener listener; - private Composite parent; - private String rotateValue; - - public RotateDialog(Listener listener,DigiImageController dc) { - this.listener=listener; - this.parent = dc.digiImage.getParent(); - this.rotateValue = String.valueOf(dc.digiImage - .getParameter().getRot()); - } - - public void open(){ - Shell shell = new Shell(parent.getDisplay()); - shell.setText("Rotate"); - shell.setSize(300, 200); - shell.open(); - - final Button button = new Button(shell, SWT.PUSH); - button.setText("Rotate"); - button.setBounds(20, 40, 80, 25); - - final Text text = new Text(shell, SWT.SHADOW_IN); - text.setBounds(140, 40, 100, 25); - text.setText(rotateValue); - - - - - - button.addListener(SWT.Selection, listener); - text.addListener(SWT.CHANGED, listener); - - - } - } - - - diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/plugin/Activator.java --- a/src/de/mpg/mpiwg/itgroup/digilib/plugin/Activator.java Mon Jan 10 12:01:25 2011 +0100 +++ b/src/de/mpg/mpiwg/itgroup/digilib/plugin/Activator.java Sat Jun 18 09:53:01 2011 +0200 @@ -4,6 +4,8 @@ import org.eclipse.ui.plugin.AbstractUIPlugin; import org.osgi.framework.BundleContext; + + /** * The activator class controls the plug-in life cycle */ diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/plugin/editors/DigilibLinkEditorContributor.java --- a/src/de/mpg/mpiwg/itgroup/digilib/plugin/editors/DigilibLinkEditorContributor.java Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,103 +0,0 @@ -package de.mpg.mpiwg.itgroup.digilib.plugin.editors; - -import org.eclipse.jface.action.*; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.ui.IActionBars; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.IWorkbenchActionConstants; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.actions.ActionFactory; -import org.eclipse.ui.ide.IDE; -import org.eclipse.ui.ide.IDEActionFactory; -import org.eclipse.ui.part.MultiPageEditorActionBarContributor; -import org.eclipse.ui.texteditor.ITextEditor; -import org.eclipse.ui.texteditor.ITextEditorActionConstants; - -/** - * Manages the installation/deinstallation of global actions for multi-page editors. - * Responsible for the redirection of global actions to the active editor. - * Multi-page contributor replaces the contributors for the individual editors in the multi-page editor. - */ -public class DigilibLinkEditorContributor extends MultiPageEditorActionBarContributor { - private IEditorPart activeEditorPart; - private Action sampleAction; - /** - * Creates a multi-page contributor. - */ - public DigilibLinkEditorContributor() { - super(); - createActions(); - } - /** - * Returns the action registed with the given text editor. - * @return IAction or null if editor is null. - */ - protected IAction getAction(ITextEditor editor, String actionID) { - return (editor == null ? null : editor.getAction(actionID)); - } - /* (non-JavaDoc) - * Method declared in AbstractMultiPageEditorActionBarContributor. - */ - - public void setActivePage(IEditorPart part) { - if (activeEditorPart == part) - return; - - activeEditorPart = part; - - IActionBars actionBars = getActionBars(); - if (actionBars != null) { - - ITextEditor editor = (part instanceof ITextEditor) ? (ITextEditor) part : null; - - actionBars.setGlobalActionHandler( - ActionFactory.DELETE.getId(), - getAction(editor, ITextEditorActionConstants.DELETE)); - actionBars.setGlobalActionHandler( - ActionFactory.UNDO.getId(), - getAction(editor, ITextEditorActionConstants.UNDO)); - actionBars.setGlobalActionHandler( - ActionFactory.REDO.getId(), - getAction(editor, ITextEditorActionConstants.REDO)); - actionBars.setGlobalActionHandler( - ActionFactory.CUT.getId(), - getAction(editor, ITextEditorActionConstants.CUT)); - actionBars.setGlobalActionHandler( - ActionFactory.COPY.getId(), - getAction(editor, ITextEditorActionConstants.COPY)); - actionBars.setGlobalActionHandler( - ActionFactory.PASTE.getId(), - getAction(editor, ITextEditorActionConstants.PASTE)); - actionBars.setGlobalActionHandler( - ActionFactory.SELECT_ALL.getId(), - getAction(editor, ITextEditorActionConstants.SELECT_ALL)); - actionBars.setGlobalActionHandler( - ActionFactory.FIND.getId(), - getAction(editor, ITextEditorActionConstants.FIND)); - actionBars.setGlobalActionHandler( - IDEActionFactory.BOOKMARK.getId(), - getAction(editor, IDEActionFactory.BOOKMARK.getId())); - actionBars.updateActionBars(); - } - } - private void createActions() { - sampleAction = new Action() { - public void run() { - MessageDialog.openInformation(null, "digilibClient", "Sample Action Executed"); - } - }; - sampleAction.setText("Sample Action"); - sampleAction.setToolTipText("Sample Action tool tip"); - sampleAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages(). - getImageDescriptor(IDE.SharedImages.IMG_OBJS_TASK_TSK)); - } - public void contributeToMenu(IMenuManager manager) { - IMenuManager menu = new MenuManager("Editor &Menu"); - manager.prependToGroup(IWorkbenchActionConstants.MB_ADDITIONS, menu); - menu.add(sampleAction); - } - public void contributeToToolBar(IToolBarManager manager) { - manager.add(new Separator()); - manager.add(sampleAction); - } -} diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/plugin/editors/DigilibLinkEditorInput.java --- a/src/de/mpg/mpiwg/itgroup/digilib/plugin/editors/DigilibLinkEditorInput.java Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -package de.mpg.mpiwg.itgroup.digilib.plugin.editors; - -import org.eclipse.core.resources.IFile; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.IEditorInput; -import org.eclipse.ui.IPersistableElement; - -/** - * Editor input for {@link de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorPart} - * @author dwinter - * - */ -public class DigilibLinkEditorInput implements IEditorInput { - - private IFile file; - public static int INDEX_META=0; - private int type; - - /** - * @return - */ - public IFile getFile() { - return file; - } - - public void setFile(IFile indexMetaFile) { - this.file = indexMetaFile; - } - - public int getType() { - return type; - } - - public void setType(int type) { - this.type = type; - } - - /** - * - * @param file File to be worked with - * @param type currently only @see {{@value #INDEX_META}, file has to be an index.meta file following the - * standards of the MPIWG - * - */ - public DigilibLinkEditorInput(IFile file, int type) { - this.file = file; - setType(type); - } - - @SuppressWarnings("rawtypes") - public Object getAdapter(Class adapter) { - // TODO Auto-generated method stub - return null; - } - - public boolean exists() { - // TODO Auto-generated method stub - return false; - } - - public ImageDescriptor getImageDescriptor() { - // TODO Auto-generated method stub - return null; - } - - public String getName() { - - String name = file.getName(); - return name; - } - - public IPersistableElement getPersistable() { - // TODO Auto-generated method stub - return null; - } - - public String getToolTipText() { - - return file.getFullPath().toOSString(); - } - -} diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/plugin/editors/DigilibLinkEditorObservable.java --- a/src/de/mpg/mpiwg/itgroup/digilib/plugin/editors/DigilibLinkEditorObservable.java Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -package de.mpg.mpiwg.itgroup.digilib.plugin.editors; - -import java.util.Observable; - -import de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImage; - -public class DigilibLinkEditorObservable extends Observable { - - static public final DigilibLinkEditorObservable INSTANCE = new DigilibLinkEditorObservable(); - - protected DigilibLinkEditorObservable(){}; - - public void imageHasChanged(DigiImage di){ - setChanged(); - notifyObservers(di); - } - - - public void setCursorStatus(int status) { - setChanged(); - notifyObservers(status); - - } -} diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/digilib/plugin/editors/DigilibLinkEditorPart.java --- a/src/de/mpg/mpiwg/itgroup/digilib/plugin/editors/DigilibLinkEditorPart.java Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,206 +0,0 @@ -package de.mpg.mpiwg.itgroup.digilib.plugin.editors; - - -import java.io.IOException; -import java.util.Observable; -import java.util.Observer; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.swt.SWT; -import org.eclipse.swt.custom.ScrolledComposite; -import org.eclipse.swt.graphics.Cursor; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.ui.IEditorInput; -import org.eclipse.ui.IEditorSite; -import org.eclipse.ui.PartInitException; -import org.eclipse.ui.part.EditorPart; -import org.eclipse.ui.views.properties.IPropertySheetPage; -import org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor; -import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage; -import org.jdom.JDOMException; - -import de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImage; -import de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageController; -import de.mpg.mpiwg.itgroup.digilib.digiImage.DigiImageParameter; -import de.mpg.mpiwg.itgroup.digilib.digiImage.DigiNav; -import de.mpg.mpiwg.itgroup.indexMeta.Utils.ParseIndexMeta; - -/** - * Displays an image with digilib an allows image manipulation on the image. - * - * @author dwinter - * - */ -public class DigilibLinkEditorPart extends EditorPart implements Observer, ITabbedPropertySheetPageContributor{ - - private Composite mainComposite; - private ScrolledComposite sc; - private boolean isDirty; - private TabbedPropertySheetPage tp=null; - @Override - public void doSave(IProgressMonitor monitor) { - // TODO Auto-generated method stub - - } - - @Override - public void doSaveAs() { - // TODO Auto-generated method stub - - } - - @Override - public void init(IEditorSite site, IEditorInput input) - throws PartInitException { - setInput(input); - setSite(site); - - } - - @Override - public boolean isDirty() { - return isDirty; - } - - @Override - public boolean isSaveAsAllowed() { - // TODO Auto-generated method stub - return false; - } - - @Override - public void createPartControl(Composite frame) { - - sc = new ScrolledComposite(frame, SWT.H_SCROLL | SWT.V_SCROLL); - mainComposite = new Composite(sc,SWT.None); - - GridLayout imageLayout = new GridLayout(2,false); - mainComposite.setLayout(imageLayout); - sc.setContent(mainComposite); - //sc.setMinSize(400, 400); - - - - DigilibLinkEditorInput input= (DigilibLinkEditorInput) getEditorInput(); - String path=""; - if (input.getType()==DigilibLinkEditorInput.INDEX_META){ - ParseIndexMeta im; - try { - im = new ParseIndexMeta(input.getFile()); - } catch (JDOMException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - return; - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - return; - } catch (CoreException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - return; - } - try { - path=im.getImagePath(); - } catch (JDOMException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - return; - } - if (path==null) - return; - } else { - //TODO: issue warning that type cannot be solved. - return; - } - - - path=path.replace("/mpiwg/online", ""); - DigiImageParameter dp = new DigiImageParameter(path); - dp.setDh(500); - dp.setDw(500); - - - DigiImage digiImage = new DigiImage(mainComposite, SWT.BORDER, dp); - DigiImageController digiImageController = new DigiImageController(digiImage); - //imageComp.setBackgroundImage(img); - new DigiNav(mainComposite,SWT.NONE,digiImageController); - - getSite().setSelectionProvider(digiImage); - //StructuredSelection strucSel = new StructuredSelection(digiImage); - digiImage.setSelection(new StructuredSelection(digiImage)); - - sc.setMinSize(mainComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT)); - sc.setExpandHorizontal(true); - sc.setExpandVertical(true); - sc.layout(); - DigilibLinkEditorObservable.INSTANCE.addObserver(this); - - //setSelection( digiImage); - } - - @Override - public void setFocus() { - // TODO Auto-generated method stub - - } - - /* (non-Javadoc) - * @see java.util.Observer#update(java.util.Observable, java.lang.Object) - * Called from the observable - */ - public void update(Observable o, Object arg) { - /* - * If the argument ist digiImage then rerender the editor and update the properties - */ - if (DigiImage.class.isInstance(arg)){ - mainComposite.pack(); - sc.setMinSize(mainComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT)); - sc.layout(); - isDirty=true; - firePropertyChange(PROP_DIRTY); - - //Object[] ls = getListeners(); - //System.out.println(ls); - - if (tp!=null) - tp.refresh(); - - - } else if (Integer.class.isInstance(arg)){ - //if it is in integer then the argument is the status of the cursor - int b = (Integer) arg; - - Cursor waitCursor = new Cursor(mainComposite.getDisplay(),b); - mainComposite.setCursor(waitCursor); - - } - - - } - - /* (non-Javadoc) - * @see org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor#getContributorId() - */ - public String getContributorId() { - String contribId = getSite().getId(); - return contribId; - } - - /* (non-Javadoc) - * @see org.eclipse.ui.part.WorkbenchPart#getAdapter(java.lang.Class) - */ - @SuppressWarnings("rawtypes") - public Object getAdapter(Class adapter) { - if (adapter == IPropertySheetPage.class){ - - tp = new TabbedPropertySheetPage(this); - return tp; - } - return super.getAdapter(adapter); - } - -} diff -r 183c3e96f6c3 -r 361d8c89338a src/de/mpg/mpiwg/itgroup/indexMeta/Utils/ParseIndexMeta.java --- a/src/de/mpg/mpiwg/itgroup/indexMeta/Utils/ParseIndexMeta.java Mon Jan 10 12:01:25 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -package de.mpg.mpiwg.itgroup.indexMeta.Utils; - -import java.io.IOException; -import java.io.InputStream; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.runtime.CoreException; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.JDOMException; -import org.jdom.input.SAXBuilder; -import org.jdom.xpath.XPath; - -/** - * - * Utilities to parse index.meta files following the standards of the MPIWG - * @author dwinter - * - */ -public class ParseIndexMeta { - - private Document dom; - - public ParseIndexMeta(IFile indexMetaFile) throws JDOMException, IOException, CoreException { - SAXBuilder builder = new SAXBuilder(); - InputStream is = indexMetaFile.getContents(); - dom = builder.build(is); - } - - /** - * @return the content of the archive-path tag. - * @throws JDOMException - */ - public String getPath() throws JDOMException { - - XPath xpath = XPath.newInstance("//archive-path"); - Element el = (Element)xpath.selectSingleNode(dom); - if (el==null) - return null; - return el.getTextTrim(); - } - - /** - * @return the content of //texttool/image - * @throws JDOMException - */ - public String getImagePath() throws JDOMException{ - String path = getPath(); - - XPath xpath = XPath.newInstance("//texttool/image"); - Element el = (Element)xpath.selectSingleNode(dom); - if (el==null) - return null; - String imagePath =el.getTextTrim(); - - return(path+"/"+imagePath); - - } - -}