|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object FlkUser
public class FlkUser
FlkUser contains methods to maintain the internal FlkUserDB database created by analyzing the user's image directories they have placed in the Images/ folder. This database is used by Flicker to create entries in the (File | Open user images| ...) menus. This allows users to add many of their gel images without editing the FlkDemoDB.txt file. By placing your data in the Images/ directory, located in the installation directory, Flicker will discover it when it starts and add it to the demo menu. It works as follows:
1. You copy or move one or more of your directories of with images you want to use with Flicker in the Images/ folder. 2. When Flicker starts, it creates additional submenu entries in the (File | Open user images | ...) menu that are the names of the user's directories. 3. Within each submenu, it will generate all unique combinations of the image files within the corresponding directory and denote them as for example, "image3 vs. image5", etc. 4. Then just access them from the user menu as you would with the built-in pairs of images in (File | Open demo images | ...). Note that it does not generate comparisons between directories. You can still do that by clicking on the left (and then later the right) and using the (File | Open File Images)command to manually load the image. If you have this type of data, it will also add the (File | Open user images | List user's images by directory) command. You can use this to get a report of all of the files in the popup report window. The structure contains the following 4 fields: SubMenuName, SubMenuEntry, ImageURL1, ImageURL2The map is used to build menus of images to load a map entry contains the following fields: 1. SubMenuName: is the menu image name: e.g., "Human Plasma" 2. SubMenuEntry: is the menu image name: e.g., "(Swiss2DPAGE vs. plasmaL) gels - clickable" 3. ImageURL1: is the Image URL for image 1: e.g. "Swiss2DPAGE.gif" 4. ImageURL2: is the Image URL for image 2: e.g. "plasmaL.gif"This work was produced by Peter Lemkin of the National Cancer Institute, an agency of the United States Government. As a work of the United States Government there is no associated copyright. It is offered as open source software under the Mozilla Public License (version 1.1) subject to the limitations noted in the accompanying LEGAL file. This notice must be included with the code. The Flicker Mozilla and Legal files are available on http://open2dprot.sourceforge.net/Flicker
Field Summary | |
---|---|
static java.lang.String[][] |
allImgFileList
[0:nDirs-1][0:nFiles(dir)-1] all image file names for all directories |
static java.lang.String[] |
dirList
[0:nDirs-1] user image directories names if any |
static java.lang.String[] |
dirListPath
[0:nDirs-1] user image directory paths if any |
private static Flicker |
flk
Instance of Flicker |
static FlkUser[] |
flkUsers
FlkUser database [0:nMaps] |
(package private) java.lang.String |
imageURL1
ImageURL1: is the Image URL for image 1: e.g. |
(package private) java.lang.String |
imageURL2
imageURL2: is the Image URL for image 2: e.g. |
static int |
MAX_DATABASES
MAX # of user databases |
static int |
MAX_USER_IMAGES
Max # of images since can have LOTS of combinations of user data |
static int |
nDirs
# of user image directories |
static int |
nMaps
# of flkUsers[] map entries |
static int |
nPairs
# of user data pairs added |
(package private) java.lang.String |
subMenuEntry
is the menu image name: e.g., "(Swiss2DPAGE vs Merril) gels - clickable" |
(package private) java.lang.String |
subMenuName
is the menu image name: e.g., "Human Plasma" |
private static Util |
util
Instance of Util |
Constructor Summary | |
---|---|
FlkUser(Flicker flkS)
FlkUser() - constructor for Class FlkUser |
|
FlkUser(java.lang.String subMenuName,
java.lang.String subMenuEntry,
java.lang.String imageURL1,
java.lang.String imageURL2)
FlkUser() - constructor to add a new FlkUser entry NOTE: to do add of an entry, use 'new FlkUser()' method |
Method Summary | |
---|---|
private int |
addUserImagesPairs2UserDB()
addUserImagesPairs2UserDB() - add "Images/ |
static void |
clear()
clear() - clear database flkUsers[0:nMaps-1]. |
boolean |
delete()
delete() - rmv entry from database flkUsers[0:nMaps-1]. |
static void |
listUserImageDirs()
listUserImageDirs() - List user's images by directory |
static int |
lookup(FlkUser fm)
lookup() - lookup entry to database flkUsers[0:nMaps-1]. |
static int |
lookupByFileName(java.lang.String fileName1,
java.lang.String fileName2)
lookupByFileName() - lookup entry by file name to flkUsers[0:nMaps-1]. |
(package private) static int |
lookupBySubmenu(java.lang.String subMenuEntry)
lookupBySubmenu() - lookup entry by submenu name to flkUsers[0:nMaps-1]. |
boolean |
set(java.lang.String subMenuName,
java.lang.String subMenuEntry,
java.lang.String imageURL1,
java.lang.String imageURL2)
set() - set entry to database flkUsers[0:nMaps-1]. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static Flicker flk
private static Util util
public static final int MAX_USER_IMAGES
public static final int MAX_DATABASES
public static FlkUser[] flkUsers
public static int nMaps
public static java.lang.String[] dirList
public static java.lang.String[] dirListPath
public static int nDirs
public static java.lang.String[][] allImgFileList
public static int nPairs
java.lang.String subMenuName
java.lang.String subMenuEntry
java.lang.String imageURL1
java.lang.String imageURL2
Constructor Detail |
---|
public FlkUser(Flicker flkS)
flk
- instance of Flickerpublic FlkUser(java.lang.String subMenuName, java.lang.String subMenuEntry, java.lang.String imageURL1, java.lang.String imageURL2)
subMenuName
- subMenuEntry
- imageURL1
- imageURL2
- Method Detail |
---|
private int addUserImagesPairs2UserDB()
public static int lookup(FlkUser fm)
fm
- is the instance to lookup
static int lookupBySubmenu(java.lang.String subMenuEntry)
subMenuEntry
- is the menu name of the instance to lookup
public static int lookupByFileName(java.lang.String fileName1, java.lang.String fileName2)
fileName1
- is the fileName name of the instance to lookup
for imageURL1 (if not null)fileName2
- is the fileName name of the instance to lookup
for imageURL2 (if not null)
public boolean set(java.lang.String subMenuName, java.lang.String subMenuEntry, java.lang.String imageURL1, java.lang.String imageURL2)
subMenuName
- subMenuEntry
- imageURL1
- imageURL2
-
public boolean delete()
public static void clear()
public static void listUserImageDirs()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |