diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..a77e904 --- /dev/null +++ b/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..63e3e9c --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +*.class + +# Package Files # +*.jar +*.war + +# gwt caches and compiled units # +war/gwt_bree/ +gwt-unitCache/ + +# boilerplate generated classes # +.apt_generated/ + +# more caches and things from deploy # +war/WEB-INF/deploy/ +war/WEB-INF/classes/ + diff --git a/.project b/.project new file mode 100644 index 0000000..5e76381 --- /dev/null +++ b/.project @@ -0,0 +1,34 @@ + + + stargenetics_gwt_java + + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.google.gdt.eclipse.core.webAppProjectValidator + + + + + com.google.gwt.eclipse.core.gwtProjectValidator + + + + + + org.eclipse.jdt.core.javanature + com.google.gwt.eclipse.core.gwtNature + org.eclipse.wst.common.project.facet.core.nature + + diff --git a/.settings/com.google.gdt.eclipse.core.prefs b/.settings/com.google.gdt.eclipse.core.prefs new file mode 100644 index 0000000..cc6cb35 --- /dev/null +++ b/.settings/com.google.gdt.eclipse.core.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +warSrcDir=war +warSrcDirIsOutput=true diff --git a/.settings/com.google.gwt.eclipse.core.prefs b/.settings/com.google.gwt.eclipse.core.prefs new file mode 100644 index 0000000..b898189 --- /dev/null +++ b/.settings/com.google.gwt.eclipse.core.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +filesCopiedToWebInfLib=gwt-servlet.jar +gwtCompileSettings=PGd3dC1jb21waWxlLXNldHRpbmdzPjxsb2ctbGV2ZWw+VFJBQ0U8L2xvZy1sZXZlbD48b3V0cHV0LXN0eWxlPk9CRlVTQ0FURUQ8L291dHB1dC1zdHlsZT48ZXh0cmEtYXJncz48IVtDREFUQVtdXT48L2V4dHJhLWFyZ3M+PHZtLWFyZ3M+PCFbQ0RBVEFbLVhteDUxMm1dXT48L3ZtLWFyZ3M+PGVudHJ5LXBvaW50LW1vZHVsZT5zdGFyLmdlbmV0aWNzLlN0YXJnZW5ldGljc19nd3RfamF2YTwvZW50cnktcG9pbnQtbW9kdWxlPjwvZ3d0LWNvbXBpbGUtc2V0dGluZ3M+ diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..c537b63 --- /dev/null +++ b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 0000000..bcfc325 --- /dev/null +++ b/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,4 @@ + + + + diff --git a/src/java/beans/JavaBeans.gwt.xml b/src/java/beans/JavaBeans.gwt.xml new file mode 100644 index 0000000..1836147 --- /dev/null +++ b/src/java/beans/JavaBeans.gwt.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/java/beans/PropertyChangeEvent.java b/src/java/beans/PropertyChangeEvent.java new file mode 100644 index 0000000..ca35931 --- /dev/null +++ b/src/java/beans/PropertyChangeEvent.java @@ -0,0 +1,33 @@ +package java.beans; + +public class PropertyChangeEvent +{ + + private Object source; + private String name; + private Object oldValue; + private Object newValue; + + public PropertyChangeEvent(Object source, String name, Object oldValue, Object newValue) + { + this.source = source; + this.name = name; + this.oldValue = oldValue; + this.newValue = newValue; + } + + public String getPropertyName() + { + return name; + } + + public Object getOldValue() + { + return oldValue; + } + + public Object getNewValue() + { + return newValue; + } +} diff --git a/src/java/beans/PropertyChangeListener.java b/src/java/beans/PropertyChangeListener.java new file mode 100644 index 0000000..9c1e482 --- /dev/null +++ b/src/java/beans/PropertyChangeListener.java @@ -0,0 +1,7 @@ +package java.beans; + +public interface PropertyChangeListener +{ + public void propertyChange(PropertyChangeEvent e); + +} diff --git a/src/java/beans/PropertyChangeSupport.java b/src/java/beans/PropertyChangeSupport.java new file mode 100644 index 0000000..ecb47c8 --- /dev/null +++ b/src/java/beans/PropertyChangeSupport.java @@ -0,0 +1,35 @@ +package java.beans; + +import java.util.ArrayList; + +public class PropertyChangeSupport +{ + + private Object source; + private ArrayList listeners = new ArrayList(); + + public PropertyChangeSupport(Object source) + { + this.source = source; + } + + public void firePropertyChange(PropertyChangeEvent propertyChangeEvent) + { + for( PropertyChangeListener l : listeners) + { + l.propertyChange(propertyChangeEvent); + } + + } + + public void addPropertyChangeListener(PropertyChangeListener listener) + { + listeners.add(listener); + } + + public void removePropertyChangeListener(PropertyChangeListener listener) + { + listeners.remove(listener); + } + +} diff --git a/src/java/beans/StringTokenizer.java b/src/java/beans/StringTokenizer.java new file mode 100644 index 0000000..724ae68 --- /dev/null +++ b/src/java/beans/StringTokenizer.java @@ -0,0 +1,30 @@ +package java.beans; + +public class StringTokenizer +{ + //TODO: make better or correct + private String str; + private String split; + private int index; + + public StringTokenizer(String str, String split) + { + this.str = str; + this.split = split; + this.index = 0; + } + + public boolean hasMoreTokens() + { + return str.indexOf(split,index) > 0; + } + + public String nextToken() + { + int next_index = str.indexOf(split,index); + String ret = str.substring(index, next_index); + index = next_index; + return ret; + } + +} diff --git a/src/star/genetics/Stargenetics_gwt_java.gwt.xml b/src/star/genetics/Stargenetics_gwt_java.gwt.xml new file mode 100644 index 0000000..000498d --- /dev/null +++ b/src/star/genetics/Stargenetics_gwt_java.gwt.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/star/genetics/client/Helper.java b/src/star/genetics/client/Helper.java new file mode 100644 index 0000000..ae79f99 --- /dev/null +++ b/src/star/genetics/client/Helper.java @@ -0,0 +1,76 @@ +package star.genetics.client; + +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; +import java.util.TreeMap; + +import star.genetics.genetic.model.Creature; +import star.genetics.genetic.model.ModelModifiedProvider; +import star.genetics.visualizers.Visualizer; +import star.genetics.visualizers.VisualizerFactory; + +public class Helper +{ + public static void setVisualizerFromCreature(Visualizer v, Creature c) + { + v.setName(c.getName()); + v.setNote(c.getNote()); + v.setProperties(c.getProperties(), c.getSex()); + } + + public static void setVisualizerFromCreature(Visualizer v, Creature c, HashMap additional) + { + v.setName(c.getName()); + v.setNote(c.getNote()); + // additional.putAll(c.getProperties()); + HashMap prop = new HashMap(); + prop.putAll(c.getProperties()); + prop.putAll(additional); + v.setProperties(prop, c.getSex()); + } + + public static Map parse(String value) + { + Map ret = new TreeMap(); + if (value != null) + { + if (value.contains("=")) //$NON-NLS-1$ + { + String elements[] = value.split(","); //$NON-NLS-1$ + for (String element : elements) + { + if (element.indexOf('=') != -1) + { + String[] pair = element.split("=", 2); //$NON-NLS-1$ + ret.put(pair[0], pair[1]); + } + else + { + throw new RuntimeException(); + //throw new RuntimeException(MessageFormat.format(Messages.getString("Helper.0"), element, value)); //$NON-NLS-1$ + } + } + } + else if (!value.equalsIgnoreCase("wildtype")) //$NON-NLS-1$ + { + throw new RuntimeException(Messages.getString("Helper.5")); //$NON-NLS-1$ + } + } + return ret; + } + + public static String export(Map source) + { + StringBuffer sb = new StringBuffer(); + for (Entry entry : source.entrySet()) + { + sb.append(entry.getKey() + "=" + entry.getValue() + ","); //$NON-NLS-1$ //$NON-NLS-2$ + } + sb.setLength(sb.length() - 1); + return sb.toString(); + } + + private static String MODEL_PROVIDER_EXCEPTION = "Model Modified Provider not found"; //$NON-NLS-1$ + +} diff --git a/src/star/genetics/client/Messages.java b/src/star/genetics/client/Messages.java new file mode 100644 index 0000000..facabee --- /dev/null +++ b/src/star/genetics/client/Messages.java @@ -0,0 +1,15 @@ +package star.genetics.client; + +//import java.util.Locale; +//import java.util.MissingResourceException; +//import java.util.ResourceBundle; + +public class Messages +{ + + public static String getString(String key) + { + return '!' + key + '!'; + } + +} diff --git a/src/star/genetics/client/Stargenetics_gwt_java.java b/src/star/genetics/client/Stargenetics_gwt_java.java new file mode 100644 index 0000000..a3a7c51 --- /dev/null +++ b/src/star/genetics/client/Stargenetics_gwt_java.java @@ -0,0 +1,169 @@ +package star.genetics.client; + +import star.genetics.genetic.impl.ChromosomeImpl; +import star.genetics.genetic.impl.GeneImpl; +import star.genetics.genetic.impl.GenomeImpl; +import star.genetics.genetic.impl.MatingEngineImpl_XY; +import star.genetics.genetic.impl.ModelImpl; +import star.genetics.genetic.model.GeneticModel; +import star.genetics.genetic.model.MatingEngine; +import star.genetics.shared.FieldVerifier; + +import com.google.gwt.core.client.EntryPoint; +import com.google.gwt.core.client.GWT; +import com.google.gwt.event.dom.client.ClickEvent; +import com.google.gwt.event.dom.client.ClickHandler; +import com.google.gwt.event.dom.client.KeyCodes; +import com.google.gwt.event.dom.client.KeyUpEvent; +import com.google.gwt.event.dom.client.KeyUpHandler; +import com.google.gwt.user.client.rpc.AsyncCallback; +import com.google.gwt.user.client.ui.Button; +import com.google.gwt.user.client.ui.DialogBox; +import com.google.gwt.user.client.ui.HTML; +import com.google.gwt.user.client.ui.Label; +import com.google.gwt.user.client.ui.RootPanel; +import com.google.gwt.user.client.ui.TextBox; +import com.google.gwt.user.client.ui.VerticalPanel; + +/** + * Entry point classes define onModuleLoad(). + */ +public class Stargenetics_gwt_java implements EntryPoint +{ + /** + * The message displayed to the user when the server cannot be reached or returns an error. + */ + private static final String SERVER_ERROR = "An error occurred while " + "attempting to contact the server. Please check your network " + "connection and try again."; + + MatingEngineImpl_XY me = new MatingEngineImpl_XY(); + + public void test2() + { + Object self = this; + MatingEngineImpl_XY me = this.me; + test(self, me); + } + + public static int add(int a,int b) + { + return a+b; + } + + public native void test(Object self, MatingEngine me) + /*-{ + $wnd.__sg_entry_point = self; + $wnd.__sg_me = me; + $wnd.__sg_add = $entry(@star.genetics.client.Stargenetics_gwt_java::add(II)); + return "Not A Number"; + }-*/; + + /** + * This is the entry point method. + */ + public void onModuleLoad() + { + final Button sendButton = new Button("Send"); + final TextBox nameField = new TextBox(); + nameField.setText("GWT User"); + final Label errorLabel = new Label(); + + // We can add style names to widgets + sendButton.addStyleName("sendButton"); + + // Add the nameField and sendButton to the RootPanel + // Use RootPanel.get() to get the entire body element + RootPanel.get("nameFieldContainer").add(nameField); + RootPanel.get("sendButtonContainer").add(sendButton); + RootPanel.get("errorLabelContainer").add(errorLabel); + + // Focus the cursor on the name field when the app loads + nameField.setFocus(true); + nameField.selectAll(); + + // Create the popup dialog box + final DialogBox dialogBox = new DialogBox(); + dialogBox.setText("Remote Procedure Call"); + dialogBox.setAnimationEnabled(true); + final Button closeButton = new Button("Close"); + // We can set the id of a widget by accessing its Element + closeButton.getElement().setId("closeButton"); + final Label textToServerLabel = new Label(); + final HTML serverResponseLabel = new HTML(); + VerticalPanel dialogVPanel = new VerticalPanel(); + dialogVPanel.addStyleName("dialogVPanel"); + dialogVPanel.add(new HTML("Sending name to the server:")); + dialogVPanel.add(textToServerLabel); + dialogVPanel.add(new HTML("
Server replies:")); + dialogVPanel.add(serverResponseLabel); + dialogVPanel.setHorizontalAlignment(VerticalPanel.ALIGN_RIGHT); + dialogVPanel.add(closeButton); + dialogBox.setWidget(dialogVPanel); + test2(); + // Add a handler to close the DialogBox + closeButton.addClickHandler(new ClickHandler() + { + public void onClick(ClickEvent event) + { + dialogBox.hide(); + sendButton.setEnabled(true); + sendButton.setFocus(true); + + } + }); + + // Create a handler for the sendButton and nameField + class MyHandler implements ClickHandler, KeyUpHandler + { + /** + * Fired when the user clicks on the sendButton. + */ + public void onClick(ClickEvent event) + { + sendNameToServer(); + MatingEngineImpl_XY xy = new MatingEngineImpl_XY(); + ModelImpl impl = new ModelImpl(); + GenomeImpl genome = new GenomeImpl(); + ChromosomeImpl c = new ChromosomeImpl("name", genome); + GeneImpl g = new GeneImpl("test", 2, c); + impl.setGenome(genome); + System.out.println(impl); + } + + /** + * Fired when the user types in the nameField. + */ + public void onKeyUp(KeyUpEvent event) + { + if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) + { + sendNameToServer(); + } + } + + /** + * Send the name from the nameField to the server and wait for a response. + */ + private void sendNameToServer() + { + // First, we validate the input. + errorLabel.setText(""); + String textToServer = nameField.getText(); + if (!FieldVerifier.isValidName(textToServer)) + { + errorLabel.setText("Please enter at least four characters"); + return; + } + + // Then, we send the input to the server. + sendButton.setEnabled(false); + textToServerLabel.setText(textToServer); + serverResponseLabel.setText(""); + } + } + + // Add a handler to send the name to the server + MyHandler handler = new MyHandler(); + sendButton.addClickHandler(handler); + nameField.addKeyUpHandler(handler); + } +} diff --git a/src/star/genetics/client/messages.properties b/src/star/genetics/client/messages.properties new file mode 100644 index 0000000..c929123 --- /dev/null +++ b/src/star/genetics/client/messages.properties @@ -0,0 +1,432 @@ +About.0=About +About.1=About StarGenetics +AboutBox.0=StarGenetics +AboutBox.1=Web site: http://web.mit.edu/star/genetics/ +AboutBox.14=About +AboutBox.2=Build: +AboutBox.3=Report bugs to: star@mit.edu +AboutBox.4=Java version: +AboutBox.6=\ from +AboutBox.8=OS version: +Add.1=Add to strains +AddMoreMatingsDialog.3=Apply +AddMoreMatingsDialog.5=Cancel +AddMoreMatingsDialog.7=Value {0} is not valid, valid value is {1} +AssociateExtension.3=Associate with sgz and sg1 extensions +ChooseExperiment.0=Choose experimental setup +ChooseExperiment.10=For mating & replica plating experiments involving tetrads +ChooseExperiment.5=For mating & replica plating experiments NOT involving tetrads +CloseButton.0=Hide +CloseButton.1=Show +CommonMenuBar.0=Tools +CommonMenuBar.1=File +CommonMenuBar.2=Help +Cow.0=m: +Crate.10=center, growx,growy +Crate.5=Individual +Crate.6=Sorted +Crate.7=Summary +Crate.8=Trait Summary +Crate.9=DNA Marker Summary +CreatureImpl.0=Creature "{0}" organizm "{1}" genetic makeup is {2} sterile {3} matings {4} +DiploidAllelesImpl.0=There has to be 1 or 2 alleles to construct diploid set. +DiscardCrate.0=Discard +DiscardCrate.1=Discard this experiment and start new experiment +DiscardCrate.2=Are you sure you want to discard this experiment? +DiscardCrate.3=Discard experiment +DiscardExperiment.0=Discard +DiscardExperiment.1=Discard this experiment and start new experiment +DiscardExperiment.2=Discard this experiment +DiscardExperiment.3=Discard Experiment {0} +DiscardExperiment.4=Are you sure you want to discard experiment {0}? +DiscardExperiment.6=Don't ask me again +DiscardExperiment.8=Discard +DiscardExperiment.9=Cancel +ErrorDialogHandler.0=Exception occured +ErrorDialogHandler.1=Yes +ErrorDialogHandler.2=No +ErrorDialogHandler.3= The system reported an issue that is likely related to issue with reading downloaded file or opening URL.
If issue persists after re-downloading the file please consider reporting it to the development team.

System reported following message:
{0}

We would appreciate if you would report this issue to development team.
Would you like to report this to developers? +ErrorDialogHandler.4={0}
We would appreciate if you would report this issue to development team.
Would you like to report this to developers? +Experiment.0=Active Experiment +Experiment.1=Please enter new experiment name +Experiment.2=Rename experiment +Export.0=Save report as Excel workbook +Export.2=Excel export file +Export.4=Export +ExportAsSGZ.0=SGZ Encryptor +ExportAsSGZ.1=

XLS->SGZ encoder

Please select the Excel file (XLS) that you wish to encrypt. +ExportAsSGZ.10=File not found. +ExportAsSGZ.11=Excel file is not valid, try opening file and test it before attempting to encrypt it. +ExportAsSGZ.2=XLS to SGZ encoder +ExportAsSGZ.3=Select +ExportAsSGZ.4=Select XLS file to encrypt +ExportAsSGZ.6=StarGenetics Excel Template (.xls) +ExportAsSGZ.9=The file {0} has been encrypted as {1}.
You will find it in the same directory as your XLS file, with a SGZ extension instead. +ExportAsSGZMulti.0=SGZ Encryptor - Multiple Problems +Feedback.0=Send suggestions +FileList.10=Creature names: +FileList.13={0} +FileList.14=Parse: Failed +FileList.16={0} +FileList.18=Add file +FileList.19=Export as SGZ +FileList.2=Path: {0} +FileList.20=Close +FileList.22=SGZ file +FileList.26=The file {0} has been created. +FileList.31=StarGenetics File Types (.xls) +FileList.32=File {0} is already in the list. +FileList.4=Remove from list +FileList.6=Parse: OK +FileList.8=Sex type: {0} +Fly.2=m: +Fly.3=sterile +GelFilter.0=Choose DNA markers to be displayed: +GelFilter.1=No gels selected +GelFilter.3=None +GelFilter.4=Change selection +GelFilter.5=Pick DNA markers to display +GelFilter.6=Apply +GelFilter.7=Display None +GelFilter.8=Cancel +GelVisual.1=Ladder +GelVisual.2=Parents +GelVisual.3=Parents +GelVisual.5=\ \ Exp +GettingStarted.0=Getting Started +GettingStarted.1=resources/GettingStartedInHelp.html +GettingStarted.2=Getting Started +GroupBy.0=Phenotypes +GroupBy.1=Count +GroupBy.2=Female +GroupBy.21=Hide +GroupBy.22=Show +GroupBy.23=Phenotype description: +GroupBy.3=Male +GroupBy.4={0} ({1}%) +GroupBy.45=TOTAL +GroupBy.6=resources/SummaryTabEmpty.html +GroupBy.9=BOTH +GroupByGel.0=resources/SummaryTabEmpty.html +GroupByGel.1=Female +GroupByGel.2=Male +GroupByGel.3=TOTAL +GroupByGel.4={0} ({1}%) +GroupByGel.5=Phenotypes +GroupByGel.6=Phenotype description: +GroupByGel.7=Show +GroupByGel.8=Hide +Helper.0=Invalid value: {0} as part of {1} +Helper.10=Save document? +Helper.14=File {0} does not exist. +Helper.16=File {0} is not readable. +Helper.18=Invalid URI {0}, can not open. +Helper.20=Invalid URI, can not open file. +Helper.5=Invalid value, must contain at least one '=' sign +Helper.9=You have unsaved changes. Would you like to save your experiment? Select 'Yes' to save your changes. Select 'No' to continue. +HideCrate.0=Discard +HideCrate.1=Are you sure you want to discard this experiment? +HideCrate.2=Discard experiment +History.0=Saved experiments +History.1=Open in new window +History.3=Unknown experiment type: {0} +History.4=resources/GettingStarted.html +History.5=resources/GettingStartedYeast.html +History.6=Unknown experiment type: {0} +Main.1=You have unsaved changes, do you want to quit? +Main.2=Do you want to quit? +MainFrame.0=/resources/StarGenetics.png +MainPanel.0=

Welcome to StarGenetics


To get started:

 - Click on File->New to select an exercise file from our list.

 - Click on File->Open to select your own StarGenetics .xls or .sgz file. +MainPanel.10=We encountered error opening a StarGenetics document. +MainPanel.2=StarGenetics +MainPanel.6=StarGenetics +MainPanel.9=Unsupported visualizer class, supported classes: {0} +Mate.0=Mate +Mate.2=Add more matings +Mate.3=How many more matings would you like to perform? +Mate.4=Add more matings +Mate.5=Please wait... +Mate.6=

Please wait...

+MatingEngineImpl_Common.3=All progenies are dead\! +MatingEngineImpl_Common.4=Parents can not mate\! +MatingEngineImpl_MAT.0=Mapping order should be in range 0-3 +MatingExperiment.0=Active Experiment +MatingExperiment.1=Please enter new experiment name +MatingExperiment.2=Rename experiment +MatingPanel.0=Message +MatingPanel.1=Please wait, generating visuals for +MatingPanel.10=TT +MatingPanel.11=NPD +MatingPanel.12=NPD +MatingPanel.13= +MatingPanel.14=NPD +MatingPanel.15=NPD +MatingPanel.16=PD +MatingPanel.17=PD +MatingPanel.18=TT +MatingPanel.19=TT +MatingPanel.2=Replica plates: +MatingPanel.22=Total +MatingPanel.24=Clear counters +MatingPanel.26= 
Mating site +MatingPanel.28=Mating site +MatingPanel.29=These two strains cannot mate. +MatingPanel.3=Replica plates: +MatingPanel.30=Discard +MatingPanel.31=Discard +MatingPanel.33= 
Tetrads +MatingPanel.34= +MatingPanel.35=
Display individual tetrads
+MatingPanel.36=Display summary +MatingPanel.37=Count +MatingPanel.38=Tetrad type +MatingPanel.39= +MatingPanel.4=PD +MatingPanel.40=Count +MatingPanel.41=Tetrad type +MatingPanel.42= +MatingPanel.43=
Tetrad type summary
not applicable +MatingPanel.44= +MatingPanel.5=TT +MatingPanel.50=... +MatingPanel.52=Replica plating
conditions

Media +MatingPanel.53=Replica plate +MatingPanel.54=Experiment {0} is already available.\n +MatingPanel.55=Plating conditions: +MatingPanel.56= 
Plate on a lawn of:
+MatingPanel.58=None +MatingPanel.59= 
And replica plate on:
+MatingPanel.6=NPD +MatingPanel.60=Replica plate +MatingPanel.61=Trying to cross two organisms of same sex type. \n +MatingPanel.62=None +MatingPanel.63=This experiment is already available: lawn: {0}, media: {1}. \n +MatingPanel.7=PD +MatingPanel.8=PD +MatingPanel.9=TT +ModelSaver.1=StarGenetics File Type (.sg1) +ModelSaver.4=Are you sure you want to override file '{0}'? +ModelSaver.5=File exists, override? +ModelSaver.6=Save +ModelSaver.7=File is not saved, please try SAVE operation again +MyDropTarget.1=
Drop strain here +Save.0=Save +Save.1=Save +Save.2=StarGenetics File Type (.sg1) +Save.5=Are you sure you want to override file "{0}"? +Save.6=File exists, override? +Save.8=File is not saved, please try SAVE operation again +Screenshot.0=Save screenshot +Screenshot.10=Screenshot +Screenshot.2=PNG file (.png) +Screenshot.5=Please select oversapling factor\n1 - no oversampling,\n10 - good for poster publishing\n.5 - good for web publishing\n +Screenshot.7=Please wait... +Screenshot.8=Please wait, saving screenshot... +Set.1=Set as parent +SetAsParent.0=Set as a parent +Sex.10=Unknown sex type +Sex.2=All Y chromosomes have one gene on them, to be male all X chromosomes have to have one gene on them too. Organism: {0} +Sex.4=All Y chromosomes have no genes on them, to be female all X chromosomes have to have two genes on them. Organism: {0} +Sex.5=Inconsistent Y chromosomes. Organism: {0} +Sex.7=All X chromosome's genes have to have one or two alleles on them. Organism: {0} +Sex.8=X chromosome genes are missing. Organism: {0} +Sex.9=All X chromosome's genes have to have one or two alleles on them. Organism: {0} +SillyParentLabel.1=Drop here
to mate. +Smiley.1=m: +Sporulate.0=Mate & sporulate +Sporulate.1=Mate and sporulate +Sporulate.2=Add more tetrads +Sporulate.3=How many more tetrads? +Sporulate.4=Analyze more tetrads +Sporulate.7=How many more tetrads? +Sporulate.8=Analyze more tetrads +Strains.0=Strains +VisualizerFactoryImpl.1=Unable to instantiate visualizer. ({0}) +InputOutput.0=Experiment +InputOutput.1=Not specified +InputOutput.10=Experiment +InputOutput.12= +InputOutput.13=\ (hidden) +InputOutput.14=Parent +InputOutput.16=Offspring +InputOutput.2=Filename is: {0} URL is: {1} +InputOutput.4=Kind +InputOutput.5=Name +InputOutput.6=Sex +InputOutput.7=Count +InputOutput.8=Saved experiments +InputOutput.9=Discarded experiments +JGel.0=Marker summary +LanguageSelector.0=Select language +LanguageSelector.5=Would you like to restart the application in {0}? +LanguageSelector.6=Confirm language change +Load.0=Your code is: {0}.\nThis unique code for provided email address: {1}\nPlease write this information down. +Load.17=XLS has to have following sheets: {0}, {1} and {2}. +Load.18={0} sheet is missing columns, requried columns are: {1}, {2}, {3}, {4} +Load.19={0} sheet is missing columns, requried columns are: {1}, {2}, {3}, {4} +Load.22=Invalid data in row {0}, at least one of the columns has missing data. +Load.25=Organism {0} in the Organisms for Mating tab is incorrectly coded for a sex-linked gene. If a gene is X-linked, then only one allele should be listed for a male (XY) organism. +Load.27=Organism {0} in the Organisms for Mating tab is incorrectly coded for a sex-linked gene. If a gene is X-linked, then two alleles should be listed for a female (XX) organism. +Load.28=Inconsistent Y chromosomes. Organism: {0} +Load.29=Unknown sex type +Load.32=Organism {1} in the Organisms for Mating tab is incorrectly coded for an autosomal-linked gene {0}. Two alleles should be listed for an autosomal gene. +Load.33=Gene {0} in organism {1} listed in the "Organisms for Mating" tab has not been correctly defined in the "Genes & Alleles" tab. +Load.34=Unknown sex type +Load.36=There is not valid number of alleles in row {0} and column {1}: {2} +Load.37=Duplicate gene name {0} on chromosome {2} in row {1} +Load.38=Heading row is missing +Load.39=Invalid data in row {0}, at least one of the columns has missing data. +Load.46=File size is 0, please try to download it again. Or attach the file in an email to star@mit.edu. +Load.52=Please type your MIT e-mail address so that a unique version of this exercise can be assigned to you: +Load.53=StarGenetics exercise will not load unless you provide a value in previous dialog. Please try again. +Load2.0=\ - no localized message +Load2.10=Can not find heading row for "{0}" sheet. +Load2.12=Invalid data in row {0}, at least one of the columns has missing data. +Load2.14=Can not find {0}. +Load2.15=Can not find heading row for "{0}" sheet. +Load2.18=Can not find allele "{1}" for "{0}" sheet. +Load2.20=Can not find heading row for {0} sheet. +Load2.24=Invalid data in row {0}, at least one of the columns has missing data. +Load2.25=Duplicate gene name {0} on chromosome {2} in row {1} +Load2.26=Can not find heading row for {0} sheet. +Load2.28=Invalid data in row {0}, at least one of the columns has missing data. +New.0=New +NewExperiment.0=New experiment +NewExperiment.1=Save this experiment and start new experiment +NewReplicationExperiment.0=Non-tetrad experiment +Open.0=Open +Open.4=StarGenetics File Types (.sg1, .xls, .sgz) +Open.6=File not found: +Options.0=Options +Options.1=Display options dialog... +OrganismList.0=Organism already in the list. +OrganismList.1=Are you sure you want to delete {0}? +OrganismList.2=Confirm remove +Parents.0=Mating site +ParentsList.0=Would you like to replace {0} parent? +ParentsList.1=Replace parent? +ParentsList.2=If you want to mate different organisms, start new experiment or discard it. +ParentsList.3=Are you sure you want to delete {0}? +ParentsList.4=Confirm remove +ParentsListModelImplUnisex.0=
ovum
donor
+ParentsListModelImplUnisex.1=
sperm
donor
+ParentsListUnisex.0=To start mating with new parents please click 'New experiment' or 'Discard experiment' +ParentsListUnisex.1=If you want to mate different organisms, start new experiment or discard it. +ParentsListUnisex.2=Are you sure you want to delete {0}? +ParentsListUnisex.3=Confirm remove +Properties.0=Properties +Properties.1=No organism selected +PropertiesPanel.10=Notes +PropertiesPanel.12=Image +PropertiesPanel.22=Please enter a new strain name +PropertiesPanel.3=Rename strain +PropertiesPanel.23=Please enter a new strain name +PropertiesPanel.24=Name +PropertiesPanel.4=Rename creature +PropertiesPanel.5=Name +PropertiesPanel.6=Notes +PropertiesPanel.7=Sex +PunnettSqaure.0=Punnett Square +PunnettSquare.0=Close +PunnettSquare.1=Genotype frequency: +PunnettSquare.2=Parental Genotype 1: +PunnettSquare.3=Parental Genotype 2: +PunnettSquare.4=Monohybrid Punnett square table: +PunnettSquare.5=

Monohybrid Punnett Square

+PunnettSquare2.0=Close +PunnettSquare2.1=Genotype frequency: +PunnettSquare2.2=Parental Genotype 1: +PunnettSquare2.3=Parental Genotype 2: +PunnettSquare2.4=Dihybrid Punnett square table: +PunnettSquare2.5=

Dihybrid Punnett Square

+PunnettSquare3.0=Close +PunnettSquare3.1=Genotype frequency: +PunnettSquare3.2=Parental Genotype 1: +PunnettSquare3.3=Parental Genotype 2: +PunnettSquare3.4=Monohybrid sex-linked Punnett square table: +PunnettSquare3.5=

Monohybrid sex-linked Punnett Square

+PunnettSquare4.0=Close +PunnettSquare4.1=Genotype frequency: +PunnettSquare4.2=Parental Genotype 1: +PunnettSquare4.3=Parental Genotype 2: +PunnettSquare4.4=Dihybrid sex-linked Punnett square table: +PunnettSquare4.5=

Dihybrid sex-linked Punnett Square

+PunnettSquareButton.0=Punnett Square +PunnettSquareDialog.0=Punnett Square +PunnettSquareDialog.1=Monohybrid +PunnettSquareDialog.2=Dihybrid +PunnettSquareDialog.3=Sex-linked +PunnettSquareModel2.0=Please select all 4 parental genotypes first.
\n +PunnettSquareModel4.0=Please select all 4 parental genotypes first.
\n +Quit.0=Quit +QuitDialog.0=http://www.surveymonkey.com/s/GSJ3XDV +QuitDialog.1=Quit +QuitDialog.2=Cancel +QuitDialog.3=Thank you for your participation\! A new web browser window will open. +QuitDialog.4=Take Survey +QuitDialog.7=Thank you for using StarGenetics +QuitDialog.9=
This survey will take less than 2 minutes to complete.
Your input regarding this software will greatly improve its usability in the classroom.
+RecentDocuments.0=RecentDocuments +RecentDocuments.1=Recent documents +RecentDocuments.11=Clear recent document list +RecentDocuments.12=Unable to clear document list +RecentDocuments.13=Failed to open +Remove.1=Remove from strains +RemoveOrganism.0=Remove from strains +RenameCrate.0=Rename +RenameCrate.1=Please enter new experiment name +RenameCrate.2=Rename experiment +RenameExperiment.0=Rename +RenameExperiment.1=Please enter new experiment name +RenameExperiment.2=Rename experiment +ReplicaExperimentAddAll.0=Add all strains +ReplicaExperimentAddAll.1=Add all strains from strainbox to experiment +ReplicaPanel.0=Replica plates: +ReplicaPanel.1=Plating conditions: +ReplicaPanel.10=Discard +ReplicaPanel.11=Discard +ReplicaPanel.12= 
Plate on a lawn of:
+ReplicaPanel.14=None +ReplicaPanel.15= 
And replica plate on:
+ReplicaPanel.16=Replica plate +ReplicaPanel.17=Trying to cross two organisms of same sex type. \n +ReplicaPanel.18=None +ReplicaPanel.19=This experiment is already available, lawn: {0} media: {1}. \n +ReplicaPanel.2=... +ReplicaPanel.20=Strain is already in the list. +ReplicationExperiment.0=Active Experiment +RuleImpl.1=makeChromosomeRule failed for allele {0} in rule {1} +RuleImpl.2=Can not determine chromosome for rule {0}. +Tools.0=Suggestion box +WebSamples.0=Reading {0} +WebSamples.1=No connection to internet available. Can not open external URL. +WebSamples.19=Close +WebSamples.2=http://star.mit.edu/genetics/problemsets/samples_body.html +WebSamples.3=Welcome to StarGenetics +WebSamples.4=/resources/star.mit.edu/genetics/problemsets/samples_body.html +WebSamples.5=Can not access samples, please use File->Open to load problems from local disk. +YeastParentLabel.1=Drop here
to mate. +YeastParents.0=Diploid +YeastProgenyLabel.10=Lawn grows, it shadows everything else... +YeastProgenyLabel.21=\ -- Creature is null. +YeastProgenyLabel.22=Lawn grows, it shadows everything else... +Tools.1=Tools +NewMatingExperiment.0=Tetrad experiment +CrateModelImpl.0=Exp. {0} +Peas.plantheight=Plant height +Peas.flowercolor=Flower color +Peas.flowerpodposition=Flower pod position +Peas.podcolor=Pod color +Peas.podshape=Pod Shape +Peas.peacolor=Pea color +Peas.peashape=Pea shape +Peas.matings=Matings +Fly.sex=Sex +Fly.matings=Matings +Fly.bodycolor=Body color +Fly.eyecolor=Eye color +Fly.wingsize=Wing size +Fly.wingvein=Wing vein +Fly.sterile=Sterile +Fly.lethal=Lethal +Fly.aristae=Aristae diff --git a/src/star/genetics/client/messages_en.properties b/src/star/genetics/client/messages_en.properties new file mode 100644 index 0000000..9366b5a --- /dev/null +++ b/src/star/genetics/client/messages_en.properties @@ -0,0 +1,430 @@ +#en +#Thu Aug 22 15:14:45 EDT 2013 +GroupBy.4={0} ({1}%) +GroupBy.3=Male +Cow.0=m\: +GroupBy.2=Female +GroupBy.1=Count +GroupBy.0=Phenotypes +YeastParentLabel.1=Drop here
to mate. +ReplicationExperiment.0=Active Experiment +Strains.0=Strains +ReplicaPanel.2=... +ReplicaPanel.1=Plating conditions\: +ReplicaPanel.0=Replica plates\: +RecentDocuments.1=Recent documents +RecentDocuments.0=RecentDocuments +CommonMenuBar.2=Help +CommonMenuBar.1=File +CommonMenuBar.0=Tools +AssociateExtension.3=Associate with sgz and sg1 extensions +Sex.9=All X chromosome's genes have to have one or two alleles on them. Organism\: {0} +Sex.8=Organism {0} in the Organisms for Mating tab is incorrectly coded for a sex-linked gene. If a gene is X-linked, then only one allele should be listed for a male (XY) organism and two alleles should be listed for a female (XX) organism. +Peas.flowercolor=Flower color +Load.0=Your code is\: {0}.\\nThis unique code for provided email address\: {1}\\nPlease write this information down. +Sex.7=All X chromosome's genes have to have one or two alleles on them. Organism\: {0} +Sex.5=Inconsistent Y chromosomes. Organism\: {0} +Sex.4=Organism {0} in the Organisms for Mating tab is incorrectly coded for a sex-linked gene. If a gene is X-linked, then two alleles should be listed for a female (XX) organism. +Sex.2=Organism {0} in the Organisms for Mating tab is incorrectly coded for a sex-linked gene. If a gene is X-linked, then only one allele should be listed for a male (XY) organism. +Set.1=Set as parent +Remove.1=Remove from strains +Peas.flowerpodposition=Flower pod position +WebSamples.5=Can not access samples, please use File->Open to load problems from local disk. +WebSamples.4=/resources/star.mit.edu/genetics/problemsets/samples_body.html +WebSamples.3=Welcome to StarGenetics +PunnettSquareModel4.0=Please select all 4 parental genotypes first.
\\n +WebSamples.2=http\://star.mit.edu/genetics/problemsets/samples_body.html +WebSamples.1=No connection to internet available. Can not open external URL. +WebSamples.0=Reading {0} +Save.8=File is not saved, please try SAVE operation again +Save.6=File exists, override? +Save.5=Are you sure you want to override file "{0}"? +VisualizerFactoryImpl.1=Unable to instantiate visualizer. ({0}) +Fly.wingvein=Wing vein +Save.2=StarGenetics File Type (.sg1) +Save.1=Save +Save.0=Save +DiscardExperiment.9=Cancel +DiscardExperiment.8=Discard +Smiley.1=m\: +DiscardExperiment.6=Don't ask me again +DiscardExperiment.4=Are you sure you want to discard experiment {0}? +DiscardExperiment.3=Discard Experiment {0} +DiscardExperiment.2=Discard this experiment +DiscardExperiment.1=Discard this experiment and start new experiment +DiscardExperiment.0=Discard +Helper.9=You have unsaved changes. Would you like to save your experiment? Select 'Yes' to save your changes. Select 'No' to continue. +Export.4=Export +RenameCrate.2=Rename experiment +RenameCrate.1=Please enter new experiment name +Peas.peacolor=Pea color +Export.2=Excel export file +RenameCrate.0=Rename +GroupBy.45=TOTAL +Helper.5=Invalid value, must contain at least one '\=' sign +Export.0=Save report as Excel workbook +Helper.0=Invalid value\: {0} as part of {1} +Quit.0=Quit +Helper.20=Invalid URI, can not open file. +PunnettSquare4.5=

Dihybrid sex-linked Punnett Square

+PunnettSquare4.4=Dihybrid sex-linked Punnett square table\: +PunnettSquare4.3=Parental Genotype 2\: +PunnettSquare4.2=Parental Genotype 1\: +PunnettSquare4.1=Genotype frequency\: +PunnettSquare4.0=Close +QuitDialog.9=
This survey will take less than 2 minutes to complete.
Your input regarding this software will greatly improve its usability in the classroom.
+QuitDialog.7=Thank you for using StarGenetics +Fly.matings=Matings +QuitDialog.4=Take Survey +QuitDialog.3=Thank you for your participation\\\! A new web browser window will open. +Helper.18=Invalid URI {0}, can not open. +QuitDialog.2=Cancel +HideCrate.2=Discard experiment +QuitDialog.1=Quit +Helper.16=File {0} is not readable. +HideCrate.1=Are you sure you want to discard this experiment? +QuitDialog.0=http\://www.surveymonkey.com/s/GSJ3XDV +HideCrate.0=Discard +Helper.14=File {0} does not exist. +Helper.10=Save document? +Add.1=Add to strains +CloseButton.1=Show +CloseButton.0=Hide +Fly.aristae=Aristae +GroupBy.23=Phenotype description\: +GroupBy.22=Show +GroupBy.21=Hide +Crate.10=center, growx,growy +MatingExperiment.2=Rename experiment +MatingExperiment.1=Please enter new experiment name +MatingExperiment.0=Active Experiment +MatingEngineImpl_MAT.0=Mapping order should be in range 0-3 +RenameExperiment.2=Rename experiment +RenameExperiment.1=Please enter new experiment name +AddMoreMatingsDialog.7=Value {0} is not valid, valid value is {1} +RenameExperiment.0=Rename +AddMoreMatingsDialog.5=Cancel +AddMoreMatingsDialog.3=Apply +CreatureImpl.0=Creature "{0}" organizm "{1}" genetic makeup is {2} sterile {3} matings {4} +OrganismList.2=Confirm remove +ParentsListUnisex.3=Confirm remove +OrganismList.1=Are you sure you want to delete {0}? +History.6=Unknown experiment type\: {0} +ParentsListUnisex.2=Are you sure you want to delete {0}? +OrganismList.0=Organism already in the list. +History.5=resources/GettingStartedYeast.html +ParentsListUnisex.1=If you want to mate different organisms, start new experiment or discard it. +History.4=resources/GettingStarted.html +ParentsListUnisex.0=To start mating with new parents please click 'New experiment' or 'Discard experiment' +History.3=Unknown experiment type\: {0} +History.1=Open in new window +History.0=Saved experiments +Experiment.2=Rename experiment +Experiment.1=Please enter new experiment name +Experiment.0=Active Experiment +ExportAsSGZ.9=The file {0} has been encrypted as {1}.
You will find it in the same directory as your XLS file, with a SGZ extension instead. +ExportAsSGZ.6=StarGenetics Excel Template (.xls) +ExportAsSGZ.4=Select XLS file to encrypt +ExportAsSGZ.3=Select +ExportAsSGZ.2=XLS to SGZ encoder +ExportAsSGZ.1=

XLS->SGZ encoder

Please select the Excel file (XLS) that you wish to encrypt. +Screenshot.10=Screenshot +ExportAsSGZ.0=SGZ Encryptor +Fly.bodycolor=Body color +SetAsParent.0=Set as a parent +ParentsList.4=Confirm remove +ParentsList.3=Are you sure you want to delete {0}? +ParentsList.2=If you want to mate different organisms, start new experiment or discard it. +ParentsList.1=Replace parent? +ParentsList.0=Would you like to replace {0} parent? +GroupByGel.8=Hide +MatingPanel.63=This experiment is already available\: lawn\: {0}, media\: {1}. \\n +GroupByGel.7=Show +MatingPanel.62=None +GroupByGel.6=Phenotype description\: +MatingPanel.61=Trying to cross two organisms of same sex type. \\n +GroupByGel.5=Phenotypes +MatingPanel.60=Replica plate +GroupByGel.4={0} ({1}%) +GroupByGel.3=TOTAL +GroupByGel.2=Male +GroupByGel.1=Female +ReplicaPanel.20=Strain is already in the list. +ErrorDialogHandler.4={0}
We would appreciate if you would report this issue to development team.
Would you like to report this to developers? +MyDropTarget.1=
Drop strain here +GroupByGel.0=resources/SummaryTabEmpty.html +Peas.podshape=Pod Shape +ErrorDialogHandler.3= The system reported an issue that is likely related to issue with reading downloaded file or opening URL.
If issue persists after re-downloading the file please consider reporting it to the development team.

System reported following message\:
{0}

We would appreciate if you would report this issue to development team.
Would you like to report this to developers? +ErrorDialogHandler.2=No +ErrorDialogHandler.1=Yes +ErrorDialogHandler.0=Exception occured +LanguageSelector.6=Confirm language change +Feedback.0=Send suggestions +LanguageSelector.5=Would you like to restart the application in {0}? +WebSamples.19=Close +PunnettSquare3.5=

Monohybrid sex-linked Punnett Square

+PunnettSquare3.4=Monohybrid sex-linked Punnett square table\: +PunnettSquare3.3=Parental Genotype 2\: +PunnettSquare3.2=Parental Genotype 1\: +LanguageSelector.0=Select language +PunnettSquare3.1=Genotype frequency\: +PunnettSquare3.0=Close +MatingPanel.59= 
And replica plate on\:
+MatingPanel.58=None +MatingPanel.56= 
Plate on a lawn of\:
+ReplicaPanel.19=This experiment is already available, lawn\: {0} media\: {1}. \\n +MatingPanel.55=Plating conditions\: +ReplicaPanel.18=None +MatingPanel.54=Experiment {0} is already available.\\n +ReplicaPanel.17=Trying to cross two organisms of same sex type. \\n +MatingPanel.53=Replica plate +ReplicaPanel.16=Replica plate +MatingPanel.52=Replica plating
conditions

Media +ReplicaPanel.15= 
And replica plate on\:
+ReplicaPanel.14=None +MatingPanel.50=... +ReplicaPanel.12= 
Plate on a lawn of\:
+ReplicaPanel.11=Discard +ReplicaPanel.10=Discard +Load.53=StarGenetics exercise will not load unless you provide a value in previous dialog. Please try again. +Load.52=Please type your MIT e-mail address so that a unique version of this exercise can be assigned to you\: +Properties.1=No organism selected +Properties.0=Properties +RemoveOrganism.0=Remove from strains +MatingPanel.44= +MatingPanel.43=
Tetrad type summary
not applicable +MatingPanel.42=\\u00A0 +MatingPanel.41=Tetrad type +YeastProgenyLabel.22=Lawn grows, it shadows everything else... +MatingPanel.40=Count +YeastProgenyLabel.21=\\ -- Creature is null. +PropertiesPanel.7=Sex +PropertiesPanel.6=Notes +PropertiesPanel.5=Name +PropertiesPanel.4=Rename creature +PropertiesPanel.3=Rename strain +Load.46=File size is 0, please try to download it again. Or attach the file in an email to star@mit.edu. +GelVisual.5=\\ \\ Exp +InputOutput.16=Offspring +GelVisual.3=Parents +GelVisual.2=Parents +InputOutput.14=Parent +InputOutput.13=\\ (hidden) +GelVisual.1=Ladder +Fly.sterile=Sterile +InputOutput.10=Experiment +MatingPanel.38=Tetrad type +MatingPanel.37=Count +MatingPanel.36=Display summary +MatingPanel.35=
Display individual tetrads
+FileList.32=File {0} is already in the list. +MatingPanel.33= 
Tetrads +FileList.31=StarGenetics File Types (.xls) +MatingPanel.31=Discard +MatingPanel.30=Discard +YeastProgenyLabel.10=Lawn grows, it shadows everything else... +Load.39=Invalid data in row {0}, at least one of the columns has missing data. +Load.38=Heading row is missing +Load.37=Duplicate gene name {0} on chromosome {2} in row {1} +Load.36=There is not valid number of alleles in row {0} and column {1}\: {2} +Load.34=Unknown sex type +Load.33=Gene {0} ({1}) listed in the "Organisms for Mating" tab has not been correctly defined in the "Genes & Alleles" tab. +Load.32=Organism {1} in the Organisms for Mating tab is incorrectly coded for an autosomal-linked gene {0}. Two alleles should be listed for an autosomal gene. +Peas.plantheight=Plant height +Fly.eyecolor=Eye color +DiploidAllelesImpl.0=There has to be 1 or 2 alleles to construct diploid set. +MatingPanel.29=These two strains cannot mate. +MatingPanel.28=Mating site +FileList.26=The file {0} has been created. +MatingPanel.26= 
Mating site +MatingPanel.24=Clear counters +FileList.22=SGZ file +MatingPanel.22=Total +FileList.20=Close +Tools.1=Tools +Tools.0=Suggestion box +Load.29=Unknown sex type +Fly.lethal=Lethal +Load.28=Inconsistent Y chromosomes. Organism\: {0} +Load.27=Organism {0} in the Organisms for Mating tab is incorrectly coded for a sex-linked gene. If a gene is X-linked, then two alleles should be listed for a female (XX) organism. +SillyParentLabel.1=Drop here
to mate. +MainPanel.10=We encountered error opening a StarGenetics document. +ExportAsSGZ.11=Excel file is not valid, try opening file and test it before attempting to encrypt it. +Load.25=Organism {0} in the Organisms for Mating tab is incorrectly coded for a sex-linked gene. If a gene is X-linked, then only one allele should be listed for a male (XY) organism. +ExportAsSGZ.10=File not found. +Load.22=Invalid data in row {0}, at least one of the columns has missing data. +FileList.19=Export as SGZ +FileList.18=Add file +MatingPanel.19=TT +MatingPanel.18=TT +FileList.16={0} +MatingPanel.17=PD +MatingPanel.16=PD +ParentsListModelImplUnisex.1=
sperm
donor
+FileList.14=Parse\: Failed +MatingPanel.15=NPD +ParentsListModelImplUnisex.0=
ovum
donor
+FileList.13={0} +MatingPanel.14=NPD +GettingStarted.2=Getting Started +PunnettSquareModel2.0=Please select all 4 parental genotypes first.
\\n +MatingPanel.12=NPD +GettingStarted.1=resources/GettingStartedInHelp.html +FileList.10=Creature names\: +MatingPanel.11=NPD +GettingStarted.0=Getting Started +MatingPanel.10=TT +Load.19={0} sheet is missing columns, required columns are\: {1}, {2}, {3}, {4} +Load.18={0} sheet is missing columns, required columns are\: {1}, {2}, {3}, {4} +Load.17=XLS has to have following sheets\: {0}, {1} and {2}. +NewReplicationExperiment.0=Non-tetrad experiment +Main.2=Do you want to quit? +Main.1=You have unsaved changes, do you want to quit? +RuleImpl.2=Can not determine chromosome for rule {0}. +RuleImpl.1=makeChromosomeRule failed for allele {0} in rule {1} +Mate.6=

Please wait...

+Mate.5=Please wait... +Mate.4=Add more matings +Mate.3=How many more matings would you like to perform? +Mate.2=Add more matings +Mate.0=Mate +RecentDocuments.13=Failed to open +RecentDocuments.12=Unable to clear document list +RecentDocuments.11=Clear recent document list +Open.6=File not found\: +ModelSaver.7=File is not saved, please try SAVE operation again +Open.4=StarGenetics File Types (.sg1, .xls, .sgz) +ModelSaver.6=Save +ModelSaver.5=File exists, override? +New.0=New +ModelSaver.4=Are you sure you want to override file '{0}'? +Open.0=Open +ModelSaver.1=StarGenetics File Type (.sg1) +MainFrame.0=/resources/StarGenetics.png +PunnettSquare2.5=

Dihybrid Punnett Square

+PunnettSquare2.4=Dihybrid Punnett square table\: +PunnettSquare2.3=Parental Genotype 2\: +PunnettSquare2.2=Parental Genotype 1\: +PunnettSquare2.1=Genotype frequency\: +Peas.peashape=Pea shape +PunnettSquare2.0=Close +PunnettSquareButton.0=Punnett Square +Crate.9=DNA Marker Summary +Crate.8=Trait Summary +Crate.7=Summary +Crate.6=Sorted +Crate.5=Individual +ExportAsSGZMulti.0=SGZ Encryptor - Multiple Problems +DiscardCrate.3=Discard experiment +DiscardCrate.2=Are you sure you want to discard this experiment? +DiscardCrate.1=Discard this experiment and start new experiment +JGel.0=Marker summary +DiscardCrate.0=Discard +NewExperiment.1=Save this experiment and start new experiment +Load2.0=\\ - no localized message +NewExperiment.0=New experiment +PunnettSquare.5=

Monohybrid Punnett Square

+PunnettSquare.4=Monohybrid Punnett square table\: +PunnettSquare.3=Parental Genotype 2\: +PunnettSquare.2=Parental Genotype 1\: +PunnettSquare.1=Genotype frequency\: +PunnettSquare.0=Close +NewMatingExperiment.0=Tetrad experiment +AboutBox.8=OS version\: +Load2.28=Invalid data in row {0}, at least one of the columns has missing data. +AboutBox.6=\\ from +Load2.26=Can not find heading row for {0} sheet. +AboutBox.4=Java version\: +Load2.25=Duplicate gene name {0} on chromosome {2} in row {1} +AboutBox.3=Report bugs to\: star@mit.edu +Load2.24=Invalid data in row {0}, at least one of the columns has missing data. +FileList.8=Sex type\: {0} +AboutBox.2=Build\: +AboutBox.1=Web site\: http\://star.mit.edu/genetics/ +FileList.6=Parse\: OK +AboutBox.0=StarGenetics +Load2.20=Can not find heading row for {0} sheet. +FileList.4=Remove from list +FileList.2=Path\: {0} +PunnettSquareDialog.3=Sex-linked +PunnettSquareDialog.2=Dihybrid +PunnettSquareDialog.1=Monohybrid +PunnettSquareDialog.0=Punnett Square +AboutBox.14=About +GelFilter.8=Cancel +GelFilter.7=Display None +GelFilter.6=Apply +GelFilter.5=Pick DNA markers to display +GelFilter.4=Change selection +GelFilter.3=None +Load2.18=Can not find allele "{1}" for "{0}" sheet. +GelFilter.1=No gels selected +GelFilter.0=Choose DNA markers to be displayed\: +InputOutput.9=Discarded experiments +InputOutput.8=Saved experiments +Load2.15=Can not find heading row for "{0}" sheet. +InputOutput.7=Count +Load2.14=Can not find {0}. +InputOutput.6=Sex +InputOutput.5=Name +Load2.12=Invalid data in row {0}, at least one of the columns has missing data. +InputOutput.4=Kind +Load2.10=Can not find heading row for "{0}" sheet. +InputOutput.2=Filename is\: {0} URL is\: {1} +InputOutput.1=Not specified +InputOutput.0=Experiment +Fly.3=sterile +Fly.2=m\: +Parents.0=Mating site +YeastParents.0=Diploid +Options.1=Display options dialog... +Options.0=Options +Sporulate.8=Analyze more tetrads +Sporulate.7=How many more tetrads? +Sporulate.4=Analyze more tetrads +Sporulate.3=How many more tetrads? +PropertiesPanel.24=Name +MatingPanel.9=TT +Sporulate.2=Add more tetrads +ReplicaExperimentAddAll.1=Add all strains from strainbox to experiment +PropertiesPanel.23=Please enter a new strain name +MatingPanel.8=PD +Sporulate.1=Mate and sporulate +ReplicaExperimentAddAll.0=Add all strains +PropertiesPanel.22=Please enter a new strain name +MatingPanel.7=PD +Sporulate.0=Mate & sporulate +MatingPanel.6=NPD +MatingPanel.5=TT +MatingPanel.4=PD +MatingPanel.3=Replica plates\: +MatingPanel.2=Replica plates\: +MatingPanel.1=Please wait, generating visuals for +MatingPanel.0=Message +Peas.podcolor=Pod color +About.1=About StarGenetics +About.0=About +PropertiesPanel.12=Image +PropertiesPanel.10=Notes +PunnettSqaure.0=Punnett Square +ChooseExperiment.5=For mating & replica plating experiments NOT involving tetrads +ChooseExperiment.0=Choose experimental setup +CrateModelImpl.0=Exp. {0} +Sex.10=Unknown sex type +Fly.wingsize=Wing size +MatingEngineImpl_Common.4=Parents can not mate\\\! +MatingEngineImpl_Common.3=All progenies are dead\\\! +Fly.sex=Sex +MainPanel.9=Unsupported visualizer class, supported classes\: {0} +Peas.matings=Matings +MainPanel.6=StarGenetics +ChooseExperiment.10=For mating & replica plating experiments involving tetrads +Screenshot.8=Please wait, saving screenshot... +Screenshot.7=Please wait... +MainPanel.2=StarGenetics +Screenshot.5=Please select oversapling factor\\n1 - no oversampling,\\n10 - good for poster publishing\\n.5 - good for web publishing\\n +MainPanel.0=

Welcome to StarGenetics


To get started\:

 - Click on File->New to select an exercise file from our list.

 - Click on File->Open to select your own StarGenetics .xls or .sgz file. +Screenshot.2=PNG file (.png) +Screenshot.0=Save screenshot +GroupBy.9=BOTH +GroupBy.6=resources/SummaryTabEmpty.html diff --git a/src/star/genetics/client/messages_ht.properties b/src/star/genetics/client/messages_ht.properties new file mode 100644 index 0000000..6ac4609 --- /dev/null +++ b/src/star/genetics/client/messages_ht.properties @@ -0,0 +1,434 @@ +#ht +#Thu Aug 22 15:14:42 EDT 2013 +GroupBy.4={0} ({1}%) +GroupBy.3=Mal +Cow.0=m\: +GroupBy.2=Fem\u00E8l +GroupBy.1=Kantite +GroupBy.0=Fenotip +YeastParentLabel.1=Mete la
pou f\u00E8 kwazman +ReplicationExperiment.0=Esperimantasyon w ap f\u00E8 kounyea +Strains.0=Souch +ReplicaPanel.2=\\u2026 +ReplicaPanel.1=Kondisyon plakaj\: +ReplicaPanel.0=Plak pou replik\: +RecentDocuments.1=Dokiman resan +RecentDocuments.0=Dokiman resan +CommonMenuBar.2=\u00C8d +CommonMenuBar.1=Fichye +CommonMenuBar.0=Zouti +AssociateExtension.3=Asosye ak ekstansyon sgz epi sg1 +Sex.9=Tout j\u00E8n kwomoz\u00F2m X dwe gen 1 ou 2 al\u00E8l sou yo. \u00D2ganis\: {0} +Sex.8=\u00D2ganis {0} anba etik\u00E8t "\u00D2ganis ki pou kwaze" resevwa yon move kod pou yon j\u00E8n ki lye ak s\u00E8ks. Si yon j\u00E8n gen yon lyezon-X, f\u00F2k se yon grenn al\u00E8l ki afiche pou yon \u00F2ganis ki mal (XY) e f\u00F2k se 2 al\u00E8l ki afiche pou yon \u00F2ganis ki fem\u00E8l (XX) +Peas.flowercolor=Koul\u00E8 fl\u00E8 +Load.0=K\u00F2d ou se\: {0}.\\nSa se yon k\u00F2d inik pou adr\u00E8s imel ou bay la\: {1}\\nSouple ekri enf\u00F2masyon sa a. +Sex.7=Tout j\u00E8n ki sou kwomoz\u00F2m X yo dwe gen 1 ou 2 al\u00E8l. \u00D2ganis\: {0} +Sex.5=Kwomoz\u00F2m Y yo pa konsistan. \u00D2ganis\: {0} +Sex.4=\u00D2ganis {0} anba etik\u00E8t "\u00D2ganis ki pou kwaze" resevwa yon move kod pou yon j\u00E8n ki lye ak s\u00E8ks. Si yon j\u00E8n gen yon lyezon-X, f\u00F2k se 2 al\u00E8l ki afiche pou yon \u00F2ganis ki fem\u00E8l (XX) +Sex.2=\u00D2ganis {0} anba etik\u00E8t "\u00D2ganis ki pral kwaze" resevwa yon move kod pou yon j\u00E8n ki lye ak s\u00E8ks. Si yon j\u00E8n gen yon lyezon-X, f\u00F2k se yon grenn al\u00E8l ki afiche pou yon \u00F2ganis ki mal (XY) +Set.1=Defini k\u00F2m paran +Remove.1=Retire nan souch yo +Peas.flowerpodposition=Pozisyon fl\u00E8 ak gous +WebSamples.5=Pa kapab jwenn echantiyon, tanpri s\u00E8vi ak Fichye Ouvri (File>Open) pou telechaje egz\u00E8sis ki nan disk lokal la. +WebSamples.4=/resources/star.mit.edu/genetics/problemsets/samples_body_ht.html +WebSamples.3=StarGenetics ap di w "On\u00E8\!" +PunnettSquareModel4.0=Tanpri, chwazi tou l\u00E8 4 jenotip paran yo dab\u00F2,
\\n +WebSamples.2=http\://star.mit.edu/genetics/problemsets/samples_body_ht.html +WebSamples.1=Pa gen koneksyon ent\u00E8n\u00E8t disponib. Pa ka ouvri sit ekst\u00E8n (URL) +WebSamples.0=Lekti {0} +Save.8=Fichye a pa Kons\u00E8ve, eseye operasyon Kons\u00E8ve a ank\u00F2 +Save.6=Fichye a deja egziste. \u00C8ske ou s\u00E8ten ou vle ranplase l? +Save.5=\u00C8ske ou s\u00E8ten ou vle ranplase fichye '{0}'? +VisualizerFactoryImpl.1=Tip vizyaliz\u00E8 ki afiche anba etik\u00E8t "Kote kwazman yo ap f\u00E8t" pa k\u00F2r\u00E8k ({0}) +Fly.wingvein=Venn z\u00E8l +Save.2=Tip fichye pou StarGenetics (.sg1) +Save.1=Kons\u00E8ve +Save.0=Kons\u00E8ve +DiscardExperiment.9=Pa elimine +DiscardExperiment.8=Elimine +Smiley.1=m\: +DiscardExperiment.6=Pa mande m ank\u00F2 +DiscardExperiment.4=Eske ou s\u00E8ten ou vle elimine esperimantasyon an {0}? +DiscardExperiment.3=Elimine esperimantasyon an {0} +DiscardExperiment.2=Elimine esperimantasyon sa a +DiscardExperiment.1=Elimine esperimantasyon sa a epi k\u00F2manse yon l\u00F2t +DiscardExperiment.0=Elimine +Helper.9=Ou gen chanjman ki poko kons\u00E8ve. \u00C8ske ou vle Kons\u00E8ve esperimantasyon an? Chwazi 'Wi' pou Kons\u00E8ve chanjman yo. Chwazi 'Non' pou kontinye. +Export.4=Eksp\u00F2te +RenameCrate.2=Bay esperimantasyon an yon l\u00F2t non +RenameCrate.1=Tanri, bay esperimantasyon yon l\u00F2t non +Peas.peacolor=Koul\u00E8 pwa +Export.2=Eksp\u00F2te fichye Excel +RenameCrate.0=Bay yon l\u00F2t non +GroupBy.45=TOTAL +Helper.5=done an pa valid, f\u00F2 gen omwen yon siy '\=' +Export.0=Kons\u00E8ve rap\u00F2 a nan yon fichye Excel +Helper.0=Done a pa valid\: {0} ki se yon pati nan {1} +Quit.0=Kite +Helper.20=Adr\u00E8s URI pa valid, fichye a pa ka ouvri. +PunnettSquare4.5=

Echikye Punnett di-ibrid ki asosye ak s\u00E8ks

+PunnettSquare4.4=Echikye Punnett di-ibrid ki asosye ak s\u00E8ks +PunnettSquare4.3=Jenotip paran 2\: +PunnettSquare4.2=Jenotip paran 1\: +PunnettSquare4.1=Frekans Jenotip\: +PunnettSquare4.0=F\u00E8men +QuitDialog.9=
Ank\u00E8t sa a ap pran mwens pase 2 minit pou konplete l.
K\u00F2mant\u00E8 w sou lojisy\u00E8l sa a ap ede anpil pou amelyore li.
+QuitDialog.7=M\u00E8si pout\u00E8t ou s\u00E8vi ak StarGenetics +Fly.matings=Kwazman yo +QuitDialog.4=Reponn kesyon\u00E8 +QuitDialog.3=M\u00E8si pou patisipasyon w\\\! Yon nouvo navigat\u00E8 web pral ouvri. +Helper.18=Adr\u00E8s URI {0} pa valid, li pa ka ouvri. +QuitDialog.2=Pa kite sa +HideCrate.2=Elimine esperimantasyon an +QuitDialog.1=Kite sa +Helper.16=Fichye {0} a pa lizib. +HideCrate.1=\u00C8ske ou s\u00E8ten ou vle elimine esperimantasyon sa a? +QuitDialog.0=http\://www.surveymonkey.com/s/PQXLJWB +HideCrate.0=Elimine +Helper.14=Fichye {0} pa egziste. +Helper.10=Kons\u00E8ve fichye? +Add.1=Ajoute sou souch +CloseButton.1=Montre +CloseButton.0=Kache +Fly.aristae=Long\u00E8 ant\u00E8n +GroupBy.23=Deskripsyon fenotip +GroupBy.22=Afiche +GroupBy.21=Kache +Crate.10=mitan, agrandi x, agrandi y +MatingExperiment.2=Bay esperimantasyon an yon l\u00F2t non +MatingExperiment.1=Tanpri, bay esperimantasyon an yon l\u00F2t non +MatingExperiment.0=Esperimantasyon w ap f\u00E8 kounyea +MatingEngineImpl_MAT.0=Mapping order should be in range 0-3 +RenameExperiment.2=Tanpri, bay esperimantasyon an yon l\u00F2t non +RenameExperiment.1=Tanpri, bay esperimantasyon an yon l\u00F2t non. +AddMoreMatingsDialog.7={0} a pa valab; se {1} ki valab +RenameExperiment.0=Bay yon l\u00F2t non +AddMoreMatingsDialog.5=Anile +AddMoreMatingsDialog.3=Aplike +CreatureImpl.0=\u00D2ganis "{0}" \u00D2ganis "{1}" jenotip {2} steril {3} kwazman {4} +OrganismList.2=Konfime ou vle elimine +ParentsListUnisex.3=Konfime ou vle elimine +OrganismList.1=\u00C8ske ou s\u00E8ten ou vle efase {0}? +History.6=Tip esperimantasyon nou pa konnen\: {0} +ParentsListUnisex.2=\u00C8ske ou s\u00E8ten ou vle efase {0}? +OrganismList.0=\u00D2ganis la deja nan lis la. +History.5=resources/GettingStartedYeast.html +ParentsListUnisex.1=Si ou vle kwaze diferan \u00F2ganis, k\u00F2manse yon nouvo esperimantasyon oubyen efase l. +History.4=resources/GettingStarted.html +ParentsListUnisex.0=Pou k\u00F2manse kwaze diferan paran, klike sou "Nouvo esperimantasyon" oubyen "Elimine esperimantasyon". +History.3=Tip esperimantasyon nou pa konnen\: {0} +History.1=Ouvri nan yon l\u00F2t fen\u00E8t +History.0=Kons\u00E8ve esperimantasyon an +Experiment.2=Bay esperimantasyon an yon l\u00F2t non +Experiment.1=Tanpri, bay esperimantasyon an yon l\u00F2t non +Experiment.0=Esperimantasyon w ap f\u00E8 kounyea +ExportAsSGZ.9=Fichye {0} kripte nan nouvo fichye {1}.
W ap jwenn li nan menm dosye kote fichye XLS ou a ye. Men, l ap gen ekstansyon SGZ. +ExportAsSGZ.6=Eskelt\u00E8t fichye Excel (.xls) pou StarGenetics +ExportAsSGZ.4=Chwazi ki fichye XLS ou pral kripte +ExportAsSGZ.3=Chwazi +ExportAsSGZ.2=Kodaj XLS a SGZ +ExportAsSGZ.1=

Kodaj XLS->SGZ

Tanpri chwazi fichye Excel (XLS) ou vle kripte a. +Screenshot.10=Foto ekran an +ExportAsSGZ.0=Kript\u00E8 SGZ +Fly.bodycolor=Koul\u00E8 k\u00F2 +SetAsParent.0=Defini k\u00F2m yon paran +ParentsList.4=Konfime ou vle elimine +ParentsList.3=\u00C8ske ou s\u00E8ten ou vle efase {0}? +ParentsList.2=Si ou vle kwaze diferan \u00F2ganis, k\u00F2manse yon nouvo esperimantasyon oubyen elimine l. +ParentsList.1=Ranplase yon paran? +ParentsList.0=\u00C8ske ou vle chanje youn nan paran {0} yo? +GroupByGel.8=Kache +MatingPanel.63=Esperimantasyon sa a deja disponib\: kouch\: {0}, sip\u00F2 kilti\: {1}. \\n +GroupByGel.7=Afiche +MatingPanel.62=Okenn +GroupByGel.6=Deskripsyon fenotip +MatingPanel.61=N ap eseye kwaze 2 \u00F2ganis ki gen menm s\u00E8ks. \\n +GroupByGel.5=Fenotip +MatingPanel.60=Plak pou replik +GroupByGel.4={0} ({1}%) +GroupByGel.3=TOTAL +GroupByGel.2=Mal +GroupByGel.1=Fem\u00E8l +ReplicaPanel.20=Souch sa a nan lis la deja +ErrorDialogHandler.4={0}
Tanpri, voye yon rap\u00F2 sou pwobl\u00E8m sa a bay pwogram\u00E8 yo.
\u00C8ske ou ta renmen voye yon rap\u00F2 sou pwobl\u00E8m sa a bay pwogram\u00E8 yo ? +MyDropTarget.1=
Depoze souch la la a +GroupByGel.0=resources/SummaryTabEmpty_ht.html +Peas.podshape=F\u00F2m gous +ErrorDialogHandler.3= Lojsy\u00E8l la rap\u00F2te yon pwobl\u00E8m ki an rap\u00F2 ak fichye ki telechaje a oswa ak adr\u00E8s URL yon sit ent\u00E8n\u00E8t ki pa ka ouvri.
Si pwobl\u00E8m sa a kontinye apre ou telechaje fichye sa a ank\u00F2, ou ta dwe enf\u00F2me pwogram\u00E8 yo.

Lojisy\u00E8l la rap\u00F2te pwobl\u00E8m sa a\:
{0}

Tanpri, voye yon rap\u00F2 soupwobl\u00E8m sa a bay pwogram\u00E8 yo.
\u00C8ske ou ta renmen voye yon rap\u00F2 sou pwobl\u00E8m sa a bay pwogram\u00E8 yo ? +ErrorDialogHandler.2=Non +ErrorDialogHandler.1=Wi +ErrorDialogHandler.0=Gen yon er\u00E8 ki f\u00E8t +LanguageSelector.6=Konfime chanjman lang +Feedback.0=Voye di nou sa w panse +LanguageSelector.5=\u00C8ske ou vle re-demare lojisy\u00E8l la an {0}? +WebSamples.19=F\u00E8men +PunnettSquare3.5=

Echikye Punnett mono-ibrid pou yon j\u00E8n ki lye ak s\u00E8ks.

+PunnettSquare3.4=Echikye Punnett mono-ibrid pou yon j\u00E8n ki lye ak s\u00E8ks\: +PunnettSquare3.3=Jenotip paran 2\: +PunnettSquare3.2=Jenotip paran 1\: +LanguageSelector.0=Chwazi ki lang +PunnettSquare3.1=Frekans jenotip\: +PunnettSquare3.0=F\u00E8men +MatingPanel.59= 
Epi plak pou replik sou\:
+MatingPanel.58=Okenn +MatingPanel.56= 
Plak sou kouch\:
+ReplicaPanel.19=Esperimantasyon sa a deja disponib, kouch {0} sip\u00F2 kilti\: {1}. \\n +MatingPanel.55=Kondisyon plakaj\: +ReplicaPanel.18=Okenn +MatingPanel.54=Esperimantasyon {0} sa a deja disponib.\\n +ReplicaPanel.17=N ap eseye kwaze 2 \u00F2ganis ki gen menm tip s\u00E8ksy\u00E8l. \\n +MatingPanel.53=Plak pou replik +ReplicaPanel.16=Plak pou replik +MatingPanel.52=Plak pou replik
Kondisyon

Sip\u00F2 kilti ("medya") +ReplicaPanel.15= 
Epi plak pou replik sou\:
+ReplicaPanel.14=Okenn +MatingPanel.50=... +ReplicaPanel.12= 
Plak sou kouch\:
+ReplicaPanel.11=Elimine +ReplicaPanel.10=Elimine +Load.53=Egz\u00E8sis StarGenetics la a p ap mache si ou pa mete enf\u00F2masyon nou f\u00E8k mande w la. Tanpri, eseye ank\u00F2. +Load.52=Tanpri, tape adr\u00E8s imel ou pou nou ka prepare yon v\u00E8syon egz\u00E8sis sa a espesyalman pou wou. +Properties.1=Pa gen \u00F2ganis ki chwazi +Properties.0=Karakteristik +RemoveOrganism.0=Retire nan souch yo +MatingPanel.44= +MatingPanel.43=
Rezime sou tip tetrad
pa aplikab +MatingPanel.42=\\u00A0 +MatingPanel.41=Tip tetrad +YeastProgenyLabel.22=Kouch la t\u00E8lman pouse, li kouvri tout l\u00F2t bagay +MatingPanel.40=Kantite +YeastProgenyLabel.21=\\ -- \u00F2ganis la nil. +PropertiesPanel.7=S\u00E8ks +PropertiesPanel.6=N\u00F2t +PropertiesPanel.5=Non +PropertiesPanel.4=Bay \u00F2ganis la yon l\u00F2t non +PropertiesPanel.3=Bay souch la yon l\u00F2t non +Load.46=Gwos\u00E8 fichye a se 0, eseye telechaje l ank\u00F2. Oubyen tache fichye nan yon imel pou voye l bay star@mit.edu. +GelVisual.5=\\ \\ Esperim. +InputOutput.16=Pitit +GelVisual.3=Paran +GelVisual.2=Paran +InputOutput.14=Paran +InputOutput.13=\\ (kache) +GelVisual.1=Ech\u00E8l +InputOutput.12=\\u00A0 +MatingPanel.39=\\u00A0 +Fly.sterile=Esteril +InputOutput.10=Esperimantasyon +MatingPanel.38=tip tetrad +MatingPanel.37=Kantite +MatingPanel.36=Afiche rezime +MatingPanel.35=
Afiche tetrad endividy\u00E8l
+MatingPanel.34=\\u00A0 +FileList.32=Fichye {0} a nan lis la deja +MatingPanel.33= 
Tetrad +FileList.31=Tip fichye StarGenetics (.xls) +MatingPanel.31=Elimine +MatingPanel.30=Elimine +YeastProgenyLabel.10=Kouch la t\u00E8lman pouse, li kouvri tout l\u00F2t bagay +Load.39=Gen done ki pa valid nan ranje {0}. Gen omwen youn nan kol\u00F2n yo ki manke done. +Load.38=Ranje anl\u00E8 n\u00E8t la (ki pou gen tit kol\u00F2n yo) pa la +Load.37=Non {0} j\u00E8n ki double sou kwomoz\u00F2m {2} nan ranje {1} +Load.36=Kantite al\u00E8l yo pa valid nan ranje {0} epi kol\u00F2n {1}\: {2} +Load.34=Nou pa konnen tip seksy\u00E8l sa a +Load.33=J\u00E8n {0} ({1}) ki anba etik\u00E8t "\u00D2ganis ki pou kwaze" pa te resevwa yon bon definisyon nan etik\u00E8t "J\u00E8n & al\u00E8l" +Load.32=\u00D2ganis {1} anba etik\u00E8t "\u00D2ganis ki pou kwaze" resevwa yon move kod pou yon j\u00E8n ki otomal {0}. Yon j\u00E8n ki otosomal dwe gen 2 al\u00E8l. +Peas.plantheight=Wot\u00E8 plant +Fly.eyecolor=Koul\u00E8 zye +DiploidAllelesImpl.0=F\u00F2k gen 1 ou 2 al\u00E8l pou konstwi ansanm diployid +MatingPanel.29=2 souch sa yo pa ka kwaze +MatingPanel.28=Sit kwazman +FileList.26=Fichye {0} has been created. +MatingPanel.26= 
Sit kwazman +MatingPanel.24=Mete kont\u00E8 yo sou 0 +FileList.22=fichye SGZ +MatingPanel.22=Total +FileList.20=F\u00E8men +Tools.1=Zouti +Tools.0=Bwat pou k\u00F2mant\u00E8 +Load.29=Nou pa konnen tip seksy\u00E8l sa a +Fly.lethal=M\u00F2t\u00E8l +Load.28=Kwomoz\u00F2m Y yo pa konsistan. \u00D2ganis\: {0} +Load.27=\u00D2ganis {0} anba etik\u00E8t "\u00D2ganis ki pou kwaze" resevwa yon move kod pou yon j\u00E8n ki lye ak s\u00E8ks. Si yon j\u00E8n gen yon lyezon-X, f\u00F2k se 2 al\u00E8l ki afiche pou yon \u00F2ganis ki fem\u00E8l (XX) +SillyParentLabel.1=Depoze
la a pou f\u00E8
kwazman. +MainPanel.10=Gen er\u00E8 ki par\u00E8t l\u00E8 n ap ouvri yon dokiman StarGenetics. +ExportAsSGZ.11=Fichye Excel la pa valid, eseye ouvri l epi teste l anvan ou eseye kripte li. +Load.25=\u00D2ganis {0} anba etik\u00E8t "\u00D2ganis ki pral kwaze" resevwa yon move kod pou yon j\u00E8n ki lye ak s\u00E8ks. Si yon j\u00E8n gen yon lyezon-X, f\u00F2k se yon grenn al\u00E8l ki afiche pou yon \u00F2ganis ki mal (XY) +ExportAsSGZ.10=Pa jwenn fichye +Load.22=Gen done ki pa valid nan ranje {0}. Gen omwen youn nan kol\u00F2n yo ki manke done. +FileList.19=Eksp\u00F2te k\u00F2m SGZ +FileList.18=Ajoute fichye +MatingPanel.19=TT +MatingPanel.18=TT +FileList.16={0} +MatingPanel.17=PD +ParentsListModelImplUnisex.1=
Donat\u00E8
Esp\u00E8m
+MatingPanel.16=PD +ParentsListModelImplUnisex.0=
Donat\u00E8
Ovil
+FileList.14=Analiz la echwe +MatingPanel.15=NPD +FileList.13={0} +MatingPanel.14=NPD +MatingPanel.13=\\u00A0 +GettingStarted.2=N ap k\u00F2manse +PunnettSquareModel2.0=Tanpri, chwazi tou l\u00E8 4 jenotip paran yo dab\u00F2,
\\n +MatingPanel.12=NPD +GettingStarted.1=resources/GettingStartedInHelp_ht.html +FileList.10=Non \u00F2ganis yo\: +MatingPanel.11=NPD +GettingStarted.0=N ap k\u00F2manse +MatingPanel.10=TT +Load.19=Paj {0} manke kol\u00F2n. Kol\u00F2n obligatwa yo se\: {1}, {2}, {3}, {4} +Load.18=Paj {0} manke kol\u00F2n. Kol\u00F2n obligatwa yo se\: {1}, {2}, {3}, {4} +Load.17=XLS dwe gen paj sa yo\: {0}, {1} ak {2}. +NewReplicationExperiment.0=Esperimantasyon san tetrad +Main.2=Ou vle kite sa? +Main.1=Ou gen chanjman ki poko kons\u00E8ve. \u00C8ske ou vle kite sa? +RuleImpl.2=Pa ka jwenn kwomoz\u00F2m pou r\u00E8g ki an konsiderasyon {0}. +RuleImpl.1=makeChromosomeRule pa mache pou al\u00E8l {0} nan r\u00E8g {1} +Mate.6=

Tanpri, ret tann\\u2026

+Mate.5=Tanpri, ret tann\\u2026 +Mate.4=Ajoute plis kwazman +Mate.3=Konbyen kwazman ou vle realize? +Mate.2=Ajoute plis kwazman +Mate.0=Kwaze +RecentDocuments.13=Pa ka ouvri +RecentDocuments.12=Pa ka efase lis dokiman resan +RecentDocuments.11=Efase lis dokiman resan +Open.6=\ Fichye sa a pa egziste\: +ModelSaver.7=Fichye a pa Kons\u00E8ve. Eseye operasyon KONS\u00C8VE a ank\u00F2 +Open.4=Tip fichye StarGenetics (.sg1, .xls, .sgz) +ModelSaver.6=Kons\u00E8ve +ModelSaver.5=Fichye a deka egziste. Ou s\u00E8ten ou vle ranplase l? +New.0=Nouvo +ModelSaver.4=\u00C8ske ou s\u00E8ten ou vle ranplase fichye '{0}'? +Open.0=Ouvri +ModelSaver.1=Tip fichye pou StarGenetics (.sg1) +MainFrame.0=/resources/StarGenetics.png +PunnettSquare2.5=

Echikye Punnett di-ibrid

+PunnettSquare2.4=Echikye Punnett di-ibrid +PunnettSquare2.3=Jenotip paran 2\: +PunnettSquare2.2=Jenotip paran 1\: +PunnettSquare2.1=Frekans jenotip\: +Peas.peashape=F\u00F2m paw +PunnettSquare2.0=F\u00E8men +PunnettSquareButton.0=Echikye Punnett +Crate.9=Rezime mak\u00E8 ADN +Crate.8=Rezime tr\u00E8 +Crate.7=Rezime +Crate.6=Ann \u00F2d +Crate.5=Endividy\u00E8l +ExportAsSGZMulti.0=Kript\u00E8 SGZ - Plizy\u00E8 egz\u00E8sis +DiscardCrate.3=Elimine esperimantasyon an +DiscardCrate.2=\u00C8ske ou s\u00E8ten ou vle elimine esperimantasyon sa a? +DiscardCrate.1=Elimine esperimantasyon sa a epi k\u00F2manse yon l\u00F2t +JGel.0=Rezime referans +DiscardCrate.0=Elimine +NewExperiment.1=Kons\u00E8ve esperimantasyon sa a epi k\u00F2manse yon nouvo +Load2.0=\\ - pa gen mesaj lokalize +NewExperiment.0=F\u00E8 yon l\u00F2t esperimantasyon +PunnettSquare.5=

Echikye Punnett mono-ibrid\:

+PunnettSquare.4=Echikye Punnett mono-ibrid\: +PunnettSquare.3=Jenotip paran 2\: +PunnettSquare.2=Jenotip paran 1\: +PunnettSquare.1=Frekans jenotip\: +PunnettSquare.0=F\u00E8men +NewMatingExperiment.0=Esperimantasyon tetrad +AboutBox.8=V\u00E8syon sist\u00E8m esplwatasyon\: +Load2.28=Gen done ki pa valid nan ranje {0}, omwen youn nan kol\u00F2n yo manke done. +AboutBox.6=\\ ki soti nan +Load2.26=Pa ka jwenn ranje ant\u00E8t pou paj "{0}" +AboutBox.4=V\u00E8syon Java\: +Load2.25=Non {0} j\u00E8n ki double sou kwomoz\u00F2m {2} nan ranje {1} +AboutBox.3=Voye er\u00E8 yo bay\: star@mit.edu +Load2.24=Gen done ki pa valid nan ranje {0}, omwen youn nan kol\u00F2n yo manke done. +FileList.8=Tip s\u00E8ks\: {0} +AboutBox.2=V\u00E8syon\: +AboutBox.1=Sit ent\u00E8n\u00E8t\: http\://star.mit.edu/genetics/ +FileList.6=Analiz\: OK +AboutBox.0=StarGenetics +Load2.20=Pa ka jwenn ranje ant\u00E8t pou paj "{0}" +FileList.4=Retire nan lis la +FileList.2=Trajektwa\: {0} +PunnettSquareDialog.3=Ki asosye ak s\u00E8ks +PunnettSquareDialog.2=Di-ibrid +PunnettSquareDialog.1=Mono-ibrid +PunnettSquareDialog.0=Echikye Punnett +AboutBox.14=Ki sa sa ye +GelFilter.8=Anile +GelFilter.7=Pa montre okenn +GelFilter.6=Aplike +GelFilter.5=Chwazi mak\u00E8 ADN ki pou afiche +GelFilter.4=Chanje seleksyon +GelFilter.3=Okenn +Load2.18=Pa ka jwenn al\u00E8l "{1}" pou paj "{0}" +GelFilter.1=Pa gen j\u00E8l ki seleksyone +GelFilter.0=Chwazi mak\u00E8 ADN ki pou afiche\: +InputOutput.9=Esperimantasyon ki elimine +InputOutput.8=Esperimantasyon ki Kons\u00E8ve +Load2.15=Pa ka jwenn ranje ant\u00E8t pou paj "{0}" +InputOutput.7=Kantite +Load2.14=Pa ka jwenn {0}. +InputOutput.6=S\u00E8ks +InputOutput.5=Non +Load2.12=Gen done ki pa valid nan ranje {0}, omwen youn nan kol\u00F2n yo manke done. +InputOutput.4=Paran oswa desandan? +Load2.10=Paj "{0}" manke ranje ki pou anl\u00E8 n\u00E8t la (sa ki pou gen tit kol\u00F2n yo) +InputOutput.2=Non fichye a se\: {0} adr\u00E8s URL la se\: {1} +InputOutput.1=Pa espesifye +InputOutput.0=Esperimantasyon +Fly.3=esteril +Fly.2=m\: +Parents.0=Sit kwazman +YeastParents.0=Diployid +Options.1=Afiche bwat dyal\u00F2g ki pou chwazi opsyon yo\\u2026 +Options.0=Chwa +Sporulate.8=Analize plis tetrad +Sporulate.7=Konbyen tetrad anplis? +Sporulate.4=Analize plis tetrad +Sporulate.3=Konbyen tetrad anplis? +PropertiesPanel.24=Non +MatingPanel.9=TT +Sporulate.2=Ajoute plis tetrad +ReplicaExperimentAddAll.1=Ajoute tout souch soti nan bwat souch ale nan seksyon esperimantasyon +PropertiesPanel.23=Tanpri, bay souch la yon l\u00F2t non +MatingPanel.8=PD +Sporulate.1=F\u00E8 kwazman & devlope esp\u00F2 +ReplicaExperimentAddAll.0=Ajoute tout souch yo +PropertiesPanel.22=Tanpri, bay souch la yon l\u00F2t non +MatingPanel.7=PD +Sporulate.0=F\u00E8 kwazman & devlope esp\u00F2 +MatingPanel.6=NPD +MatingPanel.5=TT +MatingPanel.4=PD +MatingPanel.3=Plak pou replik\: +MatingPanel.2=Plak pou replik\: +MatingPanel.1=Tanpri, rete tann. N ap kreye imaj pou +MatingPanel.0=Mesaj +Peas.podcolor=Koul\u00E8 gous +About.1=Kisa StarGenetics ye +About.0=Ki sa sa ye +PropertiesPanel.12=Imaj +PropertiesPanel.10=N\u00F2t +PunnettSqaure.0=Echikye Punnett +ChooseExperiment.5=Pou esperimantasyon sou kwazman ak plak replik ki PA s\u00E8vi ak tetrad +ChooseExperiment.0=Chwazi konfigirasyon eksperimantal +CrateModelImpl.0=Esp {0} +Sex.10=Nou pa konnen tip seksy\u00E8l sa a +Fly.wingsize=Gwos\u00E8 z\u00E8l +MatingEngineImpl_Common.4=Paran yo pa ka kwaze\\\! +MatingEngineImpl_Common.3=Tout desandan yo mouri\\\! +Fly.sex=S\u00E8ks +MainPanel.9=Nou pa sip\u00F2te kategori vizyaliz\u00E8 sa a. Nou sip\u00F2te kategori\: {0} +Peas.matings=Kwazman yo +MainPanel.6=StarGenetics +ChooseExperiment.10=Pou esperimantasyon sou kwazman ak plak replik ki s\u00E8vi ak tetrad +Screenshot.8=Tanpri, rete tann pandan imaj ekran ap Kons\u00E8ve +Screenshot.7=\ Souple, rete tann\\u2026 +MainPanel.2=StarGenetics +Screenshot.5=Chwazi fakt\u00E8 echantiyon an plis\\n1 - san echantiyon an plis,\\n10 -6 bon pou pibliye sou papye\\n.5 - bon pou pibliye sou sit web\\n +MainPanel.0=

StarGenetics ap di w "On\u00E8\!"


Pou k\u00F2manse\:

 - Klike sou Fichye->Nouvo pou chwazi yon fichye egz\u00E8sis nan lis nou an.

 - Klike sou Fichye->Ouvri pou chwazi fichye StarGenetics .xls ou .sgz pa w. +Screenshot.2=Fichye nan f\u00F2ma PNG (.png) +Screenshot.0=Kons\u00E8ve imaj ki sou ekran an +GroupBy.9=TOUL\u00C8DE +GroupBy.6=resources/SummaryTabEmpty_ht.html diff --git a/src/star/genetics/client/messages_pt.properties b/src/star/genetics/client/messages_pt.properties new file mode 100644 index 0000000..bc1838b --- /dev/null +++ b/src/star/genetics/client/messages_pt.properties @@ -0,0 +1,427 @@ +#pt +#Thu Aug 22 15:14:43 EDT 2013 +GroupBy.4={0} ({1}%) +GroupBy.3=Macho +Cow.0=m\: +GroupBy.2=F\u00EAmea +GroupBy.1=Contagem +GroupBy.0=Fen\u00F3tipos +YeastParentLabel.1=Deixe aqui
para cruzar. +ReplicationExperiment.0=Experi\u00EAncia ativa +Strains.0=Variedades +ReplicaPanel.2=\u2026 +ReplicaPanel.1=Condi\u00E7\u00F5es das l\u00E2minas +ReplicaPanel.0=L\u00E2minas replicadas\: +RecentDocuments.1=Documentos recentes +RecentDocuments.0=Documentos recentes +CommonMenuBar.2=Ajuda +CommonMenuBar.1=Ficheiro +CommonMenuBar.0=Ferramentas +AssociateExtension.3=Associar com as extens\u00F5es sgz e sg1 +Sex.9=Todos os cromossomas X t\u00EAm de possuir um ou dois alelos. Organismo\: {0} +Sex.8=Faltam genes no cromossoma X. Organismo\: {0} +Peas.flowercolor=C\u00F4r das flores +Load.0=O seu c\u00F3digo \u00E9\: {0}. \\n Este c\u00F3digo \u00FAnico para o endere\u00E7o de e-mail fornecido\: {1} \\n Por favor anote esta informa\u00E7\u00E3o. +Sex.7=Todos os cromossomas X t\u00EAm de possuir um ou dois alelos. Organismo\: {0} +Sex.5=Cromossomas Y inconsistentes. Organismo\: {0} +Sex.4=Todos os cromossomas Y n\u00E3o t\u00EAm genes, para ser f\u00EAmea todos os cromossomas X t\u00EAm de possuir dois genes. Organismo\: {0} +Sex.2=Todos os cromossomas Y t\u00EAm um gene, para ser macho todos os cromossomas X tem de possuir um gene tamb\u00E9m. Organismo\: {0} +Set.1=Definir como progenitor +Remove.1=Remover das variedades +Peas.flowerpodposition=Disposi\u00E7\u00E3o das flores +WebSamples.5=N\u00E3o \u00E9 poss\u00EDvel aceder \u00E0s amostras, por favor use Ficheiro->Abrir para carregar exerc\u00EDcios do disco local. +WebSamples.3=Bem vindo \u00E0 StarGenetics +PunnettSquareModel4.0=Por favor escolha primeiro todos os 4 gen\u00F3tipos dos progenitores. +WebSamples.1=Liga\u00E7\u00E3o \u00E0 internet indispon\u00EDvel. N\u00E3o \u00E9 poss\u00EDvel abrir o endere\u00E7o. +WebSamples.0=A ler {0} +Save.8=O ficheiro n\u00E3o foi guardado, por favor tente gravar novamente +Save.6=Ficheiro existente, substituir? +Save.5=Tem a certeza que pretende substituir o ficheiro '{0}'? +VisualizerFactoryImpl.1=Imposs\u00EDvel instanciar o visualizador. ({0}) +Fly.wingvein=Veio da asa +Save.2=Tipo de ficheiro StarGenetics (.sg1) +Save.1=Guardar +Save.0=Guardar +DiscardExperiment.9=Cancelar +DiscardExperiment.8=Eliminar +Smiley.1=m\: +DiscardExperiment.6=N\u00E3o voltar a perguntar +DiscardExperiment.4=Tem a certeza que pretende eliminar a experi\u00EAncia? {0}? +DiscardExperiment.3=Eliminar experi\u00EAncia {0} +DiscardExperiment.2=Eliminar esta experi\u00EAncia +DiscardExperiment.1=Eliminar esta experi\u00EAncia e come\u00E7ar uma nova +DiscardExperiment.0=Eliminar +Helper.9=Tem altera\u00E7\u00F5es por guardar. Gostaria de guardar a experi\u00EAncia? Prima 'Sim' para guardar. Prima 'N\u00E3o' para continuar. +Export.4=Exportar +RenameCrate.2=Mudar o nome \u00E0 experi\u00EAncia +RenameCrate.1=Por favor introduza um novo nome para a experi\u00EAncia +Peas.peacolor=C\u00F4r da ervilha +Export.2=Exportar ficheiro de Excel +RenameCrate.0=Mudar o nome +GroupBy.45=TOTAL +Helper.5=Valor inv\u00E1lido, tem de conter pelo menos um sinal de "\=" +Export.0=Guardar como um ficheiro de Excel +Helper.0=Valor inv\u00E1lido\: {0} como parte de {1} +Quit.0=Sair +Helper.20=URI inv\u00E1lido, n\u00E3o \u00E9 poss\u00EDvel abrir o ficheiro. +PunnettSquare4.5=Quadro de cruzamento de diibridismo ligado ao sexo +PunnettSquare4.4=Quadro de cruzamento de diibridismo ligado ao sexo +PunnettSquare4.3=Gen\u00F3tipo do progenitor 2\: +PunnettSquare4.2=Gen\u00F3tipo do progenitor 1\: +PunnettSquare4.1=Frequ\u00EAncia do gen\u00F3tipo\: +PunnettSquare4.0=Fechar +QuitDialog.9=
Este question\u00E1rio demora menos de 2 minutos a responder.
As suas opini\u00F5es acerca deste software s\u00E3o muito importantes para melhorar a usabilidade na sala de aula.
+QuitDialog.7=Obrigado por utilizar o StarGenetics +Fly.matings=Cruzamentos +QuitDialog.4=Fazer question\u00E1rio +QuitDialog.3=Obrigado pela sua participa\u00E7\u00E3o\! Ser\u00E1 aberta uma nova janela do navegador de internet. +Helper.18=URI {0} inv\u00E1lido, n\u00E3o \u00E9 poss\u00EDvel abrir. +QuitDialog.2=Cancelar +HideCrate.2=Eliminar a experi\u00EAncia +QuitDialog.1=Sair +Helper.16=N\u00E3o \u00E9 poss\u00EDvel ler o ficheiro {0} +HideCrate.1=Tem a certeza que pretende eliminar a experi\u00EAncia? +QuitDialog.0=http\://www.surveymonkey.com/s/GSJ3XDV +HideCrate.0=Eliminar +Helper.14=O ficheiro {0} n\u00E3o existe. +Helper.10=Guardar o documento? +Add.1=Adicionar \u00E0s variedades +CloseButton.1=Mostrar +CloseButton.0=Ocultar +Fly.aristae=Antena +GroupBy.23=Descri\u00E7\u00E3o do fen\u00F3tipo\: +GroupBy.22=Mostrar +GroupBy.21=Ocultar +Crate.10=centro, crescimentox,crescimentoy +MatingExperiment.2=Mudar o nome \u00E0 experi\u00EAncia +MatingExperiment.1=Por favor introduza um novo nome para a experi\u00EAncia +MatingExperiment.0=Experi\u00EAncia ativa +MatingEngineImpl_MAT.0=A ordem de mapeamento deve estar no intervalo 0-3 +RenameExperiment.2=Mudar o nome \u00E0 experi\u00EAncia +RenameExperiment.1=Por favor introduza um novo nome para a experi\u00EAncia +AddMoreMatingsDialog.7=O valor {0} n\u00E3o \u00E9 v\u00E1lido, o valor v\u00E1lido \u00E9 {1} +RenameExperiment.0=Mudar o nome +AddMoreMatingsDialog.5=Cancelar +AddMoreMatingsDialog.3=Aplicar +CreatureImpl.0=Criatura "{0}" organismo "{1}" composi\u00E7\u00E3o gen\u00E9tica \u00E9 {2} est\u00E9ril {3] cruzamentos {4} +OrganismList.2=Confirme a remo\u00E7\u00E3o +ParentsListUnisex.3=Confirme remover +OrganismList.1=Tem a certeza que pretende eliminar {0}? +History.6=Tipo de experi\u00EAncia desconhecido\: {0} +ParentsListUnisex.2=Tem a certeza que pretende eliminar {0}? +OrganismList.0=O organismo j\u00E1 consta da lista. +History.5=resources/GettingStartedYeast.html +ParentsListUnisex.1=Se pretende cruzar organismos diferentes, comece uma nova experi\u00EAncia ou elimine esta. +History.4=resources/GettingStarted.html +ParentsListUnisex.0=Para iniciar o cruzamento com novos progenitores por favor clique 'Nova experi\u00EAncia' ou 'Eliminar experi\u00EAncia' +History.3=Tipo de experi\u00EAncia desconhecido\: {0} +History.1=Abrir numa nova janela +History.0=Experi\u00EAncias guardadas +Experiment.2=Mudar o nome \u00E0 experi\u00EAncia +Experiment.1=Por favor introduza um novo nome para a experi\u00EAncia +Experiment.0=Experi\u00EAncia ativa +ExportAsSGZ.9=O ficheiro {0} foi encriptado como {1}.
Encontrar\u00E1 o ficheiro na mesma pasta onde est\u00E1 o ficheiro XLS, com a extens\u00E3o SGZ. +ExportAsSGZ.6=Modelo StarGenetics em Excel (.xls) +ExportAsSGZ.4=Escolha o ficheiro XLS a encriptar +ExportAsSGZ.3=Selecionar +ExportAsSGZ.2=Codificador de XLS para SGZ +ExportAsSGZ.1=

Codificador XLS->SGZ

Por favor escolha o ficheiro de Excel (XLS) que pretende encriptar. +Screenshot.10=Captura de ecr\u00E3 +ExportAsSGZ.0=Encriptador SGZ +Fly.bodycolor=C\u00F4r do corpo +SetAsParent.0=Definir como progenitor +ParentsList.4=Confirme a elimina\u00E7\u00E3o +ParentsList.3=Tem a certeza que pretene eliminar {0}? +ParentsList.2=Se pretende cruzar organismos diferentes, comece uma nova experi\u00EAncia ou substitua esta. +ParentsList.1=Substituir progenitor? +ParentsList.0=Pretende substituir o progenitor {0}? +GroupByGel.8=Ocultar +MatingPanel.63=Esta experi\u00EAncia j\u00E1 est\u00E1 dispon\u00EDvel, camada\: {0} media\: {1}. \\n +GroupByGel.7=Mostrar +MatingPanel.62=Nenhum +GroupByGel.6=Descri\u00E7\u00E3o do fen\u00F3tipo\: +MatingPanel.61=Tentou cruzar dois organismos do mesmo sexo. \\n +GroupByGel.5=Fen\u00F3tipos +MatingPanel.60=L\u00E2mina replicada\: +GroupByGel.4={0} ({1}%) +GroupByGel.3=TOTAL +GroupByGel.2=Macho +GroupByGel.1=F\u00EAmea +ReplicaPanel.20=Variedade j\u00E1 existente na lista. +ErrorDialogHandler.4={0}
Agradeciamos que reportasse este assunto \u00E0 equipa de desenvolvimento.
Gostaria de reportar este problema aos programadores? +MyDropTarget.1=Deixe a variedade aqui +GroupByGel.0=resources/SummaryTabEmpty.html +Peas.podshape=Forma da vagem +ErrorDialogHandler.3= O sistema reportou um problema que normalmente est\u00E1 relacionado com a abertura do programa que foi descarregado ou com a abertura do endere\u00E7o URL.
Se o problema persistir depois de repetir o download do programa, considere reportar o problema aos programadores.

O sistema reportou a seguinte mensagem\:
{0}

Agradeciamos que reportasse este assunto \u00E0 equipa de desenvolvimento.
Gostaria de reportar este problema aos programadores? +ErrorDialogHandler.2=N\u00E3o +ErrorDialogHandler.1=Sim +ErrorDialogHandler.0=Ocorreu uma exce\u00E7\u00E3o +LanguageSelector.6=Confirme a altera\u00E7\u00E3o do idioma +Feedback.0=Enviar sugest\u00F5es +LanguageSelector.5=Gostaria de reiniciar a aplica\u00E7\u00E3o em {0}? +WebSamples.19=Fechar +PunnettSquare3.5=Quadro de cruzamento de monoibridismo ligado ao sexo +PunnettSquare3.4=Quadro de cruzamento de monoibridismo ligado ao sexo +PunnettSquare3.3=Gen\u00F3tipo do progenitor 2\: +PunnettSquare3.2=Gen\u00F3tipo do progenitor 1\: +LanguageSelector.0=Selecione o idioma +PunnettSquare3.1=Frequ\u00EAncia do gen\u00F3tipo\: +PunnettSquare3.0=Fechar +MatingPanel.59= 
E l\u00E2mina replicada em\:
+MatingPanel.58=Nenhum +MatingPanel.56= 
Camada laminar de\:
+ReplicaPanel.19=Esta experi\u00EAncia j\u00E1 est\u00E1 dispon\u00EDvel, camada\: {0} media\: {1}. \\n +MatingPanel.55=Condi\u00E7\u00F5es das l\u00E2minas +ReplicaPanel.18=Nenhum +MatingPanel.54=Experi\u00EAncia {0} j\u00E1 est\u00E1 dispon\u00EDvel. \\n +ReplicaPanel.17=Tentou cruzar dois organismos do mesmo sexo. \\n +MatingPanel.53=L\u00E2mina replicada\: +ReplicaPanel.16=L\u00E2mina replicada\: +MatingPanel.52=Condi\u00E7\u00F5es de replica\u00E7\u00E3o das l\u00E2minas


Media +ReplicaPanel.15= 
E replica\u00E7\u00E3o nas l\u00E2minas em\:
+ReplicaPanel.14=Nenhum +MatingPanel.50=... +ReplicaPanel.12= --,
Camada laminar de\:
+ReplicaPanel.11=Eliminar +ReplicaPanel.10=Eliminar +Load.53=O exerc\u00EDcio do StarGenetics n\u00E3o iniciar\u00E1 a n\u00E3o ser que forne\u00E7a um valor na janela anterior. Por favor tente novamente. +Load.52=Por favor introduza o seu endere\u00E7o de email do MIT para que uma vers\u00E3o \u00FAnica deste exerc\u00EDcio lhe possa ser entregue. +Properties.1=Nenhum organismo selecionado +Properties.0=Propriedades +RemoveOrganism.0=Remover das variedades +MatingPanel.44= +MatingPanel.43=
Resumo do tipo de t\u00E9trada
n\u00E3o aplic\u00E1vel +MatingPanel.41=Tipo de t\u00E9trada +YeastProgenyLabel.22=A camada cresceu, e cobriu tudo\u2026 +MatingPanel.40=Contagem +YeastProgenyLabel.21=\\ \u2013 Sem indiv\u00EDduo +PropertiesPanel.7=Sexo +PropertiesPanel.6=Notas +PropertiesPanel.5=Nome +PropertiesPanel.4=Mudar o nome ao indiv\u00EDduo +PropertiesPanel.3=Mudar o nome \u00E0 variedade +Load.46=O tamanho do ficheiro \u00E9 0, por favor repita o download, ou anexe o ficheiro num email e envie-o para star@mit.edu. +GelVisual.5=\\ \\ Exp +InputOutput.16=Descend\u00EAncia +GelVisual.3=Progenitores +GelVisual.2=Progenitores +InputOutput.14=Progenitor +InputOutput.13=\\ (oculto) +GelVisual.1=Gradua\u00E7\u00E3o +Fly.sterile=Est\u00E9ril +InputOutput.10=Experi\u00EAncia +MatingPanel.38=Tipo de t\u00E9trada +MatingPanel.37=Contagem +MatingPanel.36=Mostrar resumo +MatingPanel.35=Mostrar as t\u00E9tradas individuais +FileList.32=O ficheiro {0} j\u00E1 consta da lista. +MatingPanel.33=T\u00E9tradas +FileList.31=Tipos de ficheiros StarGenetics (.xls) +MatingPanel.31=Eliminar +MatingPanel.30=Eliminar +YeastProgenyLabel.10=A camada cresceu, e cobriu tudo\u2026 +Load.39=Dados inv\u00E1lidos na linha {0}, pelo menos uma das colunas tem dados em falta. +Load.38=Falta a linha de cabe\u00E7alho +Load.37=Nome de gene duplicado {0} no cromossoma {2} na linha {1} +Load.36=H\u00E1 um n\u00FAmero inv\u00E1lido de alelos na linha {0} e na coluna {1}\: {2} +Load.34=Sexo desconhecido +Load.33=O gene {0} no organismo {1} especificado no quadro de "Organismos para cruzamento" n\u00E3o foi corretamente definido na aba "Genes & Alelos". +Load.32=Organismo {1} do quadro de cruzamento est\u00E1 incorretamente codificado para um gene ligado a um autossoma {0}. Devem ser especificados dois alelos para um gene autoss\u00F3mico. +Peas.plantheight=Altura da planta +Fly.eyecolor=C\u00F4r dos olhos +DiploidAllelesImpl.0=Tem de existir 1 ou 2 alelos para construir um conjunto dipl\u00F3ide +MatingPanel.29=Estas duas variedades n\u00E3o podem cruzar-se. +MatingPanel.28=Caixa de cruzamento +FileList.26=O ficheiro {0} foi criado. +MatingPanel.26=Caixa de cruzamento +MatingPanel.24=Limpar contadores +FileList.22=Ficheiro SGZ +MatingPanel.22=Total +FileList.20=Fechar +Tools.1=Ferramentas +Tools.0=Caixa de sugest\u00F5es +Load.29=Sexo desconhecido +Fly.lethal=Letal +Load.28=Cromossomas Y inconsistentes. Organismo\: {0} +Load.27=O Organismo {0} do quadro de cruzamento est\u00E1 incorretamente codificado para um gene ligado ao sexo. Se um gene est\u00E1 ligado a X, ent\u00E3o devem serespecificados dois alelos para um organismo f\u00EAmea (XX). +SillyParentLabel.1=Deixe aqui
para cruzar. +MainPanel.10=Foi detetado um erro ao abrir um documento do StarGenetics +ExportAsSGZ.11=O ficheiro de Excel \u00E9 inv\u00E1lido, tente abrir o ficheiro e teste-o antes de tentar encript\u00E1-lo. +Load.25=O organismo {0} no quadro de cruzamento est\u00E1 incorretamente codificado para um gene ligado ao sexo. Se um gene est\u00E1 ligado a X, ent\u00E3o deve ser especificado um \u00FAnico alelo para um organismo macho (XY). +ExportAsSGZ.10=Ficheiro n\u00E3o encontrado. +Load.22=Dados inv\u00E1lidos na linha {0}, pelo menos uma das colunas tem dados em falta. +FileList.19=Exportar como SGZ +FileList.18=Adicionar ficheiro +MatingPanel.19=TT +MatingPanel.18=TT +FileList.16={0} +MatingPanel.17=PD +MatingPanel.16=PD +ParentsListModelImplUnisex.1=
dador
de esperma
+FileList.14=Parse\: Falhou +MatingPanel.15=NPD +ParentsListModelImplUnisex.0=
dador
de esperma
+FileList.13={0} +MatingPanel.14=NPD +GettingStarted.2=Come\u00E7ar +PunnettSquareModel2.0=Por favor escolha primeiro todos os 4 gen\u00F3tipos dos progenitores. +MatingPanel.12=NPD +GettingStarted.1=resources/GettingStartedInHelp.html +FileList.10=Nomes das criaturas\: +MatingPanel.11=NPD +GettingStarted.0=Come\u00E7ar +MatingPanel.10=TT +Load.19=Faltam colunas na folha {0}, as colunas obrigat\u00F3rias s\u00E3o\: {1}, {2}, {3}, {4} +Load.18=Faltam colunas na folha {0}, as colunas obrigat\u00F3rias s\u00E3o\: {1}, {2}, {3}, {4} +Load.17=O ficheiro XLS tem de conter as seguintes folhas\: {0}, {1} e {2}. +NewReplicationExperiment.0=Experi\u00EAncia sem t\u00E9tradas +Main.2=Pretende sair? +Main.1=Tem altera\u00E7\u00F5es n\u00E3o guardadas, pretente sair? +RuleImpl.2=N\u00E3o \u00E9 poss\u00EDvel determinar o cromossoma para a condi\u00E7\u00E3o {0}. +RuleImpl.1=makeChromosomeRule falhou para o alelo {0} na condi\u00E7\u00E3o {1} +Mate.6=Espere por favor\u2026 +Mate.5=Espere por favor\u2026 +Mate.4=Adicionar cruzamentos +Mate.3=Quantos cruzamentos pretende realizar? +Mate.2=Adicionar cruzamentos +Mate.0=Cruzamento +RecentDocuments.13=Falha ao abrir +RecentDocuments.12=N\u00E3o \u00E9 poss\u00EDvel limpar a lista de documentos +RecentDocuments.11=Limpar a lista de documentos recentes +Open.6=Ficheiro n\u00E3o encontrado. +ModelSaver.7=O ficheiro n\u00E3o foi guardado, por favor tente gravar novamente +Open.4=Tipos de ficheiros StarGenetics (.sg1, .xls, .sgz) +ModelSaver.6=Guardar +ModelSaver.5=Ficheiro existente, substituir? +New.0=Novo +ModelSaver.4=Tem a certeza que pretende substituir o ficheiro '{0}'? +Open.0=Abrir +ModelSaver.1=Ficheiro StarGenetics do tipo (.sg1) +MainFrame.0=/resources/StarGenetics.png +PunnettSquare2.5=Quadro de cruzamento de diibridismo\: +PunnettSquare2.4=Quadro de cruzamento de diibridismo\: +PunnettSquare2.3=Gen\u00F3tipo do progenitor 2\: +PunnettSquare2.2=Gen\u00F3tipo do progenitor 1\: +PunnettSquare2.1=Frequ\u00EAncia do gen\u00F3tipo\: +Peas.peashape=Forma da ervilha +PunnettSquare2.0=Fechar +PunnettSquareButton.0=Quadro de cruzamento +Crate.9=Resumo dos marcadores DNA +Crate.8=Resumo das caracter\u00EDsticas +Crate.7=Sum\u00E1rio +Crate.6=Ordenado +Crate.5=Individual +ExportAsSGZMulti.0=Encriptador SGZ - V\u00E1rios problemas +DiscardCrate.3=Eliminar experi\u00EAncia +DiscardCrate.2=Tem a certeza que pretende eliminar esta experi\u00EAncia? +DiscardCrate.1=Eliminar esta experi\u00EAncia e come\u00E7ar uma nova +JGel.0=Resumo dos marcadores +DiscardCrate.0=Eliminar +NewExperiment.1=Guarde esta experi\u00EAncia e comece uma nova +Load2.0=\\ - mensagem n\u00E3o localizada +NewExperiment.0=Nova experi\u00EAncia +PunnettSquare.5=Quadro de cruzamento de monoibridismo\: +PunnettSquare.4=Quadro de cruzamento de monoibridismo\: +PunnettSquare.3=Gen\u00F3tipo do progenitor 2\: +PunnettSquare.2=Gen\u00F3tipo do progenitor 1\: +PunnettSquare.1=Frequ\u00EAncia do gen\u00F3tipo\: +PunnettSquare.0=Fechar +NewMatingExperiment.0=Experi\u00EAncia de t\u00E9tradas +AboutBox.8=Vers\u00E3o de sistema operativo\: +Load2.28=Dados inv\u00E1lidos na linha {0}, pelo menos uma das colunas tem dados em falta. +AboutBox.6=\\ de +Load2.26=N\u00E3o \u00E9 poss\u00EDvel encontrar a linha de cabe\u00E7alho na folha {0}. +AboutBox.4=Vers\u00E3o Java\: +Load2.25=Nome de gene duplicado {0} no cromossoma {2} na linha {1} +AboutBox.3=Comunique erros a\: star@mit.edu +Load2.24=Dados inv\u00E1lidos na linha {0}, pelo menos uma das colunas tem dados em falta. +FileList.8=Sexo\: {0} +AboutBox.2=Vers\u00E3o da compila\u00E7\u00E3o\: +AboutBox.1=Endere\u00E7o Web\: +FileList.6=Parse\: OK +AboutBox.0=StarGenetics +Load2.20=N\u00E3o \u00E9 poss\u00EDvel encontrar a linha de cabe\u00E7alho na folha {0}. +FileList.4=Remover da lista +FileList.2=Caminho\: {0} +PunnettSquareDialog.3=Ligado ao sexo +PunnettSquareDialog.2=Diibridismo +PunnettSquareDialog.1=Monoibridismo +PunnettSquareDialog.0=Quadro de cruzamento +AboutBox.14=Acerca +GelFilter.8=Cancelar +GelFilter.7=Ocultar todos +GelFilter.6=Aplicar +GelFilter.5=Escolha os marcadores de DNA a serem mostrados\: +GelFilter.4=Alterar a sele\u00E7\u00E3o +GelFilter.3=Nenhum +Load2.18=N\u00E3o \u00E9 poss\u00EDvel encontrar o alelo "{1}" na folha "{0}". +GelFilter.1=Nenhum gel selecionado +GelFilter.0=Escolha os marcadores de DNA a serem mostrados\: +InputOutput.9=Experi\u00EAncias eliminadas +InputOutput.8=Experi\u00EAncias guardadas +Load2.15=N\u00E3o \u00E9 poss\u00EDvel encontrar a linha de cabe\u00E7alho na folha {0}. +InputOutput.7=Contagem +Load2.14=N\u00E3o \u00E9 poss\u00EDvel encontrar {0}. +InputOutput.6=Sexo +InputOutput.5=Nome +Load2.12=Dados inv\u00E1lidos na linha {0}, pelo menos uma das colunas tem dados em falta. +InputOutput.4=Tipo +Load2.10=N\u00E3o \u00E9 poss\u00EDvel encontrar a linha de cabe\u00E7alho na folha {0}. +InputOutput.2=O Ficheiro \u00E9\: {0} o URL \u00E9\: {1} +InputOutput.1=N\u00E3o especificado +InputOutput.0=Experi\u00EAncia +Fly.3=Est\u00E9ril +Fly.2=m\: +Parents.0=Caixa de cruzamento +YeastParents.0=Dipl\u00F3ide +Options.1=Mostrar a caixa de op\u00E7\u00F5es\u2026 +Options.0=Op\u00E7\u00F5es +Sporulate.8=Analisar mais t\u00E9tradas +Sporulate.7=Quantas mais t\u00E9tradas? +Sporulate.4=Analisar mais t\u00E9tradas +Sporulate.3=Quantas mais t\u00E9tradas? +PropertiesPanel.24=Nome +MatingPanel.9=TT +Sporulate.2=Adicionar t\u00E9tradas +ReplicaExperimentAddAll.1=Adicionar todas as variedades \u00E0 experi\u00EAncia +PropertiesPanel.23=Por favor d\u00EA um novo nome \u00E0 variedade +MatingPanel.8=PD +Sporulate.1=Cruzamento e esporula\u00E7\u00E3o +ReplicaExperimentAddAll.0=Adicionar todas as variedades +PropertiesPanel.22=Por favor d\u00EA um novo nome \u00E0 variedade +MatingPanel.7=PD +Sporulate.0=Cruzamento & esporula\u00E7\u00E3o +MatingPanel.6=NPD +MatingPanel.5=TT +MatingPanel.4=PD +MatingPanel.3=L\u00E2minas replicadas\: +MatingPanel.2=L\u00E2minas replicadas\: +MatingPanel.1=Por favor aguarde, a gerar os gr\u00E1ficos para +MatingPanel.0=Mensagem +Peas.podcolor=C\u00F4r da vagem +About.1=Acerca StarGenetics +About.0=Acerca +PropertiesPanel.12=Imagem +PropertiesPanel.10=Notas +PunnettSqaure.0=Quadros de cruzamento +ChooseExperiment.5=Para experi\u00EAncias de cruzamento e replica\u00E7\u00E3o n\u00E3o envolvendo t\u00E9tradas +ChooseExperiment.0=Escolha a configura\u00E7\u00E3o da experi\u00EAncia +CrateModelImpl.0=Exp. {0} +Sex.10=Sexo desconhecido +Fly.wingsize=Tamanho da asa +MatingEngineImpl_Common.4=Progenitores n\u00E3o podem cruzar\\\! +MatingEngineImpl_Common.3=Todos os descendentes morreram\\\! +Fly.sex=Sexo +MainPanel.9=Classe de visualiza\u00E7\u00E3o n\u00E3o suportada, classes suportadas\: {0} +Peas.matings=Cruzamentos +MainPanel.6=StarGenetics +ChooseExperiment.10=Para experi\u00EAncias de cruzamento e replica\u00E7\u00E3o envolvendo t\u00E9tradas +Screenshot.8=Aguarde por favor, a guardar a captura de ecr\u00E3\u2026 +Screenshot.7=Aguarde por favor\u2026 +MainPanel.2=StarGenetics +Screenshot.5=Por favor escolha o fator de oversampling\\n1 - Sem oversampling, \\n10 - bom para publica\u00E7\u00E3o em poster\\n.5 - bom para a publica\u00E7\u00E3o na web\\n +MainPanel.0=

Bem vindo \u00E0 StarGenetics


Para come\u00E7ar\:

 - Clique em Ficheiro->Novo Para escolher um exerc\u00EDcio da nossa lista.

 - Clique em Ficheiro->Abrir Para escolher o seu ficheiro StarGenetics .xls ou .sgz +Screenshot.2=ficheiro PNG (.png) +Screenshot.0=Guardar captura de ecr\u00E3 +GroupBy.9=AMBOS +GroupBy.6=resources/SummaryTabEmpty.html diff --git a/src/star/genetics/client/messages_uk.properties b/src/star/genetics/client/messages_uk.properties new file mode 100644 index 0000000..9625157 --- /dev/null +++ b/src/star/genetics/client/messages_uk.properties @@ -0,0 +1,432 @@ +#uk +#Thu Aug 22 15:14:44 EDT 2013 +GroupBy.4=GroupBy.4 +GroupBy.3=GroupBy.3 +Cow.0=Cow.0 +GroupBy.2=GroupBy.2 +GroupBy.1=GroupBy.1 +GroupBy.0=GroupBy.0 +YeastParentLabel.1=YeastParentLabel.1 +ReplicationExperiment.0=ReplicationExperiment.0 +Strains.0=Strains.0 +ReplicaPanel.2=ReplicaPanel.2 +ReplicaPanel.1=ReplicaPanel.1 +ReplicaPanel.0=ReplicaPanel.0 +RecentDocuments.1=RecentDocuments.1 +RecentDocuments.0=RecentDocuments.0 +CommonMenuBar.2=CommonMenuBar.2 +CommonMenuBar.1=CommonMenuBar.1 +CommonMenuBar.0=CommonMenuBar.0 +AssociateExtension.3=AssociateExtension.3 +Sex.9=Sex.9 +Sex.8=Sex.8 +Peas.flowercolor=Peas.flowercolor +Load.0=Load.0 +Sex.7=Sex.7 +Sex.5=Sex.5 +Sex.4=Sex.4 +Sex.2=Sex.2 +Set.1=Set.1 +Remove.1=Remove.1 +Peas.flowerpodposition=Peas.flowerpodposition +WebSamples.5=WebSamples.5 +WebSamples.3=WebSamples.3 +PunnettSquareModel4.0=PunnettSquareModel4.0 +WebSamples.1=WebSamples.1 +WebSamples.0=WebSamples.0 +Save.8=Save.8 +Save.6=Save.6 +Save.5=Save.5 +VisualizerFactoryImpl.1=VisualizerFactoryImpl.1 +Fly.wingvein=Fly.wingvein +Save.2=Save.2 +Save.1=Save.1 +Save.0=Save.0 +DiscardExperiment.9=DiscardExperiment.9 +DiscardExperiment.8=DiscardExperiment.8 +Smiley.1=Smiley.1 +DiscardExperiment.6=DiscardExperiment.6 +DiscardExperiment.4=DiscardExperiment.4 +DiscardExperiment.3=DiscardExperiment.3 +DiscardExperiment.2=DiscardExperiment.2 +DiscardExperiment.1=DiscardExperiment.1 +DiscardExperiment.0=DiscardExperiment.0 +Helper.9=Helper.9 +Export.4=Export.4 +RenameCrate.2=RenameCrate.2 +RenameCrate.1=RenameCrate.1 +Peas.peacolor=Peas.peacolor +Export.2=Export.2 +RenameCrate.0=RenameCrate.0 +GroupBy.45=GroupBy.45 +Helper.5=Helper.5 +Export.0=Export.0 +Helper.0=Helper.0 +Quit.0=Quit.0 +Helper.20=Helper.20 +PunnettSquare4.5=PunnettSquare4.5 +PunnettSquare4.4=PunnettSquare4.4 +PunnettSquare4.3=PunnettSquare4.3 +PunnettSquare4.2=PunnettSquare4.2 +PunnettSquare4.1=PunnettSquare4.1 +PunnettSquare4.0=PunnettSquare4.0 +QuitDialog.9=QuitDialog.9 +QuitDialog.7=QuitDialog.7 +Fly.matings=Fly.matings +QuitDialog.4=QuitDialog.4 +QuitDialog.3=QuitDialog.3 +Helper.18=Helper.18 +QuitDialog.2=QuitDialog.2 +HideCrate.2=HideCrate.2 +QuitDialog.1=QuitDialog.1 +Helper.16=Helper.16 +HideCrate.1=HideCrate.1 +QuitDialog.0=QuitDialog.0 +HideCrate.0=HideCrate.0 +Helper.14=Helper.14 +Helper.10=Helper.10 +Add.1=Add.1 +CloseButton.1=CloseButton.1 +CloseButton.0=CloseButton.0 +Fly.aristae=Fly.aristae +GroupBy.23=GroupBy.23 +GroupBy.22=GroupBy.22 +GroupBy.21=GroupBy.21 +Crate.10=Crate.10 +MatingExperiment.2=MatingExperiment.2 +MatingExperiment.1=MatingExperiment.1 +MatingExperiment.0=MatingExperiment.0 +MatingEngineImpl_MAT.0=MatingEngineImpl_MAT.0 +RenameExperiment.2=RenameExperiment.2 +RenameExperiment.1=RenameExperiment.1 +AddMoreMatingsDialog.7=AddMoreMatingsDialog.7 +RenameExperiment.0=RenameExperiment.0 +AddMoreMatingsDialog.5=AddMoreMatingsDialog.5 +AddMoreMatingsDialog.3=AddMoreMatingsDialog.3 +CreatureImpl.0=CreatureImpl.0 +OrganismList.2=OrganismList.2 +ParentsListUnisex.3=ParentsListUnisex.3 +OrganismList.1=OrganismList.1 +History.6=History.6 +ParentsListUnisex.2=ParentsListUnisex.2 +OrganismList.0=OrganismList.0 +History.5=History.5 +ParentsListUnisex.1=ParentsListUnisex.1 +History.4=History.4 +ParentsListUnisex.0=ParentsListUnisex.0 +History.3=History.3 +History.1=History.1 +History.0=History.0 +Experiment.2=Experiment.2 +Experiment.1=Experiment.1 +Experiment.0=Experiment.0 +ExportAsSGZ.9=ExportAsSGZ.9 +ExportAsSGZ.6=ExportAsSGZ.6 +ExportAsSGZ.4=ExportAsSGZ.4 +ExportAsSGZ.3=ExportAsSGZ.3 +ExportAsSGZ.2=ExportAsSGZ.2 +ExportAsSGZ.1=ExportAsSGZ.1 +Screenshot.10=Screenshot.10 +ExportAsSGZ.0=ExportAsSGZ.0 +Fly.bodycolor=Fly.bodycolor +SetAsParent.0=SetAsParent.0 +ParentsList.4=ParentsList.4 +ParentsList.3=ParentsList.3 +ParentsList.2=ParentsList.2 +ParentsList.1=ParentsList.1 +ParentsList.0=ParentsList.0 +GroupByGel.8=GroupByGel.8 +MatingPanel.63=MatingPanel.63 +GroupByGel.7=GroupByGel.7 +MatingPanel.62=MatingPanel.62 +GroupByGel.6=GroupByGel.6 +MatingPanel.61=MatingPanel.61 +GroupByGel.5=GroupByGel.5 +MatingPanel.60=MatingPanel.60 +GroupByGel.4=GroupByGel.4 +GroupByGel.3=GroupByGel.3 +GroupByGel.2=GroupByGel.2 +GroupByGel.1=GroupByGel.1 +ReplicaPanel.20=ReplicaPanel.20 +ErrorDialogHandler.4=ErrorDialogHandler.4 +MyDropTarget.1=MyDropTarget.1 +GroupByGel.0=GroupByGel.0 +Peas.podshape=Peas.podshape +ErrorDialogHandler.3=ErrorDialogHandler.3 +ErrorDialogHandler.2=ErrorDialogHandler.2 +ErrorDialogHandler.1=ErrorDialogHandler.1 +ErrorDialogHandler.0=ErrorDialogHandler.0 +LanguageSelector.6=LanguageSelector.6 +Feedback.0=Feedback.0 +LanguageSelector.5=LanguageSelector.5 +WebSamples.19=WebSamples.19 +PunnettSquare3.5=PunnettSquare3.5 +PunnettSquare3.4=PunnettSquare3.4 +PunnettSquare3.3=PunnettSquare3.3 +PunnettSquare3.2=PunnettSquare3.2 +LanguageSelector.0=LanguageSelector.0 +PunnettSquare3.1=PunnettSquare3.1 +PunnettSquare3.0=PunnettSquare3.0 +MatingPanel.59=MatingPanel.59 +MatingPanel.58=MatingPanel.58 +MatingPanel.56=MatingPanel.56 +ReplicaPanel.19=ReplicaPanel.19 +MatingPanel.55=MatingPanel.55 +ReplicaPanel.18=ReplicaPanel.18 +MatingPanel.54=MatingPanel.54 +ReplicaPanel.17=ReplicaPanel.17 +MatingPanel.53=MatingPanel.53 +ReplicaPanel.16=ReplicaPanel.16 +MatingPanel.52=MatingPanel.52 +ReplicaPanel.15=ReplicaPanel.15 +ReplicaPanel.14=ReplicaPanel.14 +MatingPanel.50=MatingPanel.50 +ReplicaPanel.12=ReplicaPanel.12 +ReplicaPanel.11=ReplicaPanel.11 +ReplicaPanel.10=ReplicaPanel.10 +Load.53=Load.53 +Load.52=Load.52 +Properties.1=Properties.1 +Properties.0=Properties.0 +RemoveOrganism.0=RemoveOrganism.0 +MatingPanel.44=MatingPanel.44 +MatingPanel.43=MatingPanel.43 +MatingPanel.42=MatingPanel.42 +MatingPanel.41=MatingPanel.41 +YeastProgenyLabel.22=YeastProgenyLabel.22 +MatingPanel.40=MatingPanel.40 +YeastProgenyLabel.21=YeastProgenyLabel.21 +PropertiesPanel.7=PropertiesPanel.7 +PropertiesPanel.6=PropertiesPanel.6 +PropertiesPanel.5=PropertiesPanel.5 +PropertiesPanel.4=PropertiesPanel.4 +PropertiesPanel.3=PropertiesPanel.3 +Load.46=Load.46 +GelVisual.5=GelVisual.5 +InputOutput.16=InputOutput.16 +GelVisual.3=GelVisual.3 +GelVisual.2=GelVisual.2 +InputOutput.14=InputOutput.14 +InputOutput.13=InputOutput.13 +GelVisual.1=GelVisual.1 +InputOutput.12=InputOutput.12 +MatingPanel.39=MatingPanel.39 +Fly.sterile=Fly.sterile +InputOutput.10=InputOutput.10 +MatingPanel.38=MatingPanel.38 +MatingPanel.37=MatingPanel.37 +MatingPanel.36=MatingPanel.36 +MatingPanel.35=MatingPanel.35 +MatingPanel.34=MatingPanel.34 +FileList.32=FileList.32 +MatingPanel.33=MatingPanel.33 +FileList.31=FileList.31 +MatingPanel.31=MatingPanel.31 +MatingPanel.30=MatingPanel.30 +YeastProgenyLabel.10=YeastProgenyLabel.10 +Load.39=Load.39 +Load.38=Load.38 +Load.37=Load.37 +Load.36=Load.36 +Load.34=Load.34 +Load.33=Load.33 +Load.32=Load.32 +Peas.plantheight=Peas.plantheight +Fly.eyecolor=Fly.eyecolor +DiploidAllelesImpl.0=DiploidAllelesImpl.0 +MatingPanel.29=MatingPanel.29 +MatingPanel.28=MatingPanel.28 +FileList.26=FileList.26 +MatingPanel.26=MatingPanel.26 +MatingPanel.24=MatingPanel.24 +FileList.22=FileList.22 +MatingPanel.22=MatingPanel.22 +FileList.20=FileList.20 +Tools.1=Tools.1 +Tools.0=Tools.0 +Load.29=Load.29 +Fly.lethal=Fly.lethal +Load.28=Load.28 +Load.27=Load.27 +SillyParentLabel.1=SillyParentLabel.1 +MainPanel.10=MainPanel.10 +ExportAsSGZ.11=ExportAsSGZ.11 +Load.25=Load.25 +ExportAsSGZ.10=ExportAsSGZ.10 +Load.22=Load.22 +FileList.19=FileList.19 +FileList.18=FileList.18 +MatingPanel.19=MatingPanel.19 +MatingPanel.18=MatingPanel.18 +FileList.16=FileList.16 +MatingPanel.17=MatingPanel.17 +ParentsListModelImplUnisex.1=ParentsListModelImplUnisex.1 +MatingPanel.16=MatingPanel.16 +ParentsListModelImplUnisex.0=ParentsListModelImplUnisex.0 +FileList.14=FileList.14 +MatingPanel.15=MatingPanel.15 +FileList.13=FileList.13 +MatingPanel.14=MatingPanel.14 +MatingPanel.13=MatingPanel.13 +GettingStarted.2=GettingStarted.2 +PunnettSquareModel2.0=PunnettSquareModel2.0 +MatingPanel.12=MatingPanel.12 +GettingStarted.1=GettingStarted.1 +FileList.10=FileList.10 +MatingPanel.11=MatingPanel.11 +GettingStarted.0=GettingStarted.0 +MatingPanel.10=MatingPanel.10 +Load.19=Load.19 +Load.18=Load.18 +Load.17=Load.17 +NewReplicationExperiment.0=NewReplicationExperiment.0 +Main.2=Main.2 +Main.1=Main.1 +RuleImpl.2=RuleImpl.2 +RuleImpl.1=RuleImpl.1 +Mate.6=Mate.6 +Mate.5=Mate.5 +Mate.4=Mate.4 +Mate.3=Mate.3 +Mate.2=Mate.2 +Mate.0=Mate.0 +RecentDocuments.13=RecentDocuments.13 +RecentDocuments.12=RecentDocuments.12 +RecentDocuments.11=RecentDocuments.11 +Open.6=Open.6 +ModelSaver.7=ModelSaver.7 +Open.4=Open.4 +ModelSaver.6=ModelSaver.6 +ModelSaver.5=ModelSaver.5 +New.0=New.0 +ModelSaver.4=ModelSaver.4 +Open.0=Open.0 +ModelSaver.1=ModelSaver.1 +MainFrame.0=MainFrame.0 +PunnettSquare2.5=PunnettSquare2.5 +PunnettSquare2.4=PunnettSquare2.4 +PunnettSquare2.3=PunnettSquare2.3 +PunnettSquare2.2=PunnettSquare2.2 +PunnettSquare2.1=PunnettSquare2.1 +Peas.peashape=Peas.peashape +PunnettSquare2.0=PunnettSquare2.0 +PunnettSquareButton.0=PunnettSquareButton.0 +Crate.9=Crate.9 +Crate.8=Crate.8 +Crate.7=Crate.7 +Crate.6=Crate.6 +Crate.5=Crate.5 +ExportAsSGZMulti.0=ExportAsSGZMulti.0 +DiscardCrate.3=DiscardCrate.3 +DiscardCrate.2=DiscardCrate.2 +DiscardCrate.1=DiscardCrate.1 +JGel.0=JGel.0 +DiscardCrate.0=DiscardCrate.0 +NewExperiment.1=NewExperiment.1 +Load2.0=Load2.0 +NewExperiment.0=NewExperiment.0 +PunnettSquare.5=PunnettSquare.5 +PunnettSquare.4=PunnettSquare.4 +PunnettSquare.3=PunnettSquare.3 +PunnettSquare.2=PunnettSquare.2 +PunnettSquare.1=PunnettSquare.1 +PunnettSquare.0=PunnettSquare.0 +NewMatingExperiment.0=NewMatingExperiment.0 +AboutBox.8=AboutBox.8 +Load2.28=Load2.28 +AboutBox.6=AboutBox.6 +Load2.26=Load2.26 +AboutBox.4=AboutBox.4 +Load2.25=Load2.25 +AboutBox.3=AboutBox.3 +Load2.24=Load2.24 +FileList.8=FileList.8 +AboutBox.2=AboutBox.2 +AboutBox.1=AboutBox.1 +FileList.6=FileList.6 +AboutBox.0=StarGenetics +Load2.20=Load2.20 +FileList.4=FileList.4 +FileList.2=FileList.2 +PunnettSquareDialog.3=PunnettSquareDialog.3 +PunnettSquareDialog.2=PunnettSquareDialog.2 +PunnettSquareDialog.1=PunnettSquareDialog.1 +PunnettSquareDialog.0=PunnettSquareDialog.0 +AboutBox.14=AboutBox.14 +GelFilter.8=GelFilter.8 +GelFilter.7=GelFilter.7 +GelFilter.6=GelFilter.6 +GelFilter.5=GelFilter.5 +GelFilter.4=GelFilter.4 +GelFilter.3=GelFilter.3 +Load2.18=Load2.18 +GelFilter.1=GelFilter.1 +GelFilter.0=GelFilter.0 +InputOutput.9=InputOutput.9 +InputOutput.8=InputOutput.8 +Load2.15=Load2.15 +InputOutput.7=InputOutput.7 +Load2.14=Load2.14 +InputOutput.6=InputOutput.6 +InputOutput.5=InputOutput.5 +Load2.12=Load2.12 +InputOutput.4=InputOutput.4 +Load2.10=Load2.10 +InputOutput.2=InputOutput.2 +InputOutput.1=InputOutput.1 +InputOutput.0=InputOutput.0 +Fly.3=Fly.3 +Fly.2=Fly.2 +Parents.0=Parents.0 +YeastParents.0=YeastParents.0 +Options.1=Options.1 +Options.0=Options.0 +Sporulate.8=Sporulate.8 +Sporulate.7=Sporulate.7 +Sporulate.4=Sporulate.4 +Sporulate.3=Sporulate.3 +PropertiesPanel.24=PropertiesPanel.24 +MatingPanel.9=MatingPanel.9 +Sporulate.2=Sporulate.2 +ReplicaExperimentAddAll.1=ReplicaExperimentAddAll.1 +PropertiesPanel.23=PropertiesPanel.23 +MatingPanel.8=MatingPanel.8 +Sporulate.1=Sporulate.1 +ReplicaExperimentAddAll.0=ReplicaExperimentAddAll.0 +PropertiesPanel.22=PropertiesPanel.22 +MatingPanel.7=MatingPanel.7 +Sporulate.0=Sporulate.0 +MatingPanel.6=MatingPanel.6 +MatingPanel.5=MatingPanel.5 +MatingPanel.4=MatingPanel.4 +MatingPanel.3=MatingPanel.3 +MatingPanel.2=MatingPanel.2 +MatingPanel.1=MatingPanel.1 +MatingPanel.0=MatingPanel.0 +Peas.podcolor=Peas.podcolor +About.1=About.1 +About.0=About.0 +PropertiesPanel.12=PropertiesPanel.12 +PropertiesPanel.10=PropertiesPanel.10 +PunnettSqaure.0=PunnettSqaure.0 +ChooseExperiment.5=ChooseExperiment.5 +ChooseExperiment.0=ChooseExperiment.0 +CrateModelImpl.0=CrateModelImpl.0 +Sex.10=Sex.10 +Fly.wingsize=Fly.wingsize +MatingEngineImpl_Common.4=MatingEngineImpl_Common.4 +MatingEngineImpl_Common.3=MatingEngineImpl_Common.3 +Fly.sex=Fly.sex +MainPanel.9=MainPanel.9 +Peas.matings=Peas.matings +MainPanel.6=StarGenetics +ChooseExperiment.10=ChooseExperiment.10 +Screenshot.8=Screenshot.8 +Screenshot.7=Screenshot.7 +MainPanel.2=StarGenetics +Screenshot.5=Screenshot.5 +MainPanel.0=MainPanel.0 +Screenshot.2=Screenshot.2 +Screenshot.0=Screenshot.0 +GroupBy.9=GroupBy.9 +GroupBy.6=GroupBy.6 diff --git a/src/star/genetics/genetic/impl/AlleleImpl.java b/src/star/genetics/genetic/impl/AlleleImpl.java new file mode 100644 index 0000000..d43a228 --- /dev/null +++ b/src/star/genetics/genetic/impl/AlleleImpl.java @@ -0,0 +1,56 @@ +package star.genetics.genetic.impl; + +import java.io.Serializable; + +import star.genetics.genetic.model.Gene; + +public class AlleleImpl implements star.genetics.genetic.model.Allele, Serializable +{ + private static final long serialVersionUID = 1L; + private final String name; + private final Gene gene; + + public AlleleImpl(String name, Gene gene) + { + this.name = name; + this.gene = gene; + gene.getGeneTypes().add(this); + } + + public String getName() + { + return name; + } + + public Gene getGene() + { + return gene; + } + + @Override + public String toString() + { + return gene.getName() +" " +getName(); //$NON-NLS-1$ + } + + @Override + public boolean equals(Object obj) + { + boolean ret = false; + if (obj instanceof AlleleImpl) + { + AlleleImpl that = (AlleleImpl) obj; + if (this.gene != null && this.gene.equals(that.gene)) + { + ret = this.getName().equals(that.getName()); + } + } + return ret; + } + + @Override + public int hashCode() + { + return name.hashCode() ^ gene.hashCode(); + } +} diff --git a/src/star/genetics/genetic/impl/ChromosomeImpl.java b/src/star/genetics/genetic/impl/ChromosomeImpl.java new file mode 100644 index 0000000..1307309 --- /dev/null +++ b/src/star/genetics/genetic/impl/ChromosomeImpl.java @@ -0,0 +1,67 @@ +package star.genetics.genetic.impl; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +import star.genetics.genetic.model.Allele; +import star.genetics.genetic.model.Gene; +import star.genetics.genetic.model.Genome; + +public class ChromosomeImpl implements star.genetics.genetic.model.Chromosome, Serializable +{ + private static final long serialVersionUID = 1L; + private final String name; + private final List genes = new ArrayList(); + + public ChromosomeImpl(String name, Genome genome) + { + this.name = name; + genome.addChromosome(this); + } + + public String getName() + { + return name; + } + + public List getGenes() + { + return genes; + } + + public Allele getAlleleByName(String name) + { + Allele ret = null; + for (Gene g : genes) + { + Allele a = g.getAlleleByName(name); + if (a != null) + { + ret = a; + break; + } + } + return ret; + } + + public Gene getGeneByName(String name) + { + Gene ret = null; + for (Gene g : genes) + { + if (name.equals(g.getName())) + { + ret = g; + break; + } + } + return ret; + } + + @Override + public String toString() + { + return this.getClass() + " " + getName() + " " + getGenes(); //$NON-NLS-1$ + } +} diff --git a/src/star/genetics/genetic/impl/ChromosomeRuleImpl.java b/src/star/genetics/genetic/impl/ChromosomeRuleImpl.java new file mode 100644 index 0000000..7cfbe97 --- /dev/null +++ b/src/star/genetics/genetic/impl/ChromosomeRuleImpl.java @@ -0,0 +1,49 @@ +package star.genetics.genetic.impl; + +import java.io.Serializable; +import java.util.Map; +import java.util.TreeMap; + +import star.genetics.genetic.model.Allele; +import star.genetics.genetic.model.Chromosome; +import star.genetics.genetic.model.Creature; +import star.genetics.genetic.model.DiploidAlleles; +import star.genetics.genetic.model.Gene; +import star.genetics.genetic.model.GeneticMakeup; + +class ChromosomeRuleImpl implements Serializable, IndividualRule +{ + private static final long serialVersionUID = 1L; + private final Chromosome chromosome; + private final Map map = new TreeMap(); + + ChromosomeRuleImpl(Chromosome c) + { + this.chromosome = c; + } + + public boolean test(GeneticMakeup makeup, Creature.Sex sex) + { + return makeup.test(chromosome, map); + } + + void addAllele(int strand, Allele a) + { + if (strand == 0) + { + map.put(a.getGene(), new DiploidAllelesImpl(a, null)); + } + else + { + DiploidAlleles diploid = map.get(a.getGene()); + map.put(a.getGene(), new DiploidAllelesImpl(diploid != null ? diploid.get(0) : null, a)); + } + + } + + private Chromosome getChromosome() + { + return chromosome; + } + +} diff --git a/src/star/genetics/genetic/impl/CrateExperimentMetadataImpl.java b/src/star/genetics/genetic/impl/CrateExperimentMetadataImpl.java new file mode 100644 index 0000000..1e8c0f9 --- /dev/null +++ b/src/star/genetics/genetic/impl/CrateExperimentMetadataImpl.java @@ -0,0 +1,24 @@ +package star.genetics.genetic.impl; + +import java.io.Serializable; +import java.util.HashMap; +import java.util.Map; + +import star.genetics.genetic.model.CrateExperimentMetadata; + +public class CrateExperimentMetadataImpl implements CrateExperimentMetadata, Serializable +{ + private static final long serialVersionUID = 2L; + Map data = new HashMap(); + + public Object get(Class c) + { + return data.get(c.getName()); + } + + public void put(Class c, Object o) + { + data.put(c.getName(), o); + } + +} diff --git a/src/star/genetics/genetic/impl/CrateModelImpl.java b/src/star/genetics/genetic/impl/CrateModelImpl.java new file mode 100644 index 0000000..8a3b2de --- /dev/null +++ b/src/star/genetics/genetic/impl/CrateModelImpl.java @@ -0,0 +1,81 @@ +package star.genetics.genetic.impl; + +import java.io.Serializable; + +import star.genetics.client.Messages; +import star.genetics.genetic.model.CrateExperimentMetadata; +import star.genetics.genetic.model.CrateModel; +import star.genetics.genetic.model.CreatureSet; + +public class CrateModelImpl implements CrateModel, Serializable +{ + private static final long serialVersionUID = 1L; + private String name; + private final CreatureSet parents = new CreatureSetImpl(); + private final CreatureSet progenies = new CreatureSetImpl(); + private final CrateExperimentMetadata experimentMetadata = new CrateExperimentMetadataImpl(); + private boolean visible = true; + private String uuid; + + public CrateModelImpl(int id) + { + name = Messages.getString("CrateModelImpl.0")+ id; //$NON-NLS-1$ + this.uuid = generateUUID(); + } + + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return name; + } + + public CreatureSet getParents() + { + return parents; + } + + public CreatureSet getProgenies() + { + return progenies; + } + + public boolean isVisible() + { + return visible; + } + + public void setVisible(boolean visible) + { + this.visible = visible; + } + + @Override + public String toString() + { + return getName(); + } + + public CrateExperimentMetadata getMetadata() + { + return experimentMetadata; + } + + private String generateUUID() + { + long uuid1 = -(long) (Math.random() * Long.MAX_VALUE); + long uuid2 = -(long) (Math.random() * Long.MAX_VALUE); + return Long.toHexString(uuid1) + Long.toHexString(uuid2); + + } + + @Override + public String getUUID() + { + return uuid; + } + +} diff --git a/src/star/genetics/genetic/impl/CrateSetImpl.java b/src/star/genetics/genetic/impl/CrateSetImpl.java new file mode 100644 index 0000000..9ab1859 --- /dev/null +++ b/src/star/genetics/genetic/impl/CrateSetImpl.java @@ -0,0 +1,89 @@ +package star.genetics.genetic.impl; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Iterator; + +import star.genetics.genetic.model.CrateModel; +import star.genetics.genetic.model.CrateSet; + +public class CrateSetImpl implements CrateSet, Serializable +{ + private static final long serialVersionUID = 1L; + private int id = 1; + private final ArrayList set = new ArrayList(); + + private void add(CrateModel crate) + { + set.add(crate); + } + + public CrateModel current() + { + return set.get(set.size() - 1); + } + + static class CrateIterator implements Iterator + { + public CrateIterator(ArrayList set) + { + this.set = set; + index = set.size(); + } + + int index; + ArrayList set; + + public boolean hasNext() + { + return index > 0; + } + + public CrateModel next() + { + index--; + if (index > set.size()) + { + index = set.size() - 1; + } + return set.get(index); + } + + public void remove() + { + + } + + } + + public Iterator iterator() + { + // return set.iterator(); + return new CrateIterator(set); + } + + public CrateModel newCrateModel() + { + clearInvisibleCrates(); + add(new CrateModelImpl(id++)); + return current(); + } + + private void clearInvisibleCrates() + { + Iterator iter = set.iterator(); + while (iter.hasNext()) + { + CrateModel m = iter.next(); + if (!m.isVisible()) + { + iter.remove(); + } + } + } + + public int size() + { + return set.size(); + } +} diff --git a/src/star/genetics/genetic/impl/CreatureImpl.java b/src/star/genetics/genetic/impl/CreatureImpl.java new file mode 100644 index 0000000..6a98fe9 --- /dev/null +++ b/src/star/genetics/genetic/impl/CreatureImpl.java @@ -0,0 +1,174 @@ +package star.genetics.genetic.impl; + +import java.io.Serializable; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Map.Entry; + +import star.genetics.client.Messages; +import star.genetics.genetic.model.Creature; +import star.genetics.genetic.model.CreatureSet; +import star.genetics.genetic.model.GeneticMakeup; +import star.genetics.genetic.model.GeneticModel; +import star.genetics.genetic.model.Genome; + +public class CreatureImpl implements star.genetics.genetic.model.Creature, Serializable +{ + private static final long serialVersionUID = 1L; + private String name; + private final Genome genome; + private Sex sex; + private final GeneticMakeup makeup; + private boolean readOnly = false; + private String note; + private int matingsAvailable = Integer.MAX_VALUE; + private Map properties; + final private CreatureSet parents; + private String uuid; + + public CreatureImpl(String name, Genome genome, Sex sex, GeneticMakeup makeup, int matingsAvailable, Map properties, CreatureSet parents) + { + this.name = name; + this.genome = genome; + this.sex = sex; + this.makeup = makeup; + this.matingsAvailable = matingsAvailable; + this.properties = new LinkedHashMap(); + this.parents = parents; + addProperties(properties); + this.uuid = generateUUID(); + } + + public CreatureSet getParents() + { + return parents; + } + + public Genome getGenome() + { + return genome; + } + + public GeneticMakeup getMakeup() + { + return makeup; + } + + public String getName() + { + return name; + } + + public void setName(String name) + { + this.name = name; + } + + public Sex getSex() + { + return sex; + } + + public void setSex(Sex sex) + { + this.sex = sex; + } + + public boolean isReadOnly() + { + return readOnly; + } + + public void setReadOnly(boolean ro) + { + readOnly = ro; + } + + // TODO: May be a problem - REVISIT + public int compareTo(star.genetics.genetic.model.Creature o) + { + return this.getName().compareTo(o.getName()); + } + + @Override + public boolean equals(Object obj) + { + return (obj instanceof Creature) && (compareTo((Creature) obj) == 0); + } + + @Override + public int hashCode() + { + return super.hashCode() >> 1; + } + + public String getNote() + { + return this.note; + } + + public void setNote(String string) + { + this.note = string; + } + + public boolean isMateable() + { + return !isSterile() && getMatingsAvailable() != 0; + } + + private boolean isSterile() + { + boolean ret = false; + String sterile = getProperties().get(GeneticModel.sterile); + if (sterile != null) + { + ret = Boolean.parseBoolean(sterile); + } + return ret; + } + + private int getMatingsAvailable() + { + return matingsAvailable; + } + + public void mated() + { + matingsAvailable--; + updateMatings(); + } + + public void addProperties(Map properties) + { + for (Entry entry : properties.entrySet()) + { + this.properties.put(entry.getKey(), entry.getValue()); + } + updateMatings(); + } + + public Map getProperties() + { + return properties; + } + + private void updateMatings() + { + properties.put(GeneticModel.matings, (matingsAvailable > 100 ? "100+" : Integer.toString(matingsAvailable))); //$NON-NLS-1$ + } + + private String generateUUID() + { + long uuid1 = -(long) (Math.random() * Long.MAX_VALUE); + long uuid2 = -(long) (Math.random() * Long.MAX_VALUE); + return Long.toHexString(uuid1) + Long.toHexString(uuid2); + + } + + @Override + public String getUUID() + { + return uuid; + } +} diff --git a/src/star/genetics/genetic/impl/CreatureSetImpl.java b/src/star/genetics/genetic/impl/CreatureSetImpl.java new file mode 100644 index 0000000..c3e1099 --- /dev/null +++ b/src/star/genetics/genetic/impl/CreatureSetImpl.java @@ -0,0 +1,115 @@ +package star.genetics.genetic.impl; + +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; +import java.beans.PropertyChangeSupport; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Iterator; + +import star.genetics.genetic.model.Creature; + +public class CreatureSetImpl implements star.genetics.genetic.model.CreatureSet, Serializable +{ + private static final long serialVersionUID = 1L; + ArrayList creatures = new ArrayList(); + PropertyChangeSupport support = new PropertyChangeSupport(this); + + public Iterator iterator() + { + return creatures.iterator(); + } + + public void add(Creature c) + { + creatures.add(c); + modelChanged(); + } + + public void add(Creature c, int index) + { + creatures.add(index, c); + modelChanged(); + } + + public void set(Creature c, int index) + { + creatures.set(index, c); + modelChanged(); + } + + public void remove(Creature c) + { + creatures.remove(c); + modelChanged(); + } + + public boolean contains(Creature c) + { + return creatures.contains(c); + } + + public void move(Creature c, int newIndex) + { + int oldIndex = creatures.indexOf(c); + if (oldIndex != newIndex) + { + creatures.remove(oldIndex); + creatures.add(newIndex + (newIndex > oldIndex ? -1 : 0), c); + } + } + + public Creature get(int index) + { + return creatures.get(index); + } + + public int size() + { + return creatures.size(); + } + + public void clear() + { + creatures.clear(); + modelChanged(); + } + + @Override + public String toString() + { + StringBuilder sb = new StringBuilder(); + for (Creature c : this) + { + sb.append(c.getName()); + sb.append(","); //$NON-NLS-1$ + } + return sb.length() > 0 ? sb.substring(0, sb.length() - 1) : ""; //$NON-NLS-1$ + } + + public String toShortString() + { + StringBuffer sb = new StringBuffer(); + for (int i = 0; i < creatures.size(); i++) + { + sb.append(" " + creatures.get(i).getName()); //$NON-NLS-1$ + } + return sb.toString(); + } + + public void addPropertyChangeListener(PropertyChangeListener listener) + { + support.addPropertyChangeListener(listener); + + } + + public void removePropertyChangeListener(PropertyChangeListener listener) + { + support.removePropertyChangeListener(listener); + } + + void modelChanged() + { + support.firePropertyChange(new PropertyChangeEvent(this, "", null, null)); //$NON-NLS-1$ + } +} diff --git a/src/star/genetics/genetic/impl/DiploidAllelesImpl.java b/src/star/genetics/genetic/impl/DiploidAllelesImpl.java new file mode 100644 index 0000000..fa424b7 --- /dev/null +++ b/src/star/genetics/genetic/impl/DiploidAllelesImpl.java @@ -0,0 +1,84 @@ +package star.genetics.genetic.impl; + +import java.io.Serializable; + +import star.genetics.client.Messages; +import star.genetics.genetic.model.Allele; + +public class DiploidAllelesImpl implements star.genetics.genetic.model.DiploidAlleles, Serializable +{ + private static final long serialVersionUID = 1L; + private final Allele a1, a2; + + public DiploidAllelesImpl(Allele[] alleles) + { + if (alleles != null && (alleles.length == 1 || alleles.length == 2)) + { + a1 = alleles[0]; + a2 = alleles.length == 2 ? alleles[1] : null; + } + else + { + throw new RuntimeException(Messages.getString("DiploidAllelesImpl.0")); //$NON-NLS-1$ + } + } + + public DiploidAllelesImpl(Allele a1, Allele a2) + { + this.a1 = a1; + this.a2 = a2; + } + + Allele meiosis() + { + return (java.lang.Math.random() < .5) ? a1 : a2; + } + + public String toStortString() + { + return "(" + (a1 != null ? a1.getName() : "-") + "," + (a2 != null ? a2.getName() : "-") + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + } + + public int getAlleleCount() + { + int ret = 0; + ret += a1 != null ? 1 : 0; + ret += a2 != null ? 1 : 0; + return ret; + } + + public Allele get(int i) + { + Allele ret = null; + if (i == 0) + { + ret = a1; + } + else if (i == 1) + { + ret = a2; + } + return ret; + } + + @Override + public boolean equals(Object obj) + { + if (obj instanceof DiploidAllelesImpl) + { + DiploidAllelesImpl that = (DiploidAllelesImpl) obj; + Allele this1 = this.get(0); + Allele this2 = this.get(1); + Allele that1 = that.get(0); + Allele that2 = that.get(1); + return (star.genetics.genetic.impl.Utilities.compare(this1, that1) && star.genetics.genetic.impl.Utilities.compare(this2, that2)) || (star.genetics.genetic.impl.Utilities.compare(this1, that2) && star.genetics.genetic.impl.Utilities.compare(this2, that1)); + } + return false; + } + + @Override + public int hashCode() + { + return toStortString().hashCode(); + } +} diff --git a/src/star/genetics/genetic/impl/GelImpl.java b/src/star/genetics/genetic/impl/GelImpl.java new file mode 100644 index 0000000..5d42293 --- /dev/null +++ b/src/star/genetics/genetic/impl/GelImpl.java @@ -0,0 +1,49 @@ +package star.genetics.genetic.impl; + +import java.io.Serializable; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Set; + +import star.genetics.genetic.model.Gel; +import star.genetics.genetic.model.GelPosition; + +public class GelImpl implements Gel, Serializable +{ + private static final long serialVersionUID = 1L; + private final String name; + private int index; + private Set set = new HashSet(); + + public GelImpl(String name, int index) + { + this.name = name; + this.index = index; + } + + @Override + public String getName() + { + + return name; + } + + @Override + public int getIndex() + { + return index; + } + + public void addGelPosition(GelPosition gp) + { + set.add(gp); + } + + @Override + public Iterator iterator() + { + // TODO Auto-generated method stub + return set.iterator(); + } + +} diff --git a/src/star/genetics/genetic/impl/GelPositionImpl.java b/src/star/genetics/genetic/impl/GelPositionImpl.java new file mode 100644 index 0000000..79beb6a --- /dev/null +++ b/src/star/genetics/genetic/impl/GelPositionImpl.java @@ -0,0 +1,42 @@ +package star.genetics.genetic.impl; + +import java.io.Serializable; +import java.util.Arrays; + +import star.genetics.genetic.model.Allele; +import star.genetics.genetic.model.Gel; +import star.genetics.genetic.model.GelPosition; + +public class GelPositionImpl implements GelPosition, Serializable +{ + private static final long serialVersionUID = 1L; + private final Gel gel; + private final Float[] position; + private final Allele allele; + + public GelPositionImpl(Gel gel, Float[] position, Allele allele) + { + this.gel = gel; + this.position = position; + this.allele = allele; + } + + @Override + public Gel getGel() + { + return gel; + } + + @Override + public Float[] getPosition() + { + return position; + } + + @Override + public Allele getAllele() + { + return allele; + } + +} diff --git a/src/star/genetics/genetic/impl/GelRulesImpl.java b/src/star/genetics/genetic/impl/GelRulesImpl.java new file mode 100644 index 0000000..9f2c63a --- /dev/null +++ b/src/star/genetics/genetic/impl/GelRulesImpl.java @@ -0,0 +1,95 @@ +package star.genetics.genetic.impl; + +import java.io.Serializable; +import java.util.ArrayList; + +import star.genetics.genetic.model.Allele; +import star.genetics.genetic.model.Gel; +import star.genetics.genetic.model.GelPosition; +import star.genetics.genetic.model.GelRules; + +public class GelRulesImpl implements GelRules, Serializable +{ + private static final long serialVersionUID = 1L; + ArrayList pos = new ArrayList(); + ArrayList gels = new ArrayList(); + + public GelRulesImpl() + { + } + + private Gel getOrCreateGel(String name) + { + for (Gel g : gels) + { + if (g.getName().equals(name)) + { + return g; + } + } + GelImpl gi = new GelImpl(name, gels.size()); + gels.add(gi); + return gi; + } + + public void addGel(String gelName) + { + getOrCreateGel(gelName); + } + + public void addGel(String gelName, Allele allele, Float[] position) + { + Gel g = getOrCreateGel(gelName); + GelPositionImpl gpi = new GelPositionImpl(g, position, allele); + g.addGelPosition(gpi); + pos.add(gpi); + } + + @Override + public Iterable getAllGelNames() + { + return gels; + } + + @Override + public Iterable getGel(Iterable alleles) + { + ArrayList ret = new ArrayList(); + for (GelPosition g : pos) + { + for (Allele a : alleles) + { + if (g.getAllele().equals(a)) + { + ret.add(g); + } + } + } + return ret; + } + + @Override + public String toString() + { + StringBuffer sb = new StringBuffer(); + sb.append("[" + this.getClass().getName()); //$NON-NLS-1$ + for (GelPosition gp : pos) + { + sb.append("\n\t" + gp); //$NON-NLS-1$ + } + sb.append("\n]"); //$NON-NLS-1$ + return sb.toString(); + } + + @Override + public Iterable getAllGelPositions() + { + return pos; + } + + @Override + public int sizeGels() + { + return gels.size(); + } +} diff --git a/src/star/genetics/genetic/impl/GeneImpl.java b/src/star/genetics/genetic/impl/GeneImpl.java new file mode 100644 index 0000000..18d7c4f --- /dev/null +++ b/src/star/genetics/genetic/impl/GeneImpl.java @@ -0,0 +1,92 @@ +package star.genetics.genetic.impl; + +import java.util.ArrayList; +import java.util.List; + +import star.genetics.genetic.model.Chromosome; + +public class GeneImpl implements star.genetics.genetic.model.Gene +{ + private static final long serialVersionUID = 1L; + + private final String name; + private final Chromosome chromosome; + private final float position; + private final List geneTypes = new ArrayList(); + + public GeneImpl(String name, float position, Chromosome chromosome) + { + this.name = name; + this.position = position; + this.chromosome = chromosome; + chromosome.getGenes().add(this); + } + + public star.genetics.genetic.model.Chromosome getChromosome() + { + return chromosome; + } + + public String getName() + { + return name; + } + + public float getPosition() + { + return position; + } + + public List getGeneTypes() + { + return geneTypes; + } + + public String getId() + { + return (getChromosome() != null ? getChromosome().getName() : "") + ":" + getName(); //$NON-NLS-1$ //$NON-NLS-2$ + } + + public star.genetics.genetic.model.Allele getAlleleByName(String name) + { + star.genetics.genetic.model.Allele ret = null; + for (star.genetics.genetic.model.Allele a : getGeneTypes()) + { + if (name.equals(a.getName())) + { + ret = a; + break; + } + } + return ret; + } + + public int compareTo(star.genetics.genetic.model.Gene that) + { + if (this.getChromosome() != null && that.getChromosome() != null && this.getChromosome().equals(that.getChromosome())) + { + int ret = Float.compare(this.getPosition(), that.getPosition()); + return ret != 0 ? ret : this.getId().compareTo(that.getId()); + } + return getId().compareTo(that.getId()); + } + + @Override + public boolean equals(Object obj) + { + boolean ret = false; + if (obj instanceof GeneImpl) + { + GeneImpl that = (GeneImpl) obj; + ret = getId().equals(that.getId()); + } + return ret; + } + + @Override + public int hashCode() + { + return getId().hashCode(); + } + +} diff --git a/src/star/genetics/genetic/impl/GeneticMakeupImpl.java b/src/star/genetics/genetic/impl/GeneticMakeupImpl.java new file mode 100644 index 0000000..df414b5 --- /dev/null +++ b/src/star/genetics/genetic/impl/GeneticMakeupImpl.java @@ -0,0 +1,136 @@ +package star.genetics.genetic.impl; + +import java.util.Map; +import java.util.Map.Entry; +import java.util.TreeMap; + +import star.genetics.genetic.model.Allele; +import star.genetics.genetic.model.Chromosome; +import star.genetics.genetic.model.DiploidAlleles; +import star.genetics.genetic.model.Gene; + +public class GeneticMakeupImpl extends TreeMap implements star.genetics.genetic.model.GeneticMakeup +{ + private static final long serialVersionUID = 1L; + + @Override + public boolean equals(Object other) + { + boolean ret = false; + if (other != null && other.getClass().equals(this.getClass())) + { + GeneticMakeupImpl that = (GeneticMakeupImpl) other; + if (that.size() == this.size()) + { + ret = true; + for (Gene g : this.keySet()) + { + DiploidAlleles thisDiploid = this.get(g); + DiploidAlleles thatDiploid = that.get(g); + if (thisDiploid == null || thatDiploid == null) + { + ret = false; + break; + } + if (!thisDiploid.equals(thatDiploid)) + { + ret = false; + break; + } + } + } + } + return ret; + } + + public boolean containsKey(Gene g) + { + return super.containsKey(g); + } + + public DiploidAlleles get(Gene g) + { + return super.get(g); + } + + private boolean test(Allele a, Allele b, Allele x, Allele y) + { + boolean ax, by; + if (a != null) + { + ax = a.equals(x); + } + else + { + ax = true; + } + if (b != null) + { + by = b.equals(y); + } + else + { + by = true; + } + return ax & by; + } + + private boolean test(Map map, boolean swap) + { + boolean ret = true; + try + { + for (Entry entry : map.entrySet()) + { + DiploidAlleles rule = entry.getValue(); + DiploidAlleles organism = get(entry.getKey()); + + if (organism == null) + { + ret = false; + break; + } + Allele r0 = rule.get(swap ? 0 : 1); + Allele r1 = rule.get(swap ? 1 : 0); + + Allele o0 = organism.get(0); + Allele o1 = organism.get(1); + + ret &= test(r0, r1, o0, o1); + if (!ret) + { + break; + } + } + } + catch (Exception e) + { + throw new RuntimeException(e); + } + return ret; + } + + public boolean test(Chromosome chromosome, Map map) + { + boolean ret = test(map, false) || test(map, true); + return ret; + } + + public String toShortString() + { + StringBuilder sb = new StringBuilder(); + for (Entry entry : this.entrySet()) + { + DiploidAlleles alleles = entry.getValue(); + if (alleles instanceof DiploidAllelesImpl) + { + sb.append(((DiploidAllelesImpl) alleles).toStortString()); + } + else + { + sb.append(alleles.toString()); + } + } + return sb.toString(); + } +} diff --git a/src/star/genetics/genetic/impl/GenomeImpl.java b/src/star/genetics/genetic/impl/GenomeImpl.java new file mode 100644 index 0000000..9974a0c --- /dev/null +++ b/src/star/genetics/genetic/impl/GenomeImpl.java @@ -0,0 +1,91 @@ +package star.genetics.genetic.impl; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import star.genetics.genetic.model.Chromosome; +import star.genetics.genetic.model.Gene; + +public class GenomeImpl implements star.genetics.genetic.model.Genome, Serializable +{ + private static final long serialVersionUID = 1L; + private String name; + private List chromosomes = new ArrayList(); + private SexType sexType = SexType.XY; + + /** + * @param organismName + * the organismName to set + */ + public void setSexType(String sexTypeName) + { + sexType = SexType.parse(sexTypeName); + } + + public SexType getSexType() + { + return sexType; + } + + public Chromosome getChromosomeByName(String name) + { + Chromosome ret = null; + for (Chromosome x : chromosomes) + { + if (name.equals(x.getName())) + { + ret = x; + break; + } + } + return ret; + } + + public void removeChromosome(Chromosome c) + { + getChromosomes().remove(c); + } + + public void addChromosome(Chromosome c) + { + getChromosomes().add(c); + } + + public Iterator iterator() + { + return getChromosomes().iterator(); + } + + List getChromosomes() + { + return chromosomes; + } + + public void setChromosomes(List chromosomes) + { + this.chromosomes = chromosomes; + } + + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return name; + } + + public List getGenes() + { + ArrayList genes = new ArrayList(); + for (star.genetics.genetic.model.Chromosome c : getChromosomes()) + { + genes.addAll(c.getGenes()); + } + return genes; + } + +} diff --git a/src/star/genetics/genetic/impl/HaploidRuleImpl.java b/src/star/genetics/genetic/impl/HaploidRuleImpl.java new file mode 100644 index 0000000..e852a7c --- /dev/null +++ b/src/star/genetics/genetic/impl/HaploidRuleImpl.java @@ -0,0 +1,16 @@ +package star.genetics.genetic.impl; + +import star.genetics.genetic.model.Creature.Sex; +import star.genetics.genetic.model.GeneticMakeup; + +public class HaploidRuleImpl implements IndividualRule +{ + private static final long serialVersionUID = 1L; + + public boolean test(GeneticMakeup makeup, Sex sex) + { + + return sex != null; + } + +} diff --git a/src/star/genetics/genetic/impl/IndividualRule.java b/src/star/genetics/genetic/impl/IndividualRule.java new file mode 100644 index 0000000..6d7e0f2 --- /dev/null +++ b/src/star/genetics/genetic/impl/IndividualRule.java @@ -0,0 +1,11 @@ +package star.genetics.genetic.impl; + +import java.io.Serializable; + +import star.genetics.genetic.model.Creature; +import star.genetics.genetic.model.GeneticMakeup; + +public interface IndividualRule extends Serializable +{ + boolean test(GeneticMakeup makeup, Creature.Sex sex); +} diff --git a/src/star/genetics/genetic/impl/MatingEngineImpl_Common.java b/src/star/genetics/genetic/impl/MatingEngineImpl_Common.java new file mode 100644 index 0000000..708951b --- /dev/null +++ b/src/star/genetics/genetic/impl/MatingEngineImpl_Common.java @@ -0,0 +1,227 @@ +package star.genetics.genetic.impl; + +import java.io.Serializable; +import java.util.Map; + +import star.genetics.client.Messages; +import star.genetics.genetic.model.Creature; +import star.genetics.genetic.model.CreatureSet; +import star.genetics.genetic.model.GeneticMakeup; +import star.genetics.genetic.model.GeneticModel; +import star.genetics.genetic.model.Genome; +import star.genetics.genetic.model.RuleSet; +import star.genetics.xls.ParseException; + +public abstract class MatingEngineImpl_Common implements Serializable +{ + private static final long serialVersionUID = 1L; + final static String sterileString = GeneticModel.sterile; + private int progeniesCount; + private float twinningFrequency; + private float identicalTwinsFrequency; + + MatingEngineImpl_Common(int progeniesCount, float twinningFrequency, float identicalTwinsFrequency) + { + this.progeniesCount = progeniesCount; + this.twinningFrequency = twinningFrequency; + this.identicalTwinsFrequency = identicalTwinsFrequency; + + } + + public CreatureSet getProgenies(String crateName, CreatureSet parents, int countFrom, int matings, RuleSet rules) throws MatingException + { + CreatureSet set = new star.genetics.genetic.impl.CreatureSetImpl(); + if (canMate(parents)) + { + Creature[] parentArray = new Creature[2]; + int i = 0; + for (Creature c : parents) + { + parentArray[i++] = c; + } + int creature_count = 0; + int lethal_count = 0; + LOOP: for (int j = 0; j < progeniesCount; j++) + { + Creature c = mate(crateName, parentArray[0], parentArray[1], "-" + (countFrom + creature_count), matings, rules); //$NON-NLS-1$ + boolean isLethal = (c == null); + if (isLethal) + { + j--; + lethal_count++; + if (lethal_count > progeniesCount * 10 && set.size() == 0) + { + break LOOP; + } + continue LOOP; + } + + set.add(c); + creature_count++; + + if (Math.random() < twinningFrequency / 100) + { + if (Math.random() < identicalTwinsFrequency / 100) + { + String name = crateName + "-" + (countFrom + creature_count); //$NON-NLS-1$ + set.add(clone(name, c, matings)); + creature_count++; + } + else + { + Creature c2 = mate(crateName, parentArray[0], parentArray[1], "-" + (countFrom + creature_count), matings, rules); //$NON-NLS-1$ + if (c2 != null) + { + set.add(c2); + creature_count++; + } + } + } + } + for (Creature c : parents) + { + c.mated(); + } + if (set.size() == 0) + { + throw new MatingException(Messages.getString("MatingEngineImpl_Common.3")); //$NON-NLS-1$ + } + } + else + { + throw new MatingException(Messages.getString("MatingEngineImpl_Common.4")); //$NON-NLS-1$ + } + return set; + } + + private Creature clone(String name, Creature source, int matings) + { + return new star.genetics.genetic.impl.CreatureImpl(name, source.getGenome(), source.getSex(), source.getMakeup(), matings, source.getProperties(), source.getParents()); + } + + protected abstract GeneticMakeup mate(Genome genome, GeneticMakeup makeup1, Creature.Sex sex1, GeneticMakeup makeup2, Creature.Sex sex2); + + protected Creature mate(String crateName, Creature p1, Creature p2, String suffix, int matings, RuleSet rules) + { + try + { + GeneticMakeup makeup = mate(p1.getGenome(), p1.getMakeup(), p1.getSex(), p2.getMakeup(), p2.getSex()); + + String name = crateName + suffix; + Genome genome = p1.getGenome(); + Creature.Sex sex = p1.getSex() != null ? Sex.getSex(makeup, genome, name) : null; + Map x = rules.getProperties(makeup, sex); + CreatureSet parents = new CreatureSetImpl(); + parents.add(p1); + parents.add(p2); + + boolean isLethal = false; + String lethal = x.get(GeneticModel.lethal); + if (lethal != null) + { + isLethal = Boolean.parseBoolean(lethal); + } + if (!isLethal) + { + star.genetics.genetic.impl.CreatureImpl ret = new star.genetics.genetic.impl.CreatureImpl(name, genome, sex, makeup, matings, x, parents); + return ret; + } + else + { + return null; + } + } + catch (ParseException e) + { + e.printStackTrace(); + return null; + } + } + + protected boolean canMate(CreatureSet set) + { + boolean canMate = true; + for (Creature c : set) + { + canMate &= c.isMateable(); + } + return canMate; + } + + protected boolean randomizeInternal(boolean original, float distance, Creature.Sex sex) + { + distance = Math.abs(distance); + boolean flip = Math.random() > empiricalProbabilityNoInterference(distance); + return flip ? original : !original; + } + + protected double empiricalProbabilityNoInterference(float distance) + { + if (distance > 1.90f) + { + return .5f; + } + else + { + float x = distance; + double probability = x * (0.9742 + x * (-0.8533 + x * (0.3791 - 0.0681 * x))); + return probability; + } + } +} +// public static void main(String[] args) +// { +// for (int d = 0; d < 200; d++) +// { +// double x = d * .01; +// double probability = x * (0.9742 + x * (-0.8533 + x * (0.3791 - 0.0681 * x))); +// System.out.println(x + " " + probability); +// +// } +// } + +// used for fitting empiricalProbabilityNoInterference formula +// +// formula has R>0.999 fitting to the data +// +// original recombination formula was: +// private boolean randomize(boolean original, float distance, Creature.Sex sex) +// { +// distance *= Creature.Sex.MALE.equals(sex) ? maleRecombinationRate : femaleRecombinationRate; +// if (distance > .5f) +// { +// distance = .5f; +// } +// return (Math.random() > distance) ? original : !original; +// } +// public static boolean dir(int distance) +// { +// boolean flip = false; +// for (int i = 0; i < distance; i++) +// { +// for (int j = 0; j < 10; j++) +// { +// flip = flip ^ (Math.random() < 0.001); +// } +// } +// return flip; +// } +// +// public static void main(String[] args) +// { +// final int max = 200; +// final int samples = 50000; +// float[] p = new float[max]; +// for (int distance = 0; distance < max; distance++) +// { +// p[distance] = 0; +// for (int points = 0; points < samples; points++) +// { +// if (dir(distance)) +// { +// p[distance]++; +// } +// } +// System.out.println(distance * .01f + "\t" + p[distance] / samples); +// } +// } \ No newline at end of file diff --git a/src/star/genetics/genetic/impl/MatingEngineImpl_MAT.java b/src/star/genetics/genetic/impl/MatingEngineImpl_MAT.java new file mode 100644 index 0000000..7e423bd --- /dev/null +++ b/src/star/genetics/genetic/impl/MatingEngineImpl_MAT.java @@ -0,0 +1,236 @@ +package star.genetics.genetic.impl; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Comparator; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Random; +import java.util.TreeMap; +import java.util.TreeSet; + +import star.genetics.client.Messages; +import star.genetics.genetic.model.Allele; +import star.genetics.genetic.model.Chromosome; +import star.genetics.genetic.model.Creature; +import star.genetics.genetic.model.CreatureSet; +import star.genetics.genetic.model.Gene; +import star.genetics.genetic.model.GeneticMakeup; +import star.genetics.genetic.model.Genome; +import star.genetics.genetic.model.MatingEngine; +import star.genetics.genetic.model.RuleSet; + +public class MatingEngineImpl_MAT implements MatingEngine, Serializable +{ + + static class Mapping + { + private int[] order = new int[4]; + + public Mapping() + { + ArrayList arrayList = new ArrayList(); + Random r = new Random(); + int a = 0; + int b = 2; + if (Math.random() > 0.5f) + { + a = 2; + b = 0; + } + order[a] = Math.random() > .5f ? 0 : 1; + order[a + 1] = order[a] == 0 ? 1 : 0; + order[b] = Math.random() > .5f ? 2 : 3; + order[b + 1] = order[b] == 2 ? 3 : 2; + + } + + public Mapping(Mapping parent) + { + System.arraycopy(parent.order, 0, order, 0, order.length); + } + + public void swap(int thread, int target) + { + int tmp = order[thread]; + order[thread] = order[target]; + order[target] = tmp; + } + + @Override + public String toString() + { + + return Arrays.toString(order); + } + } + + private static final long serialVersionUID = 1L; + float maleRecombinationRate; + float femaleRecombinationRate; + float femaleSexRatio; + int progeniesCount; + + public MatingEngineImpl_MAT(float maleRecombinationRate, float femaleRecombinationRate, float femaleSexRatio, int progeniesCount) + { + this.maleRecombinationRate = maleRecombinationRate; + this.femaleRecombinationRate = femaleRecombinationRate; + this.femaleSexRatio = femaleSexRatio; + this.progeniesCount = progeniesCount; + } + + static class GeneComparator implements Comparator, Serializable + { + private static final long serialVersionUID = 1L; + boolean incremental = true; + + public GeneComparator(boolean incremental) + { + this.incremental = incremental; + } + + public int compare(Gene o1, Gene o2) + { + return Float.compare(o1.getPosition(), o2.getPosition()) * (incremental ? 1 : -1); + } + } + + Map getMapping(Creature c1, Creature c2, Chromosome c) + { + TreeSet chromosomeMapPositive = new TreeSet(new GeneComparator(true)); + TreeSet chromosomeMapNegative = new TreeSet(new GeneComparator(false)); + for (Gene g : c.getGenes()) + { + if (g.getPosition() >= 0) + { + chromosomeMapPositive.add(g); + } + else + { + chromosomeMapNegative.add(g); + } + } + + Random rng = new Random(); + Mapping first_mapping = new Mapping(); + TreeMap chromosomeMapping = new TreeMap(new GeneComparator(true)); + + Mapping last_mapping = new Mapping(first_mapping); + float last_distance = 0.0f; + for (Gene gene : chromosomeMapPositive) + { + Mapping mapping = new Mapping(last_mapping); + float dist = gene.getPosition(); + float magicAdjustment = 100f; // 4f/3f; // magic adjustment exists to adjust for thread swaping with itself and 100 for % + for (int thread = 0; thread < 4; thread++) + { + float probability = magicAdjustment * rng.nextFloat(); + int target = rng.nextInt(4); + if (probability <= Math.min(Math.abs(dist - last_distance), 50f)) + { + mapping.swap(thread, target); + } + } + chromosomeMapping.put(gene, mapping); + last_mapping = mapping; + last_distance = dist; + } + + last_mapping = new Mapping(first_mapping); + last_distance = 0.0f; + for (Gene gene : chromosomeMapNegative) + { + Mapping mapping = new Mapping(last_mapping); + float dist = gene.getPosition(); + float magicAdjustment = 100f; // 4f / 3f; // magic adjustment exists to adjust for thread swaping with itself + for (int thread = 0; thread < 4; thread++) + { + float probability = magicAdjustment * rng.nextFloat(); + int target = rng.nextInt(4); + if (probability <= Math.min(Math.abs(dist - last_distance), 50.0f)) + { + mapping.swap(thread, target); + } + } + chromosomeMapping.put(gene, mapping); + last_mapping = mapping; + last_distance = dist; + } + return chromosomeMapping; + } + + public CreatureSet getProgenies(String crateName, CreatureSet parents, int countFrom, int matings, RuleSet rules) throws MatingException + { + + Creature c1 = parents.get(0); + Creature c2 = parents.get(1); + + Random rng = new Random(); + CreatureSetImpl ret = new CreatureSetImpl(); + Genome genome = c1.getGenome(); + for (int pIndex = 0; pIndex < progeniesCount; pIndex++) + { + GeneticMakeupImpl[] makeups = new GeneticMakeupImpl[4]; + for (int i = 0; i < 4; i++) + { + makeups[i] = new GeneticMakeupImpl(); + } + for (Chromosome c : genome) + { + Map chromosomeMapping = getMapping(c1, c2, c); + for (int i = 0; i < 4; i++) + { + GeneticMakeupImpl makeup = makeups[i]; + for (Entry entry : chromosomeMapping.entrySet()) + { + Gene gene = entry.getKey(); + Mapping mapping = entry.getValue(); + Allele allele = null; + switch (mapping.order[i]) + { + case 0: + case 1: + allele = c1.getMakeup().get(gene).get(0); + break; + case 2: + case 3: + allele = c2.getMakeup().get(gene).get(0); + break; + + default: + throw new RuntimeException(Messages.getString("MatingEngineImpl_MAT.0")); //$NON-NLS-1$ + } + makeup.put(gene, new DiploidAllelesImpl(allele, null)); + } + } + } + int offset = rng.nextInt(4); + boolean[] sexArray = new boolean[4]; + int counter = 0; + do + { + sexArray[rng.nextInt(4)] = true; + counter = 0; + for (int i = 0; i < 4; i++) + { + if (sexArray[i]) + counter++; + } + } while (counter != 2); + + final String D[] = { "A", "B", "C", "D" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + for (int x = 0; x < 4; x++) + { + star.genetics.genetic.model.Creature.Sex thisSex = sexArray[x] ? star.genetics.genetic.model.Creature.Sex.MALE : star.genetics.genetic.model.Creature.Sex.FEMALE; + int i = (x + offset) % 4; + GeneticMakeup makeup = makeups[i]; + Map properties = rules.getProperties(makeup, thisSex); + CreatureImpl creature = new CreatureImpl(crateName + "-" + (countFrom / 4 + pIndex + 1) + D[x], genome, thisSex, makeup, matings, properties, parents); //$NON-NLS-1$ + ret.add(creature); + } + + } + return ret; + } +} diff --git a/src/star/genetics/genetic/impl/MatingEngineImpl_UNISEX.java b/src/star/genetics/genetic/impl/MatingEngineImpl_UNISEX.java new file mode 100644 index 0000000..5a1071d --- /dev/null +++ b/src/star/genetics/genetic/impl/MatingEngineImpl_UNISEX.java @@ -0,0 +1,69 @@ +package star.genetics.genetic.impl; + +import java.io.Serializable; +import java.util.TreeSet; + +import star.genetics.genetic.model.Allele; +import star.genetics.genetic.model.Chromosome; +import star.genetics.genetic.model.Creature; +import star.genetics.genetic.model.DiploidAlleles; +import star.genetics.genetic.model.Gene; +import star.genetics.genetic.model.GeneticMakeup; +import star.genetics.genetic.model.Genome; +import star.genetics.genetic.model.MatingEngine; + +public class MatingEngineImpl_UNISEX extends MatingEngineImpl_Common implements MatingEngine, Serializable +{ + + private static final long serialVersionUID = 1L; + float femaleRecombinationRate; + float twinningFrequency = 0; + float identicalTwinsFrequency = 0; + + public MatingEngineImpl_UNISEX(float femaleRecombinationRate, int progeniesCount) + { + super(progeniesCount, 0, 0); + this.femaleRecombinationRate = femaleRecombinationRate; + } + + protected GeneticMakeup mate(Genome genome, GeneticMakeup makeup1, Creature.Sex sex1, GeneticMakeup makeup2, Creature.Sex sex2) + { + GeneticMakeup makeup = new star.genetics.genetic.impl.GeneticMakeupImpl(); + boolean position1 = Math.random() < .5f; + boolean position2 = Math.random() < .5f; + star.genetics.genetic.model.Creature.Sex sex = null; + + float previousGenePosition = 0; + Chromosome previousChromosome = null; + TreeSet set = new TreeSet(); + set.addAll(genome.getGenes()); + for (Gene g : genome.getGenes()) + { + Chromosome c = g.getChromosome(); + if (previousChromosome != c) + { + position1 = Math.random() < .5f; + position2 = Math.random() < .5f; + previousGenePosition = 0; + previousChromosome = c; + } + DiploidAlleles allele1 = makeup1.get(g); + DiploidAlleles allele2 = makeup2.get(g); + float genePosition = g.getPosition(); + position1 = randomize(position1, genePosition - previousGenePosition, sex1); + position2 = randomize(position2, genePosition - previousGenePosition, sex2); + previousGenePosition = genePosition; + Allele a1 = allele1 != null ? allele1.get(position1 ? 0 : 1) : null; + Allele a2 = allele2 != null ? allele2.get(position2 ? 0 : 1) : null; + DiploidAlleles allele = new star.genetics.genetic.impl.DiploidAllelesImpl(a1, a2); + makeup.put(g, allele); + } + return makeup; + } + + private boolean randomize(boolean original, float distance, Creature.Sex sex) + { + return randomizeInternal(original, distance * femaleRecombinationRate, sex); + } + +} diff --git a/src/star/genetics/genetic/impl/MatingEngineImpl_XO.java b/src/star/genetics/genetic/impl/MatingEngineImpl_XO.java new file mode 100644 index 0000000..b40ab28 --- /dev/null +++ b/src/star/genetics/genetic/impl/MatingEngineImpl_XO.java @@ -0,0 +1,144 @@ +package star.genetics.genetic.impl; + +import java.io.Serializable; +import java.util.TreeSet; + +import star.genetics.genetic.model.Allele; +import star.genetics.genetic.model.Chromosome; +import star.genetics.genetic.model.Creature; +import star.genetics.genetic.model.DiploidAlleles; +import star.genetics.genetic.model.Gene; +import star.genetics.genetic.model.GeneticMakeup; +import star.genetics.genetic.model.Genome; +import star.genetics.genetic.model.MatingEngine; +import star.genetics.genetic.model.RuleSet; + +public class MatingEngineImpl_XO extends MatingEngineImpl_Common implements MatingEngine, Serializable +{ + private static final long serialVersionUID = 1L; + float maleRecombinationRate; + float femaleRecombinationRate; + float femaleSexRatio; + int progeniesCount; + float spontaniousMales; + float twinningFrequency = 0; + float identicalTwinsFrequency = 0; + + public MatingEngineImpl_XO(float maleRecombinationRate, float femaleRecombinationRate, float femaleSexRatio, int progeniesCount, float spontaniousMales) + { + super(progeniesCount, 0, 0); + this.maleRecombinationRate = maleRecombinationRate; + this.femaleRecombinationRate = femaleRecombinationRate; + this.femaleSexRatio = femaleSexRatio; + this.spontaniousMales = spontaniousMales; + } + + protected Creature mate(String crateName, Creature p1, Creature p2, String suffix, int matings, RuleSet rules) + { + if (p2 != null) + { + return super.mate(crateName, p1, p2, suffix, matings, rules); + } + else + { + return super.mate(crateName, p1, p1, suffix, matings, rules); + } + } + + protected GeneticMakeup mate(Genome genome, GeneticMakeup makeup1, Creature.Sex sex1, GeneticMakeup makeup2, Creature.Sex sex2) + { + GeneticMakeup makeup = new star.genetics.genetic.impl.GeneticMakeupImpl(); + boolean position1 = Math.random() < .5f; + boolean position2 = Math.random() < .5f; + star.genetics.genetic.model.Creature.Sex sex = Math.random() < femaleSexRatio ? star.genetics.genetic.model.Creature.Sex.FEMALE : star.genetics.genetic.model.Creature.Sex.MALE; + + float previousGenePosition = 0; + Chromosome previousChromosome = null; + TreeSet set = new TreeSet(); + set.addAll(genome.getGenes()); + for (Gene g : genome.getGenes()) + { + Chromosome c = g.getChromosome(); + if (previousChromosome != c) + { + position1 = Math.random() < .5f; + position2 = Math.random() < .5f; + previousGenePosition = 0; + previousChromosome = c; + } + DiploidAlleles allele1 = makeup1.get(g); + DiploidAlleles allele2 = makeup2.get(g); + float genePosition = g.getPosition(); + position1 = randomize(position1, genePosition - previousGenePosition, sex1); + position2 = randomize(position2, genePosition - previousGenePosition, sex2); + previousGenePosition = genePosition; + Allele a1 = allele1 != null ? allele1.get(position1 ? 0 : 1) : null; + Allele a2 = allele2 != null ? allele2.get(position2 ? 0 : 1) : null; + if (sex == star.genetics.genetic.model.Creature.Sex.FEMALE) + { + if (c.getName().equals("Y")) //$NON-NLS-1$ + { + continue; // female does not have Y genes + } + if (c.getName().equals("X")) //$NON-NLS-1$ + { + if (a1 == null) + { + a1 = allele1 != null ? allele1.get(!position1 ? 0 : 1) : null; + } + if (a2 == null) + { + a2 = allele2 != null ? allele2.get(!position2 ? 0 : 1) : null; + } + } + if (makeup1 == makeup2) + { + if (Math.random() < spontaniousMales) + { + a2 = null; + } + } + } + else + { + if (c.getName().equals("Y")) //$NON-NLS-1$ + { + if ((a1 != null ? 1 : 0) + (a2 != null ? 1 : 0) != 1) + { + if (allele1 != null && allele1.getAlleleCount() == 1) + { + a1 = allele1.get(!position1 ? 0 : 1); + } + if (allele2 != null && allele2.getAlleleCount() == 1) + { + a2 = allele2.get(!position2 ? 0 : 1); + } + } + } + if (c.getName().equals("X")) //$NON-NLS-1$ + { + if ((a1 != null ? 1 : 0) + (a2 != null ? 1 : 0) != 1) + { + if (allele1.getAlleleCount() == 1) + { + a1 = null; + } + if (allele2.getAlleleCount() == 1) + { + a2 = null; + } + } + } + } + DiploidAlleles allele = new star.genetics.genetic.impl.DiploidAllelesImpl(a1, a2); + makeup.put(g, allele); + } + return makeup; + } + + private boolean randomize(boolean original, float distance, Creature.Sex sex) + { + return randomizeInternal(original, distance * (Creature.Sex.MALE.equals(sex) ? maleRecombinationRate : femaleRecombinationRate), sex); + } + +} diff --git a/src/star/genetics/genetic/impl/MatingEngineImpl_XY.java b/src/star/genetics/genetic/impl/MatingEngineImpl_XY.java new file mode 100644 index 0000000..c4459cd --- /dev/null +++ b/src/star/genetics/genetic/impl/MatingEngineImpl_XY.java @@ -0,0 +1,169 @@ +package star.genetics.genetic.impl; + +import java.io.Serializable; +import java.util.Map; +import java.util.TreeSet; + +import star.genetics.genetic.model.Allele; +import star.genetics.genetic.model.Chromosome; +import star.genetics.genetic.model.Creature; +import star.genetics.genetic.model.CreatureSet; +import star.genetics.genetic.model.DiploidAlleles; +import star.genetics.genetic.model.Gene; +import star.genetics.genetic.model.GeneticMakeup; +import star.genetics.genetic.model.GeneticModel; +import star.genetics.genetic.model.Genome; +import star.genetics.genetic.model.MatingEngine; +import star.genetics.genetic.model.RuleSet; +import star.genetics.xls.ParseException; + +public class MatingEngineImpl_XY extends MatingEngineImpl_Common implements MatingEngine, Serializable +{ + private static final long serialVersionUID = 1L; + float maleRecombinationRate; + float femaleRecombinationRate; + float femaleSexRatio; + + public MatingEngineImpl_XY() + { + super(20, 0, 0); + this.maleRecombinationRate = 1f; + this.femaleRecombinationRate = 1f; + this.femaleSexRatio = .5f; + } + + public MatingEngineImpl_XY(float maleRecombinationRate, float femaleRecombinationRate, float femaleSexRatio, int progeniesCount, float twinningFrequency, float identicalTwinsFrequency) + { + super(progeniesCount, twinningFrequency, identicalTwinsFrequency); + this.maleRecombinationRate = maleRecombinationRate; + this.femaleRecombinationRate = femaleRecombinationRate; + this.femaleSexRatio = femaleSexRatio; + } + + protected Creature mate(String crateName, Creature p1, Creature p2, String suffix, int matings, RuleSet rules) + { + try + { + GeneticMakeup makeup = mate(p1.getGenome(), p1.getMakeup(), p1.getSex(), p2.getMakeup(), p2.getSex()); + + String name = crateName + suffix; + Genome genome = p1.getGenome(); + Creature.Sex sex = Sex.getSex(makeup, genome, name); + Map x = rules.getProperties(makeup, sex); + CreatureSet parents = new CreatureSetImpl(); + parents.add(p1); + parents.add(p2); + + boolean isLethal = false; + String lethal = x.get(GeneticModel.lethal); + if (lethal != null) + { + isLethal = Boolean.parseBoolean(lethal); + } + if (!isLethal) + { + star.genetics.genetic.impl.CreatureImpl ret = new star.genetics.genetic.impl.CreatureImpl(name, genome, sex, makeup, matings, x, parents); + return ret; + } + else + { + return null; + } + } + catch (ParseException e) + { + e.printStackTrace(); + return null; + } + } + + protected GeneticMakeup mate(Genome genome, GeneticMakeup makeup1, Creature.Sex sex1, GeneticMakeup makeup2, Creature.Sex sex2) + { + GeneticMakeup makeup = new star.genetics.genetic.impl.GeneticMakeupImpl(); + boolean position1 = Math.random() < .5f; + boolean position2 = Math.random() < .5f; + star.genetics.genetic.model.Creature.Sex sex = Math.random() < femaleSexRatio ? star.genetics.genetic.model.Creature.Sex.FEMALE : star.genetics.genetic.model.Creature.Sex.MALE; + + float previousGenePosition = 0; + Chromosome previousChromosome = null; + TreeSet set = new TreeSet(); + set.addAll(genome.getGenes()); + for (Gene g : set) + { + Chromosome c = g.getChromosome(); + if (previousChromosome != c) + { + position1 = Math.random() < .5f; + position2 = Math.random() < .5f; + previousGenePosition = g.getPosition(); + previousChromosome = c; + } + DiploidAlleles allele1 = makeup1.get(g); + DiploidAlleles allele2 = makeup2.get(g); + float genePosition = g.getPosition(); + position1 = randomize(position1, genePosition - previousGenePosition, sex1); + position2 = randomize(position2, genePosition - previousGenePosition, sex2); + previousGenePosition = genePosition; + Allele a1 = allele1 != null ? allele1.get(position1 ? 0 : 1) : null; + Allele a2 = allele2 != null ? allele2.get(position2 ? 0 : 1) : null; + if (sex == star.genetics.genetic.model.Creature.Sex.FEMALE) + { + if (c.getName().equals("Y")) //$NON-NLS-1$ + { + continue; // female does not have Y genes + } + if (c.getName().equals("X")) //$NON-NLS-1$ + { + if (a1 == null) + { + a1 = allele1 != null ? allele1.get(!position1 ? 0 : 1) : null; + } + if (a2 == null) + { + a2 = allele2 != null ? allele2.get(!position2 ? 0 : 1) : null; + } + } + } + else + { + if (c.getName().equals("Y")) //$NON-NLS-1$ + { + if ((a1 != null ? 1 : 0) + (a2 != null ? 1 : 0) != 1) + { + if (allele1 != null && allele1.getAlleleCount() == 1) + { + a1 = allele1.get(!position1 ? 0 : 1); + } + if (allele2 != null && allele2.getAlleleCount() == 1) + { + a2 = allele2.get(!position2 ? 0 : 1); + } + } + } + if (c.getName().equals("X")) //$NON-NLS-1$ + { + if ((a1 != null ? 1 : 0) + (a2 != null ? 1 : 0) != 1) + { + if (allele1.getAlleleCount() == 1) + { + a1 = null; + } + if (allele2.getAlleleCount() == 1) + { + a2 = null; + } + } + } + } + DiploidAlleles allele = new star.genetics.genetic.impl.DiploidAllelesImpl(a1, a2); + makeup.put(g, allele); + } + return makeup; + } + + private boolean randomize(boolean original, float distance, Creature.Sex sex) + { + return randomizeInternal(original, distance * (Creature.Sex.MALE.equals(sex) ? maleRecombinationRate : femaleRecombinationRate), sex); + } + +} diff --git a/src/star/genetics/genetic/impl/MatingEngineMetadata.java b/src/star/genetics/genetic/impl/MatingEngineMetadata.java new file mode 100644 index 0000000..99d554d --- /dev/null +++ b/src/star/genetics/genetic/impl/MatingEngineMetadata.java @@ -0,0 +1,36 @@ +package star.genetics.genetic.impl; + +import java.io.Serializable; + +import star.genetics.xls.Properties; + +public class MatingEngineMetadata implements Serializable +{ + private static final long serialVersionUID = 1L; + + private float twinningFrequency; + + private float identicalTwinsFrequency; + + public void set(Properties property, String value) + { + if (Properties.TWINNINGFREQUENCY.equals(property)) + { + twinningFrequency = Float.parseFloat(value); + } + if (Properties.IDENTICALTWINSFREQUENCY.equals(property)) + { + identicalTwinsFrequency = Float.parseFloat(value); + } + } + + public float getIdenticalTwinsFrequency() + { + return identicalTwinsFrequency; + } + + public float getTwinningFrequency() + { + return twinningFrequency; + } +} diff --git a/src/star/genetics/genetic/impl/MatingException.java b/src/star/genetics/genetic/impl/MatingException.java new file mode 100644 index 0000000..ddff741 --- /dev/null +++ b/src/star/genetics/genetic/impl/MatingException.java @@ -0,0 +1,11 @@ +package star.genetics.genetic.impl; + +public class MatingException extends Exception +{ + private static final long serialVersionUID = 1L; + + public MatingException(String reason) + { + super(reason); + } +} diff --git a/src/star/genetics/genetic/impl/ModelImpl.java b/src/star/genetics/genetic/impl/ModelImpl.java new file mode 100644 index 0000000..7ccc458 --- /dev/null +++ b/src/star/genetics/genetic/impl/ModelImpl.java @@ -0,0 +1,175 @@ +package star.genetics.genetic.impl; + +import java.io.Serializable; + +import star.genetics.genetic.model.CrateSet; +import star.genetics.genetic.model.Creature.Sex; +import star.genetics.genetic.model.GelRules; +import star.genetics.genetic.model.Genome; +import star.genetics.genetic.model.MatingEngine; +import star.genetics.genetic.model.ModelMetadata; +import star.genetics.visualizers.VisualizerFactory; + +public class ModelImpl implements star.genetics.genetic.model.ModelWriter, Serializable +{ + private static final long serialVersionUID = 1L; + + private Genome genome; + private star.genetics.genetic.model.CreatureSet creatures; + private star.genetics.genetic.model.RuleSet rules; + private MatingEngine mater = null; + private float maleRecombinationRate = 1f; + private float femaleRecombinationRate = 1f; + private int progeniesCount = 50; + private int matingsCount = Integer.MAX_VALUE; + private CrateSet crateSet = new CrateSetImpl(); + private VisualizerFactory visualFactory = null; + private GelRules gelRules; + private float spontaniousMales = 0.001f; + private ModelMetadata modelMetadata = new ModelMetadataImpl(); + + public void setVisualizerClass(String className) + { + visualFactory = new VisualizerFactoryImpl(className); + } + + public void setCreatures(star.genetics.genetic.model.CreatureSet creatures) + { + this.creatures = creatures; + } + + public void setRules(star.genetics.genetic.model.RuleSet rules) + { + this.rules = rules; + + } + + public star.genetics.genetic.model.RuleSet getRules() + { + return rules; + } + + public void setMater(MatingEngineImpl_XY mater) + { + this.mater = mater; + } + + public void setRecombinationRate(float rate, Sex sex) + { + if (Sex.MALE.equals(sex)) + { + maleRecombinationRate = rate; + } + else + { + femaleRecombinationRate = rate; + } + } + + public void setGenome(Genome genome) + { + this.genome = genome; + } + + public Genome getGenome() + { + return genome; + } + + public MatingEngine getMatingEngine() + { + if (mater == null) + { + if (Genome.SexType.XY.equals(getGenome().getSexType())) + { + float twinning = 0; + float identical = 0; + MatingEngineMetadata md = (MatingEngineMetadata) modelMetadata.get(MatingEngineMetadata.class); + if (md != null) + { + twinning = md.getTwinningFrequency(); + identical = md.getIdenticalTwinsFrequency(); + } + mater = new MatingEngineImpl_XY(maleRecombinationRate, femaleRecombinationRate, 0.5f, progeniesCount, twinning, identical); + } + else if (Genome.SexType.XO.equals(getGenome().getSexType())) + { + mater = new MatingEngineImpl_XO(maleRecombinationRate, femaleRecombinationRate, 0.5f, progeniesCount, spontaniousMales); + } + else if (Genome.SexType.Aa.equals(getGenome().getSexType())) + { + mater = new MatingEngineImpl_MAT(maleRecombinationRate, femaleRecombinationRate, 0.5f, progeniesCount); + } + else if (Genome.SexType.UNISEX.equals(getGenome().getSexType())) + { + mater = new MatingEngineImpl_UNISEX(femaleRecombinationRate, progeniesCount); + } + } + return mater; + } + + public star.genetics.genetic.model.CreatureSet getCreatures() + { + return creatures; + } + + public float getRecombinationRate(Sex sex) + { + return (Sex.MALE.equals(sex)) ? maleRecombinationRate : femaleRecombinationRate; + } + + public CrateSet getCrateSet() + { + return crateSet; + } + + public int getProgeniesCount() + { + return progeniesCount; + } + + public VisualizerFactory getVisualizerFactory() + { + return visualFactory; + } + + public void setProgeniesCount(int progeniesCount) + { + this.progeniesCount = progeniesCount; + if (this.progeniesCount < 1) + { + this.progeniesCount = 1; + } + } + + public void setMatingsCount(int matingsCount) + { + this.matingsCount = matingsCount; + } + + public int getMatingsCount() + { + return matingsCount; + } + + public void setSpontaniousMales(float ratio) + { + this.spontaniousMales = ratio; + } + + public void setGelRules(GelRules gri) + { + this.gelRules = gri; + } + + public GelRules getGelRules() + { + return gelRules; + } + + @Override + public ModelMetadata getModelMetadata() + { + return modelMetadata; + } +} diff --git a/src/star/genetics/genetic/impl/ModelMetadataImpl.java b/src/star/genetics/genetic/impl/ModelMetadataImpl.java new file mode 100644 index 0000000..5aafe64 --- /dev/null +++ b/src/star/genetics/genetic/impl/ModelMetadataImpl.java @@ -0,0 +1,24 @@ +package star.genetics.genetic.impl; + +import java.io.Serializable; +import java.util.HashMap; +import java.util.Map; + +import star.genetics.genetic.model.ModelMetadata; + +public class ModelMetadataImpl implements ModelMetadata, Serializable +{ + private static final long serialVersionUID = 2L; + Map data = new HashMap(); + + public Object get(Class c) + { + return data.get(c.getName()); + } + + public void put(Class c, Object o) + { + data.put(c.getName(), o); + } + +} diff --git a/src/star/genetics/genetic/impl/ModelPropertiesSheet.java b/src/star/genetics/genetic/impl/ModelPropertiesSheet.java new file mode 100644 index 0000000..4cd3b13 --- /dev/null +++ b/src/star/genetics/genetic/impl/ModelPropertiesSheet.java @@ -0,0 +1,22 @@ +package star.genetics.genetic.impl; + +import java.io.Serializable; +import java.util.HashMap; + +public class ModelPropertiesSheet implements Serializable +{ + + private static final long serialVersionUID = 1L; + + private HashMap map = new HashMap(); + + public void put(String key, String value) + { + map.put(key, value); + } + + public String get(String key) + { + return map.get(key); + } +} diff --git a/src/star/genetics/genetic/impl/ParentsSetImpl.java b/src/star/genetics/genetic/impl/ParentsSetImpl.java new file mode 100644 index 0000000..8d52cc8 --- /dev/null +++ b/src/star/genetics/genetic/impl/ParentsSetImpl.java @@ -0,0 +1,21 @@ +package star.genetics.genetic.impl; + +import star.genetics.genetic.model.ParentsSet; + +public class ParentsSetImpl extends CreatureSetImpl implements ParentsSet +{ + private static final long serialVersionUID = 1L; + + public boolean canMate() + { + if (size() == 2) + { + return true; + } + if (size() == 1) + { + + } + return false; + } +} diff --git a/src/star/genetics/genetic/impl/RuleImpl.java b/src/star/genetics/genetic/impl/RuleImpl.java new file mode 100644 index 0000000..4566c27 --- /dev/null +++ b/src/star/genetics/genetic/impl/RuleImpl.java @@ -0,0 +1,212 @@ +package star.genetics.genetic.impl; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.beans.StringTokenizer; + +import star.genetics.client.Messages; +import star.genetics.genetic.model.Allele; +import star.genetics.genetic.model.Chromosome; +import star.genetics.genetic.model.Creature; +import star.genetics.genetic.model.Gene; +import star.genetics.genetic.model.GeneticMakeup; +import star.genetics.genetic.model.Genome; +import star.genetics.genetic.model.Genome.SexType; + +public class RuleImpl implements star.genetics.genetic.model.Rule, Serializable +{ + private static final long serialVersionUID = 1L; + + private final String rule; + private final HashMap properties; + private final ArrayList compiledRules = new ArrayList(); + + public RuleImpl(String rule, HashMap properties, Genome g) + { + this.rule = rule; + this.properties = properties; + parseRules(rule, g); + } + + private void parseRules(String rule, Genome g) + { + compiledRules.clear(); + StringTokenizer ruleSplit = new StringTokenizer(rule, ";"); //$NON-NLS-1$ + while (ruleSplit.hasMoreTokens()) + { + String oneRule = ruleSplit.nextToken().trim(); + boolean isRuleParsed = false; + if (!isRuleParsed) + { + isRuleParsed = parseSexRule(oneRule, g); + } + if (!isRuleParsed) + { + isRuleParsed = parseHaploidRule(oneRule, g); + } + if (!isRuleParsed) + { + parseOneRule(oneRule, g); + } + } + } + + private boolean parseHaploidRule(String oneRule, Genome g) + { + boolean ret = false; + String s = oneRule.trim().toLowerCase(); + if (SexType.Aa.equals(g.getSexType())) + { + if (s.startsWith("haploid")) //$NON-NLS-1$ + { + ret = true; + compiledRules.add(new HaploidRuleImpl()); + } + } + return ret; + + } + + private boolean parseSexRule(String oneRule, Genome g) + { + boolean ret = false; + String s = oneRule.trim().toLowerCase(); + if (SexType.XY.equals(g.getSexType()) || SexType.XO.equals(g.getSexType())) + { + if (s.startsWith("sex:")) //$NON-NLS-1$ + { + s = s.replace(" ", ""); //$NON-NLS-1$ //$NON-NLS-2$ + if (s.equals("sex:male")) //$NON-NLS-1$ + { + ret = true; + compiledRules.add(new SexRuleImpl(Creature.Sex.MALE)); + } + else if (s.equals("sex:female")) //$NON-NLS-1$ + { + ret = true; + compiledRules.add(new SexRuleImpl(Creature.Sex.FEMALE)); + } + } + } + else if (SexType.Aa.equals(g.getSexType())) + { + if (s.startsWith("sex:")) //$NON-NLS-1$ + { + s = s.replace(" ", ""); //$NON-NLS-1$ //$NON-NLS-2$ + if (s.equals("sex:mata")) //$NON-NLS-1$ + { + ret = true; + compiledRules.add(new SexRuleImpl(Creature.Sex.MALE)); + } + else if (s.equals("sex:matalpha")) //$NON-NLS-1$ + { + ret = true; + compiledRules.add(new SexRuleImpl(Creature.Sex.FEMALE)); + } + } + } + return ret; + } + + private void parseOneRule(String oneRule, Genome g) + { + int chromosomeSplit = oneRule.indexOf(':'); + String chromosomeName = null; + Chromosome chromosome = null; + if (chromosomeSplit != -1) + { + chromosomeName = oneRule.substring(0, chromosomeSplit).trim(); + chromosome = g.getChromosomeByName(chromosomeName); + } + else + { + int indexC = oneRule.indexOf(','); + int indexS = oneRule.indexOf(' '); + if (indexC == -1) + { + indexC = oneRule.length(); + } + if (indexS == -1) + { + indexS = oneRule.length(); + } + int index = Math.min(indexC, indexS); + String alleleName = oneRule.substring(0, index); + for (Gene gene : g.getGenes()) + { + if (gene.getAlleleByName(alleleName) != null) + { + chromosome = gene.getChromosome(); + chromosomeName = chromosome.getName(); + } + } + } + if (chromosome != null) + { + String alleles = oneRule.substring(chromosomeSplit + 1).trim(); + ChromosomeRuleImpl cr = makeChromosomeRule(alleles, chromosome); + if (cr != null) + { + compiledRules.add(cr); + } + } + else + { + if (!"default".equalsIgnoreCase(oneRule.trim())) //$NON-NLS-1$ + { + throw new RuntimeException(Messages.getString("RuleImpl.2") + oneRule); //$NON-NLS-1$ + } + } + } + + private ChromosomeRuleImpl makeChromosomeRule(String alleles, Chromosome chromosome) + { + ChromosomeRuleImpl cr = new ChromosomeRuleImpl(chromosome); + StringTokenizer strandSplit = new StringTokenizer(alleles, ","); //$NON-NLS-1$ + boolean add = false; + int strand = 0; + while (strandSplit.hasMoreTokens()) + { + String strandRule = strandSplit.nextToken().trim(); + StringTokenizer allelesSplit = new StringTokenizer(strandRule, " "); //$NON-NLS-1$ + while (allelesSplit.hasMoreTokens()) + { + String alleleName = allelesSplit.nextToken().trim(); + Allele allele = chromosome.getAlleleByName(alleleName); + if (allele != null) + { + cr.addAllele(strand, allele); + add = true; + } + else + { + throw new RuntimeException(Messages.getString("RuleImpl.1") + " " + alleleName + " " + rule); //$NON-NLS-1$ + } + } + strand++; + } + return add ? cr : null; + } + + public boolean isDefault() + { + return DEFAULT.equalsIgnoreCase(rule); + } + + public boolean isMatching(GeneticMakeup makeup, Creature.Sex sex) + { + boolean ret = compiledRules.size() > 0; + for (IndividualRule c : compiledRules) + { + ret &= c.test(makeup, sex); + } + return ret; + } + + public HashMap getProperties() + { + return properties; + } + +} diff --git a/src/star/genetics/genetic/impl/RuleSetImpl.java b/src/star/genetics/genetic/impl/RuleSetImpl.java new file mode 100644 index 0000000..4a211c4 --- /dev/null +++ b/src/star/genetics/genetic/impl/RuleSetImpl.java @@ -0,0 +1,95 @@ +package star.genetics.genetic.impl; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import java.util.TreeMap; + +import star.genetics.client.Helper; +import star.genetics.genetic.model.Creature; +import star.genetics.genetic.model.GeneticMakeup; +import star.genetics.genetic.model.Rule; + +public class RuleSetImpl extends ArrayList implements star.genetics.genetic.model.RuleSet +{ + private static final long serialVersionUID = 1L; + + LinkedHashSet propertyNames = new LinkedHashSet(); + + public RuleSetImpl(LinkedHashSet orderedSet) + { + propertyNames = orderedSet; + } + + public RuleSetImpl() + { + } + + public Map getProperties(GeneticMakeup genotype, Creature.Sex sex) + { + Map ret = new TreeMap(); + initialize(ret); + for (Rule r : this) + { + if (r.isMatching(genotype, sex)) + { + combine(ret, r.getProperties()); + } + } + LinkedHashMap retRule = new LinkedHashMap(); + for (String key : propertyNames) + { + if (ret.containsKey(key)) + { + retRule.put(key, ret.get(key)); + } + } + return retRule; + } + + private void combine(Map target, Map source) + { + for (Entry entry : source.entrySet()) + { + String key = entry.getKey(); + String value = entry.getValue(); + if (value.indexOf('=') != -1 && target.containsKey(key)) + { + String old_value = target.get(key); + Map state = Helper.parse(old_value); + Map update = Helper.parse(value); + state.putAll(update); + value = Helper.export(state); + } + target.put(key, value); + } + } + + @Override + public boolean add(Rule rule) + { + propertyNames.addAll(rule.getProperties().keySet()); + return super.add(rule); + } + + private void initialize(Map ret) + { + for (Rule r : this) + { + if (r.isDefault()) + { + ret.putAll(r.getProperties()); + } + } + } + + public Set getPropertyNames() + { + return Collections.unmodifiableSet(propertyNames); + } + +} \ No newline at end of file diff --git a/src/star/genetics/genetic/impl/Sex.java b/src/star/genetics/genetic/impl/Sex.java new file mode 100644 index 0000000..08cec8b --- /dev/null +++ b/src/star/genetics/genetic/impl/Sex.java @@ -0,0 +1,103 @@ +package star.genetics.genetic.impl; + + +import star.genetics.client.Messages; +import star.genetics.genetic.model.Chromosome; +import star.genetics.genetic.model.Creature; +import star.genetics.genetic.model.DiploidAlleles; +import star.genetics.genetic.model.Gene; +import star.genetics.genetic.model.GeneticMakeup; +import star.genetics.genetic.model.Genome; +import star.genetics.xls.ParseException; + +public class Sex +{ + public static Creature.Sex getSex(GeneticMakeup makeup, Genome genome, String name) throws ParseException + { + if (genome.getSexType() == Genome.SexType.XY) + { + Chromosome c = genome.getChromosomeByName("Y"); //$NON-NLS-1$ + // this algorithm assumes that + // if there are any 0-s or 2-s on y chromosome than $ones will note be one + // if there are any 1-s on y chromosome that $zeros will not be zero + int ones = 1; + int zeros = 0; + + if (c != null) + { + for (Gene g : c.getGenes()) + { + DiploidAlleles alleles = makeup.get(g); + int count = alleles != null ? alleles.getAlleleCount() : 0; + ones *= count; + zeros += count; + } + } + if (ones == 1) + { + // all y chromosome genes DiploidAlleles have one gene on them -- male + Chromosome c2 = genome.getChromosomeByName("X"); //$NON-NLS-1$ + for (Gene g : c2.getGenes()) + { + if (makeup.get(g).getAlleleCount() != 1) + { + throw new ParseException(Messages.getString("Sex.2") + name); //$NON-NLS-1$ + } + } + return Creature.Sex.MALE; + } + if (zeros == 0) + { + // all y chromosome genes DiploidAlleles have no gene on them -- female + Chromosome c2 = genome.getChromosomeByName("X"); //$NON-NLS-1$ + for (Gene g : c2.getGenes()) + { + if (makeup.get(g).getAlleleCount() != 2) + { + throw new ParseException(Messages.getString("Sex.4") + name); //$NON-NLS-1$ + } + } + return Creature.Sex.FEMALE; + + } + throw new ParseException(Messages.getString("Sex.5") + " " + name); //$NON-NLS-1$ + } + else if (genome.getSexType() == Genome.SexType.XO) + { + int xx = 0; + int x = 0; + Chromosome c2 = genome.getChromosomeByName("X"); //$NON-NLS-1$ + for (Gene g : c2.getGenes()) + { + int count = makeup.get(g).getAlleleCount(); + if (count == 2) + { + xx++; + } + else if (count == 1) + { + x++; + } + else + { + throw new ParseException(Messages.getString("Sex.7") + " " + name); //$NON-NLS-1$ + } + } + if (xx == 0 && x == 0) + { + throw new ParseException(Messages.getString("Sex.8") + name); //$NON-NLS-1$ + + } + if (xx != 0 && x != 0) + { + throw new ParseException(Messages.getString("Sex.9")+ " "+ name); //$NON-NLS-1$ + } + return x != 0 ? Creature.Sex.MALE : Creature.Sex.FEMALE; + } + else + { + throw new ParseException(Messages.getString("Sex.10")); //$NON-NLS-1$ + } + } + +} diff --git a/src/star/genetics/genetic/impl/SexRuleImpl.java b/src/star/genetics/genetic/impl/SexRuleImpl.java new file mode 100644 index 0000000..eba2ef9 --- /dev/null +++ b/src/star/genetics/genetic/impl/SexRuleImpl.java @@ -0,0 +1,24 @@ +package star.genetics.genetic.impl; + +import java.io.Serializable; + +import star.genetics.genetic.model.Creature.Sex; +import star.genetics.genetic.model.GeneticMakeup; + +public class SexRuleImpl implements IndividualRule, Serializable +{ + private static final long serialVersionUID = 1L; + private Sex s; + + public SexRuleImpl(Sex s) + { + this.s = s; + } + + public boolean test(GeneticMakeup makeup, Sex sex) + { + + return s.equals(sex); + } + +} diff --git a/src/star/genetics/genetic/impl/SimpleEntry.java b/src/star/genetics/genetic/impl/SimpleEntry.java new file mode 100644 index 0000000..efd104d --- /dev/null +++ b/src/star/genetics/genetic/impl/SimpleEntry.java @@ -0,0 +1,50 @@ +package star.genetics.genetic.impl; + +import java.io.Serializable; +import java.util.Map.Entry; + +import star.genetics.utils.Equals; + +public class SimpleEntry implements Entry, Serializable +{ + + private static final long serialVersionUID = 1L; + K key; + V value; + + public SimpleEntry(K key, V value) + { + this.key = key; + this.value = value; + } + + public K getKey() + { + + return key; + } + + public V getValue() + { + return value; + } + + public V setValue(V value) + { + V old = this.value; + this.value = value; + return old; + } + + @Override + public boolean equals(Object obj) + { + if (obj instanceof Entry) + { + @SuppressWarnings("unchecked") + Entry that = (Entry) obj; + return Equals.isEquals(this.getKey(), that.getKey()) && Equals.isEquals(this.getValue(), that.getValue()); + } + return false; + } +} diff --git a/src/star/genetics/genetic/impl/Summary.java b/src/star/genetics/genetic/impl/Summary.java new file mode 100644 index 0000000..d59b7b8 --- /dev/null +++ b/src/star/genetics/genetic/impl/Summary.java @@ -0,0 +1,88 @@ +package star.genetics.genetic.impl; + +import java.awt.Dimension; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.Map; +import java.util.TreeMap; +import java.util.TreeSet; + +import star.genetics.genetic.model.Creature.Sex; +import star.genetics.visualizers.Visualizer; + +public class Summary implements Iterable +{ + private TreeMap count = new TreeMap(); + private TreeMap count_female = new TreeMap(); + private TreeMap maps = new TreeMap(); + private TreeMap> stringMap = new TreeMap>(); + private TreeSet allProperties = new TreeSet(); + + public void add(Visualizer v, Sex sex) + { + Map tooltipProperties = v.getTooltipProperties(); + String key = tooltipProperties.toString(); + if (Sex.FEMALE.equals(sex)) + { + if (count_female.containsKey(key)) + { + count_female.put(key, count_female.get(key).intValue() + 1); + } + else + { + count_female.put(key, 1); + } + } + + if (count.containsKey(key)) + { + count.put(key, count.get(key).intValue() + 1); + } + else + { + count.put(key, 1); + v.setName(""); //$NON-NLS-1$ + v.setSex(null); + //JComponent c = v.getJComponent(); + Object c = v; + //Dimension d = c.getPreferredSize(); +// d.height = d.height * 3 / 4; +// d.width = d.width * 3 / 4; +// c.setSize(d); + maps.put(key, c); + stringMap.put(key, tooltipProperties); + allProperties.addAll(tooltipProperties.keySet()); + } + } + + public Iterator iterator() + { + return maps.keySet().iterator(); + } + + public int getCount(String key) + { + return count.containsKey(key) ? count.get(key) : 0; + } + + public int getCountFemale(String key) + { + return count_female.containsKey(key) ? count_female.get(key) : 0; + } + + public Object getComponent(String key) + { + return maps.get(key); + } + + public Map getProperties(String key) + { + return stringMap.get(key); + } + + public ArrayList getProperties() + { + return new ArrayList(allProperties); + } + +} diff --git a/src/star/genetics/genetic/impl/Utilities.java b/src/star/genetics/genetic/impl/Utilities.java new file mode 100644 index 0000000..aa9417c --- /dev/null +++ b/src/star/genetics/genetic/impl/Utilities.java @@ -0,0 +1,115 @@ +package star.genetics.genetic.impl; + +import star.genetics.genetic.model.Allele; +import star.genetics.genetic.model.Chromosome; +import star.genetics.genetic.model.Creature; +import star.genetics.genetic.model.DiploidAlleles; +import star.genetics.genetic.model.Gene; +import star.genetics.genetic.model.GeneticMakeup; +import star.genetics.genetic.model.Genome; + +public class Utilities +{ + + public static void printCreature2(Creature c) + { + try + { + StringBuilder trow = new StringBuilder(); + StringBuilder brow = new StringBuilder(); + StringBuilder sb = new StringBuilder(); + sb.append(c.getName()); + sb.append(" "); //$NON-NLS-1$ + + Genome genome = c.getGenome(); + GeneticMakeup makeup = c.getMakeup(); + for (Chromosome chromosome : genome) + { + trow.append(chromosome.getName() + " [ "); //$NON-NLS-1$ + brow.append(chromosome.getName() + " [ "); //$NON-NLS-1$ + for (Gene gene : chromosome.getGenes()) + { + DiploidAlleles alleles = makeup.get(gene); + Allele ta = alleles.get(0); + Allele ba = alleles.get(1); + + String ts = ta != null ? ta.getName() : "."; //$NON-NLS-1$ + String bs = ba != null ? ba.getName() : "."; //$NON-NLS-1$ + + if (ts.length() < bs.length()) + { + ts = ts + " "; //$NON-NLS-1$ + } + + if (bs.length() < ts.length()) + { + bs = bs + " "; //$NON-NLS-1$ + } + + trow.append(ts); + trow.append(" "); //$NON-NLS-1$ + brow.append(bs); + brow.append(" "); //$NON-NLS-1$ + + } + trow.append("] "); //$NON-NLS-1$ + brow.append("] "); //$NON-NLS-1$ + } + sb.append("\n"); //$NON-NLS-1$ + sb.append("\t"); //$NON-NLS-1$ + sb.append(trow); + sb.append("\n"); //$NON-NLS-1$ + sb.append("\t"); //$NON-NLS-1$ + sb.append(brow); + System.out.println(sb); + } + catch (Exception ex) + { + ex.printStackTrace(); + } + } + + public static void printCreature(Creature c) + { + StringBuilder sb = new StringBuilder(); + GeneticMakeup gm = c.getMakeup(); + sb.append(c.getName()); + sb.append(" "); //$NON-NLS-1$ + if (gm instanceof GeneticMakeupImpl) + { + GeneticMakeupImpl gmi = (GeneticMakeupImpl) gm; + sb.append(gmi.toShortString()); + } + else + { + sb.append(gm.toString()); + } + System.out.println(sb); + } + + public static boolean compare(Allele a1, Allele a2) + { + if (a1 == null) + { + return a2 == null; + } + else + { + if (a2 == null) + { + return false; + } + else + { + return a1.equals(a2); + } + } + } + + public static long startup = System.currentTimeMillis(); + + public static void log(String str) + { + System.err.println(str + ":" + (System.currentTimeMillis() - startup) + "ms."); //$NON-NLS-1$ //$NON-NLS-2$ + } +} diff --git a/src/star/genetics/genetic/impl/VisualizerFactoryImpl.java b/src/star/genetics/genetic/impl/VisualizerFactoryImpl.java new file mode 100644 index 0000000..dc90cf6 --- /dev/null +++ b/src/star/genetics/genetic/impl/VisualizerFactoryImpl.java @@ -0,0 +1,42 @@ +package star.genetics.genetic.impl; + +import java.io.Serializable; +import java.text.MessageFormat; + +import star.genetics.client.Messages; +import star.genetics.visualizers.Visualizer; +import star.genetics.visualizers.VisualizerFactory; + +public class VisualizerFactoryImpl implements VisualizerFactory, Serializable +{ + private static final long serialVersionUID = 1L; + private String visualizerClassName = null; + private transient Class visualizerClass = null; + + public VisualizerFactoryImpl(String name) + { + visualizerClassName = name; + newVisualizerInstance(); + } + + public Visualizer newVisualizerInstance() + { + return null; + // TODO: switch statement + +// if (visualizerClass == null) +// { +// initializeClass(); +// } +// try +// { +// return visualizerClass.newInstance(); +// } +// catch (Exception ex) +// { +// ex.printStackTrace(); +// throw new RuntimeException(ex); +// } + } + +} diff --git a/src/star/genetics/genetic/impl/YeastUIMetadata.java b/src/star/genetics/genetic/impl/YeastUIMetadata.java new file mode 100644 index 0000000..937bfb9 --- /dev/null +++ b/src/star/genetics/genetic/impl/YeastUIMetadata.java @@ -0,0 +1,41 @@ +package star.genetics.genetic.impl; + +import java.io.Serializable; + +public class YeastUIMetadata implements Serializable +{ + private static final long serialVersionUID = 1L; + + public enum Experiments + { + TETRAD, NONTETRAD, BOTH + }; + + private Experiments exp = Experiments.BOTH; + + public YeastUIMetadata() + { + } + + public void setExperimentType(String value) + { + if ("tetrad".equalsIgnoreCase(value)) //$NON-NLS-1$ + { + exp = Experiments.TETRAD; + } + else if ("non-tetrad".equalsIgnoreCase(value)) //$NON-NLS-1$ + { + exp = Experiments.NONTETRAD; + } + else + { + exp = Experiments.BOTH; + } + } + + public Experiments getExperimentType() + { + return exp; + } + +} diff --git a/src/star/genetics/genetic/model/Allele.java b/src/star/genetics/genetic/model/Allele.java new file mode 100644 index 0000000..23b887a --- /dev/null +++ b/src/star/genetics/genetic/model/Allele.java @@ -0,0 +1,8 @@ +package star.genetics.genetic.model; + +public interface Allele +{ + public String getName(); + + public Gene getGene(); +} diff --git a/src/star/genetics/genetic/model/Chromosome.java b/src/star/genetics/genetic/model/Chromosome.java new file mode 100644 index 0000000..34a3b88 --- /dev/null +++ b/src/star/genetics/genetic/model/Chromosome.java @@ -0,0 +1,14 @@ +package star.genetics.genetic.model; + +import java.util.Collection; + +public interface Chromosome +{ + public String getName(); + + public Allele getAlleleByName(String name); + + public Gene getGeneByName(String name); + + public Collection getGenes(); +} diff --git a/src/star/genetics/genetic/model/CrateExperimentMetadata.java b/src/star/genetics/genetic/model/CrateExperimentMetadata.java new file mode 100644 index 0000000..5c9801c --- /dev/null +++ b/src/star/genetics/genetic/model/CrateExperimentMetadata.java @@ -0,0 +1,8 @@ +package star.genetics.genetic.model; + +public interface CrateExperimentMetadata +{ + Object get(Class c); + + void put(Class c, Object o); +} diff --git a/src/star/genetics/genetic/model/CrateModel.java b/src/star/genetics/genetic/model/CrateModel.java new file mode 100644 index 0000000..f47af5c --- /dev/null +++ b/src/star/genetics/genetic/model/CrateModel.java @@ -0,0 +1,21 @@ +package star.genetics.genetic.model; + +public interface CrateModel +{ + public CreatureSet getParents(); + + public CreatureSet getProgenies(); + + public String getName(); + + public void setName(String name); + + public boolean isVisible(); + + public void setVisible(boolean visible); + + public CrateExperimentMetadata getMetadata(); + + public String getUUID(); + +} diff --git a/src/star/genetics/genetic/model/CrateSet.java b/src/star/genetics/genetic/model/CrateSet.java new file mode 100644 index 0000000..a9d8f7e --- /dev/null +++ b/src/star/genetics/genetic/model/CrateSet.java @@ -0,0 +1,14 @@ +package star.genetics.genetic.model; + +import java.util.Iterator; + +public interface CrateSet extends Iterable +{ + CrateModel current(); + + Iterator iterator(); + + CrateModel newCrateModel(); + + int size(); +} diff --git a/src/star/genetics/genetic/model/Creature.java b/src/star/genetics/genetic/model/Creature.java new file mode 100644 index 0000000..7f453da --- /dev/null +++ b/src/star/genetics/genetic/model/Creature.java @@ -0,0 +1,39 @@ +package star.genetics.genetic.model; + +import java.util.Map; + +public interface Creature extends Comparable +{ + public static enum Sex + { + MALE, FEMALE; + }; + + public String getName(); + + public Genome getGenome(); + + public GeneticMakeup getMakeup(); + + public Sex getSex(); + + public boolean isReadOnly(); + + public void setName(String string); + + public void setReadOnly(boolean selected); + + public String getNote(); + + public void setNote(String string); + + public boolean isMateable(); + + public void mated(); + + public Map getProperties(); + + public CreatureSet getParents(); + + public String getUUID(); +} diff --git a/src/star/genetics/genetic/model/CreatureSet.java b/src/star/genetics/genetic/model/CreatureSet.java new file mode 100644 index 0000000..efcb082 --- /dev/null +++ b/src/star/genetics/genetic/model/CreatureSet.java @@ -0,0 +1,24 @@ +package star.genetics.genetic.model; + +import star.genetics.utils.PropertyChangeRaiser; + +public interface CreatureSet extends Iterable, PropertyChangeRaiser +{ + public void add(Creature c); + + public void add(Creature c, int index); + + public void set(Creature c, int index); + + public Creature get(int index); + + public boolean contains(Creature c); + + public void remove(Creature c); + + public void move(Creature c, int newIndex); + + public void clear(); + + public int size(); +} diff --git a/src/star/genetics/genetic/model/DiploidAlleles.java b/src/star/genetics/genetic/model/DiploidAlleles.java new file mode 100644 index 0000000..6436a9d --- /dev/null +++ b/src/star/genetics/genetic/model/DiploidAlleles.java @@ -0,0 +1,8 @@ +package star.genetics.genetic.model; + +public interface DiploidAlleles +{ + public int getAlleleCount(); + + Allele get(int c); +} diff --git a/src/star/genetics/genetic/model/Gel.java b/src/star/genetics/genetic/model/Gel.java new file mode 100644 index 0000000..8d0d64e --- /dev/null +++ b/src/star/genetics/genetic/model/Gel.java @@ -0,0 +1,11 @@ +package star.genetics.genetic.model; + +public interface Gel extends Iterable +{ + String getName(); + + int getIndex(); + + void addGelPosition(GelPosition gp); + +} diff --git a/src/star/genetics/genetic/model/GelPosition.java b/src/star/genetics/genetic/model/GelPosition.java new file mode 100644 index 0000000..f319549 --- /dev/null +++ b/src/star/genetics/genetic/model/GelPosition.java @@ -0,0 +1,10 @@ +package star.genetics.genetic.model; + +public interface GelPosition +{ + Gel getGel(); + + Float[] getPosition(); + + Allele getAllele(); +} diff --git a/src/star/genetics/genetic/model/GelRules.java b/src/star/genetics/genetic/model/GelRules.java new file mode 100644 index 0000000..84956be --- /dev/null +++ b/src/star/genetics/genetic/model/GelRules.java @@ -0,0 +1,12 @@ +package star.genetics.genetic.model; + +public interface GelRules +{ + Iterable getAllGelNames(); + + Iterable getGel(Iterable alleles); + + Iterable getAllGelPositions(); + + int sizeGels(); +} diff --git a/src/star/genetics/genetic/model/Gene.java b/src/star/genetics/genetic/model/Gene.java new file mode 100644 index 0000000..247869a --- /dev/null +++ b/src/star/genetics/genetic/model/Gene.java @@ -0,0 +1,20 @@ +package star.genetics.genetic.model; + +import java.io.Serializable; +import java.util.List; + +public interface Gene extends Serializable, Comparable +{ + Chromosome getChromosome(); + + Allele getAlleleByName(String name); + + List getGeneTypes(); + + String getId(); + + String getName(); + + float getPosition(); + +} diff --git a/src/star/genetics/genetic/model/GeneticMakeup.java b/src/star/genetics/genetic/model/GeneticMakeup.java new file mode 100644 index 0000000..574ebb7 --- /dev/null +++ b/src/star/genetics/genetic/model/GeneticMakeup.java @@ -0,0 +1,17 @@ +package star.genetics.genetic.model; + +import java.util.Map.Entry; + +public interface GeneticMakeup +{ + boolean containsKey(Gene g); + + DiploidAlleles get(Gene g); + + // TODO: revisit + DiploidAlleles put(Gene g, DiploidAlleles d); + + boolean test(Chromosome c, java.util.Map map); + + Iterable> entrySet(); +} diff --git a/src/star/genetics/genetic/model/GeneticModel.java b/src/star/genetics/genetic/model/GeneticModel.java new file mode 100644 index 0000000..9e8a3b9 --- /dev/null +++ b/src/star/genetics/genetic/model/GeneticModel.java @@ -0,0 +1,13 @@ +package star.genetics.genetic.model; + +import star.genetics.visualizers.VisualizerFactory; + +public interface GeneticModel +{ + final static String sterile = "Sterile"; + final static String lethal = "Lethal"; + final static String matings = "Matings"; + + VisualizerFactory getVisualizerFactory(); + +} diff --git a/src/star/genetics/genetic/model/Genome.java b/src/star/genetics/genetic/model/Genome.java new file mode 100644 index 0000000..45db9bd --- /dev/null +++ b/src/star/genetics/genetic/model/Genome.java @@ -0,0 +1,71 @@ +package star.genetics.genetic.model; + +import java.util.Collection; + +import star.genetics.genetic.model.Creature.Sex; + +public interface Genome extends Iterable +{ + public static enum SexType + { + XY(new String[] { "XY/XX", "XY", "XX/XY" }, new String[] { "XX", "xx", "Xx" }), // + XO(new String[] { "XX/X0", "X0", "XO", "XX/XO" }, new String[] { "XX", "xx", "Xx" }), // + Aa(new String[] { "MetA/Meta", "MATAa", "MATa/MATalpha" }, new String[] { "Alpha", "alpha" }), UNISEX(new String[] { "Unisex", "Self", "Hermafrodit" }, new String[] {}); + + private final String[] name; + private final String[] female; + + private SexType(String[] name, String[] female) + { + this.name = name; + this.female = female; + } + + public static SexType parse(String sexType) + { + SexType ret = null; + for (SexType t : SexType.values()) + { + for (String s : t.name) + { + if (sexType.equalsIgnoreCase(s)) + { + ret = t; + } + } + } + return ret; + } + + public Creature.Sex parseSex(String sex) + { + Creature.Sex ret = Sex.MALE; + for (String str : female) + { + if (str.equals(sex)) + { + ret = Sex.FEMALE; + break; + } + } + return ret; + } + + }; + + Chromosome getChromosomeByName(String name); + + void removeChromosome(Chromosome c); + + void addChromosome(Chromosome c); + + Collection getGenes(); + + SexType getSexType(); + + void setSexType(String x); + + String getName(); + + void setName(String name); +} diff --git a/src/star/genetics/genetic/model/MatingEngine.java b/src/star/genetics/genetic/model/MatingEngine.java new file mode 100644 index 0000000..d561c23 --- /dev/null +++ b/src/star/genetics/genetic/model/MatingEngine.java @@ -0,0 +1,8 @@ +package star.genetics.genetic.model; + +import star.genetics.genetic.impl.MatingException; + +public interface MatingEngine +{ + public CreatureSet getProgenies(String crateName, CreatureSet parents, int countFrom, int matings, RuleSet set) throws MatingException; +} diff --git a/src/star/genetics/genetic/model/Model.java b/src/star/genetics/genetic/model/Model.java new file mode 100644 index 0000000..524babd --- /dev/null +++ b/src/star/genetics/genetic/model/Model.java @@ -0,0 +1,22 @@ +package star.genetics.genetic.model; + +public interface Model extends GeneticModel +{ + Genome getGenome(); + + CreatureSet getCreatures(); + + MatingEngine getMatingEngine(); + + CrateSet getCrateSet(); + + int getMatingsCount(); + + RuleSet getRules(); + + GelRules getGelRules(); + + ModelMetadata getModelMetadata(); + + int getProgeniesCount(); +} diff --git a/src/star/genetics/genetic/model/ModelMetadata.java b/src/star/genetics/genetic/model/ModelMetadata.java new file mode 100644 index 0000000..0dab01f --- /dev/null +++ b/src/star/genetics/genetic/model/ModelMetadata.java @@ -0,0 +1,8 @@ +package star.genetics.genetic.model; + +public interface ModelMetadata +{ + Object get(Class c); + + void put(Class c, Object o); +} diff --git a/src/star/genetics/genetic/model/ModelModifiedProvider.java b/src/star/genetics/genetic/model/ModelModifiedProvider.java new file mode 100644 index 0000000..ab37cf9 --- /dev/null +++ b/src/star/genetics/genetic/model/ModelModifiedProvider.java @@ -0,0 +1,10 @@ +package star.genetics.genetic.model; + +public interface ModelModifiedProvider +{ + void modelSaved(); + + boolean isModelModified(); + + void saveModel(); +} diff --git a/src/star/genetics/genetic/model/ModelWriter.java b/src/star/genetics/genetic/model/ModelWriter.java new file mode 100644 index 0000000..fbc6e8b --- /dev/null +++ b/src/star/genetics/genetic/model/ModelWriter.java @@ -0,0 +1,28 @@ +package star.genetics.genetic.model; + +import star.genetics.genetic.model.Creature.Sex; + +public interface ModelWriter extends Model +{ + public void setVisualizerClass(String clazz); + + public void setCreatures(CreatureSet set); + + public void setRules(RuleSet set); + + public void setRecombinationRate(float value, Sex sex); + + public void setProgeniesCount(int value); + + public int getProgeniesCount(); + + public void setGenome(Genome genome); + + public void setMatingsCount(int matingsCount); + + public int getMatingsCount(); + + public void setGelRules(GelRules gri); + + public void setSpontaniousMales(float spontaniousMales); +} diff --git a/src/star/genetics/genetic/model/ParentsSet.java b/src/star/genetics/genetic/model/ParentsSet.java new file mode 100644 index 0000000..ead52e5 --- /dev/null +++ b/src/star/genetics/genetic/model/ParentsSet.java @@ -0,0 +1,6 @@ +package star.genetics.genetic.model; + +public interface ParentsSet extends CreatureSet +{ + public boolean canMate(); +} diff --git a/src/star/genetics/genetic/model/Rule.java b/src/star/genetics/genetic/model/Rule.java new file mode 100644 index 0000000..ce41c5a --- /dev/null +++ b/src/star/genetics/genetic/model/Rule.java @@ -0,0 +1,14 @@ +package star.genetics.genetic.model; + +import java.util.HashMap; + +public interface Rule +{ + static final String DEFAULT = "Default"; + + public HashMap getProperties(); + + public boolean isDefault(); + + public boolean isMatching(GeneticMakeup makeup, Creature.Sex sex); +} diff --git a/src/star/genetics/genetic/model/RuleSet.java b/src/star/genetics/genetic/model/RuleSet.java new file mode 100644 index 0000000..42f709b --- /dev/null +++ b/src/star/genetics/genetic/model/RuleSet.java @@ -0,0 +1,13 @@ +package star.genetics.genetic.model; + +import java.util.Map; +import java.util.Set; + +public interface RuleSet +{ + public boolean add(Rule rule); + + public Map getProperties(GeneticMakeup genotype, Creature.Sex sex); + + public Set getPropertyNames(); +} diff --git a/src/star/genetics/shared/FieldVerifier.java b/src/star/genetics/shared/FieldVerifier.java new file mode 100644 index 0000000..24ff66d --- /dev/null +++ b/src/star/genetics/shared/FieldVerifier.java @@ -0,0 +1,45 @@ +package star.genetics.shared; + +/** + *

+ * FieldVerifier validates that the name the user enters is valid. + *

+ *

+ * This class is in the shared package because we use it in both + * the client code and on the server. On the client, we verify that the name is + * valid before sending an RPC request so the user doesn't have to wait for a + * network round trip to get feedback. On the server, we verify that the name is + * correct to ensure that the input is correct regardless of where the RPC + * originates. + *

+ *

+ * When creating a class that is used on both the client and the server, be sure + * that all code is translatable and does not use native JavaScript. Code that + * is not translatable (such as code that interacts with a database or the file + * system) cannot be compiled into client side JavaScript. Code that uses native + * JavaScript (such as Widgets) cannot be run on the server. + *

+ */ +public class FieldVerifier +{ + + /** + * Verifies that the specified name is valid for our service. + * + * In this example, we only require that the name is at least four + * characters. In your application, you can use more complex checks to ensure + * that usernames, passwords, email addresses, URLs, and other fields have the + * proper syntax. + * + * @param name the name to validate + * @return true if valid, false if invalid + */ + public static boolean isValidName(String name) + { + if (name == null) + { + return false; + } + return name.length() > 3; + } +} diff --git a/src/star/genetics/utils/ArrayNumerics.java b/src/star/genetics/utils/ArrayNumerics.java new file mode 100644 index 0000000..13c79d9 --- /dev/null +++ b/src/star/genetics/utils/ArrayNumerics.java @@ -0,0 +1,199 @@ +package star.genetics.utils; + +public class ArrayNumerics +{ + + public static boolean containsNaN(float[] array ) + { + for( float f : array ) + { + if( Float.isNaN( f ) ) + { + return true ; + } + } + return false ; + } + + + public static float average(float[] array , boolean ignoreSpecial ) + { + float ret = 0; + int count = 0 ; + for (int i = 0; i < array.length; i++) + { + if( ignoreSpecial ) + { + if( !Float.isNaN(array[i]) && !Float.isInfinite(array[i]) ) + { + ret += array[i]; + count++ ; + } + } + else + { + ret += array[i]; + count++ ; + } + } + return ret/count; + + } + + public static void normalRange( float[] array ) + { + float max = array[0]; + float min = array[0]; + for (int i = 0; i < array.length; i++) + { + max = Math.max(array[i], max); + min = Math.min(array[i], min); + } + float scale = max - min ; + for (int i = 0; i < array.length; i++) + { + array[i] = (array[i]-min)/scale; + } + } + + public static void normalize(float[] array) + { + float sum = sum(array, true); + for (int i = 0; i < array.length; i++) + { + array[i] /= sum; + } + } + + public static void normalize(float[][] array) + { + float sum = 0 ; + for (int i = 0; i < array.length; i++) + { + sum += sum( array[i] , true ); + } + for (int i = 0; i < array.length; i++) + { + float[] f = array[i]; + for( int j = 0 ; j < f.length ; j++ ) + { + f[j] /= sum; + } + } + } + + + public static float sum(float[] array, boolean ignoreSpecial) + { + float ret = 0; + for (int i = 0; i < array.length; i++) + { + if( ignoreSpecial ) + { + if( !Float.isNaN(array[i]) && !Float.isInfinite(array[i]) ) + { + ret += array[i]; + } + } + else + { + ret += array[i]; + } + } + return ret; + } + + public static float sum(Float[] array, boolean ignoreSpecial) + { + float ret = 0; + for (int i = 0; i < array.length; i++) + { + if( ignoreSpecial ) + { + if( !Float.isNaN(array[i]) && !Float.isInfinite(array[i]) ) + { + ret += array[i]; + } + } + else + { + ret += array[i]; + } + } + return ret; + } + + + + public static int findLastNonZero(float[] src) + { + int ret = src.length; + while( src[ret - 1] == 0 && ret > 0 ) + { + ret--; + } + return ret; + } + + public static float[] trimFloatArray(float[] src, int len) + { + if( src != null ) + { + if( src.length > len ) + { + float[] ret = new float[len]; + System.arraycopy(src, 0, ret, 0, len); + return ret; + } + else + { + return src; + } + + } + else + { + return null; + } + } + + public static int[] trimIntArray(int[] src, int len) + { + if( src != null ) + { + if( src.length > len ) + { + int[] ret = new int[len]; + System.arraycopy(src, 0, ret, 0, len); + return ret; + } + else + { + return src; + } + + } + else + { + return null; + } + } + + public static int intMin( int a, int b ) + { + return a > b ? b : a ; + } + + public static int intMax( int a, int b ) + { + return a > b ? a : b ; + } + + public static void multiply( float[] array , float scalar ) + { + for( int i = 0 ; i != array.length ; i++ ) + { + array[i] *= scalar ; + } + } +} diff --git a/src/star/genetics/utils/Colors.java b/src/star/genetics/utils/Colors.java new file mode 100644 index 0000000..9b61b09 --- /dev/null +++ b/src/star/genetics/utils/Colors.java @@ -0,0 +1,188 @@ +package star.genetics.utils; + +import java.util.HashMap; +import java.util.StringTokenizer; + +public class Colors +{ + private static HashMap colors; + private static HashMap colorNames; + + private static String Color(int red, int green, int blue) + { + return "rgb("+red+", "+green+", "+blue+")"; + } + + private static String Color(float red, float green, float blue) + { + return "rgb("+red+", "+green+", "+blue+")"; + } + + public static String parseName(String name, String defaultColor) + { + String c = null; + + if (name != null) + { + if (name.startsWith("#") && name.length() == 7) + { + int red = Integer.parseInt(name.substring(1, 3), 16); + int green = Integer.parseInt(name.substring(3, 5), 16); + int blue = Integer.parseInt(name.substring(5, 7), 16); + return Color(red,green,blue); + } + if (colors == null) + { + initColors(); + } + c = colors.get(String.valueOf(name).toLowerCase()); + } + if (c == null) + { + c = defaultColor; + } + return c; + } + + private static String parseName(String name) + { + name = name.trim(); + if (name.startsWith("#") && name.length() == 7) + { + int red = Integer.parseInt(name.substring(1, 3), 16); + int green = Integer.parseInt(name.substring(3, 5), 16); + int blue = Integer.parseInt(name.substring(5, 7), 16); + return Color(red, green, blue); + } + + if (colors == null) + { + initColors(); + } + + return colors.get(String.valueOf(name).toLowerCase()); + } + + public static String parseColor(String color) + { + if (colorNames == null) + { + initColors(); + } + String colorName = colorNames.get(color); + return colorName != null ? colorName : String.valueOf(color); + + } + + private static synchronized void initColors() + { + try + { + if (colors != null && colorNames != null) + { + return; + } +// InputStream is = Colors.class.getClassLoader().getResourceAsStream("utils/rgb.txt"); +// if (is != null) +// { +// BufferedReader r = new BufferedReader(new InputStreamReader(is)); +// colors = new HashMap(); +// colorNames = new HashMap(); +// String line; +// while ((line = r.readLine()) != null) +// { +// if (line.startsWith("!")) +// { +// continue; +// } +// StringTokenizer st = new StringTokenizer(line); +// try +// { +// int red = Integer.parseInt(st.nextToken()); +// int green = Integer.parseInt(st.nextToken()); +// int blue = Integer.parseInt(st.nextToken()); +// String name = st.nextToken("\n"); +// if (name != null) +// { +// name = name.trim(); +// name = name.toLowerCase(); +// colors.put(name, Color(red, green, blue)); +// colorNames.put(Color(red, green, blue), name); +// } +// } +// catch (Exception ex) +// { +// ex.printStackTrace(); +// } +// } +// addSpecialColors(); +// } + } + catch (Exception ex) + { + ex.printStackTrace(); + } + } + + private static void addSpecialColors() + { + colors.put("wildtype", colors.get("burlywood4")); + colorNames.put(colors.get("wildtype"), "wildtype"); + + } + + public static String CMYKtoRGBColor(int[] p_colorvalue) + { + float[] ret = CMYKtoRGB(p_colorvalue); + return Color(ret[0], ret[1], ret[2]); + } + + public static float[] CMYKtoRGB(int[] p_colorvalue) + { + float[] l_res = { 0, 0, 0 }; + if (p_colorvalue.length >= 4) + { + float l_black = (float) 1.0 - 1.0f / 256 * p_colorvalue[3]; + l_res[0] = l_black * ((float) 1.0 - 1.0f / 256 * p_colorvalue[0]); + l_res[1] = l_black * ((float) 1.0 - 1.0f / 256 * p_colorvalue[1]); + l_res[2] = l_black * ((float) 1.0 - 1.0f / 256 * p_colorvalue[2]); + } + return normalizeColors(l_res); + } + + public static float[] CMYKtoRGB(float[] p_colorvalue) + { + float[] l_res = { 0, 0, 0 }; + if (p_colorvalue.length >= 4) + { + float l_black = (float) 1.0 - p_colorvalue[3]; + l_res[0] = l_black * ((float) 1.0 - p_colorvalue[0]); + l_res[1] = l_black * ((float) 1.0 - p_colorvalue[1]); + l_res[2] = l_black * ((float) 1.0 - p_colorvalue[2]); + } + return normalizeColors(l_res); + } + + private static float[] normalizeColors(float[] p_colors) + { + for (int l_i = 0; l_i < p_colors.length; l_i++) + { + if (p_colors[l_i] > (float) 1.0) + p_colors[l_i] = (float) 1.0; + else if (p_colors[l_i] < (float) 0.0) + p_colors[l_i] = (float) 0.0; + } + return p_colors; + } + + public static void main(String[] args) + { + System.out.println(parseName("red")); + System.out.println(parseName("violet")); + System.out.println(parseName("brown")); + System.out.println(parseName("#000000")); + System.out.println(parseName("#ffffff")); + System.out.println(parseName("lavender blush")); + System.out.println(parseName("lavenderblush")); + } +} diff --git a/src/star/genetics/utils/Debug.java b/src/star/genetics/utils/Debug.java new file mode 100644 index 0000000..53a2265 --- /dev/null +++ b/src/star/genetics/utils/Debug.java @@ -0,0 +1,25 @@ +package star.genetics.utils; + +public class Debug { + + public static void printStackTraceShort() + { + StackTraceElement[] array = (new RuntimeException()).getStackTrace(); + for( int i = 0 ; i < Math.min( array.length, 32);i++) + { + if( array[i].getLineNumber() >= 0 ) + { + System.err.println( array[i] ); + } + } + } + + public static void printStackTrace() + { + StackTraceElement[] array = (new RuntimeException()).getStackTrace(); + for( int i = 0 ; i < Math.min( array.length, 32);i++) + { + System.err.println( array[i] ); + } + } +} diff --git a/src/star/genetics/utils/Equals.java b/src/star/genetics/utils/Equals.java new file mode 100644 index 0000000..31c0d3a --- /dev/null +++ b/src/star/genetics/utils/Equals.java @@ -0,0 +1,24 @@ +package star.genetics.utils; + +final public class Equals +{ + public static Object getNullEquals( Object obj ) + { + return obj != null ? obj : new Equals(); + } + + public static boolean isEquals( Object a , Object b ) + { + return getNullEquals(a).equals(getNullEquals(b)); + } + + @Override + public boolean equals(Object obj) + { + if( obj != null ) + { + return ( obj instanceof Equals ); + } + return true ; + } +} diff --git a/src/star/genetics/utils/MapArray.java b/src/star/genetics/utils/MapArray.java new file mode 100644 index 0000000..c5d5145 --- /dev/null +++ b/src/star/genetics/utils/MapArray.java @@ -0,0 +1,54 @@ +package star.genetics.utils; + +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +public class MapArray +{ + private Map> map = new LinkedHashMap>(); + + private Set getSet(K key) + { + if (!map.containsKey(key)) + { + map.put(key, new LinkedHashSet()); + } + return map.get(key); + } + + public void add(K key, V value) + { + if (key != null) + { + getSet(key).add(value); + } + } + + public int size() + { + return map.size(); + } + + public int size(K key) + { + return map.get(key).size(); + } + + public Set>> entrySet() + { + return map.entrySet(); + } + + public Set keySet() + { + return map.keySet(); + } + + public Set get(K key) + { + return map.get(key); + } +} diff --git a/src/star/genetics/utils/MathHelpers.java b/src/star/genetics/utils/MathHelpers.java new file mode 100644 index 0000000..e2f69d8 --- /dev/null +++ b/src/star/genetics/utils/MathHelpers.java @@ -0,0 +1,50 @@ +package star.genetics.utils; + +public class MathHelpers +{ + public static double truncate(double x) + { + return Math.round(Math.floor(x)); + } + + public static int truncate(float x) + { + return (int) Math.round(Math.floor(x)); + } + + public static float distance(float ax, float ay, float bx, float by) + { + float dx = bx - ax; + float dy = by - ay; + return (float) Math.sqrt(dx * dx + dy * dy); + } + + public static float normalize(float scale) + { + if (scale < 0) + { + return 0f; + } + else if (scale > 1) + { + return 1f; + } + else + { + return scale; + } + } + + public static int compare(int a, int b) + { + if (a == b) + { + return 0; + } + else + { + return a > b ? 1 : -1; + } + + } +} diff --git a/src/star/genetics/utils/PropertyChangeRaiser.java b/src/star/genetics/utils/PropertyChangeRaiser.java new file mode 100644 index 0000000..eb662ff --- /dev/null +++ b/src/star/genetics/utils/PropertyChangeRaiser.java @@ -0,0 +1,31 @@ +package star.genetics.utils; + +import java.beans.PropertyChangeListener; + +/** + * Adds support for addPropertyChangeListener and removePropertyChangeListener + * @author ceraj + * + */ +public interface PropertyChangeRaiser +{ + + /** + * Register a listener for the PropertyChange event. The customizer + * should fire a PropertyChange event whenever it changes the target + * bean in a way that might require the displayed properties to be + * refreshed. + * + * @param listener An object to be invoked when a PropertyChange + * event is fired. + */ + void addPropertyChangeListener(PropertyChangeListener listener); + + /** + * Remove a listener for the PropertyChange event. + * + * @param listener The PropertyChange listener to be removed. + */ + void removePropertyChangeListener(PropertyChangeListener listener); + +} diff --git a/src/star/genetics/utils/Timer.java b/src/star/genetics/utils/Timer.java new file mode 100644 index 0000000..ddc4bfb --- /dev/null +++ b/src/star/genetics/utils/Timer.java @@ -0,0 +1,23 @@ +package star.genetics.utils; + +import java.text.MessageFormat; +import java.util.Arrays; + +public class Timer +{ + static long start; + + public static void start() + { + start = System.currentTimeMillis(); + } + + public static void stop() + { + long stop = System.currentTimeMillis(); + RuntimeException ex = new RuntimeException(); + ex.fillInStackTrace(); + StackTraceElement[] elements = ex.getStackTrace(); + System.err.println("Timer: " + elements[1] + " " + (stop - start) + " ms"); + } +} diff --git a/src/star/genetics/utils/Tracking.java b/src/star/genetics/utils/Tracking.java new file mode 100644 index 0000000..51d6105 --- /dev/null +++ b/src/star/genetics/utils/Tracking.java @@ -0,0 +1,10 @@ +package star.genetics.utils; + + +public class Tracking +{ + public static String track(String application, String event) + { + return null; + } +} diff --git a/src/star/genetics/utils/rgb.txt b/src/star/genetics/utils/rgb.txt new file mode 100644 index 0000000..62eb896 --- /dev/null +++ b/src/star/genetics/utils/rgb.txt @@ -0,0 +1,753 @@ +! $Xorg: rgb.txt,v 1.3 2000/08/17 19:54:00 cpqbld Exp $ +255 250 250 snow +248 248 255 ghost white +248 248 255 GhostWhite +245 245 245 white smoke +245 245 245 WhiteSmoke +220 220 220 gainsboro +255 250 240 floral white +255 250 240 FloralWhite +253 245 230 old lace +253 245 230 OldLace +250 240 230 linen +250 235 215 antique white +250 235 215 AntiqueWhite +255 239 213 papaya whip +255 239 213 PapayaWhip +255 235 205 blanched almond +255 235 205 BlanchedAlmond +255 228 196 bisque +255 218 185 peach puff +255 218 185 PeachPuff +255 222 173 navajo white +255 222 173 NavajoWhite +255 228 181 moccasin +255 248 220 cornsilk +255 255 240 ivory +255 250 205 lemon chiffon +255 250 205 LemonChiffon +255 245 238 seashell +240 255 240 honeydew +245 255 250 mint cream +245 255 250 MintCream +240 255 255 azure +240 248 255 alice blue +240 248 255 AliceBlue +230 230 250 lavender +255 240 245 lavender blush +255 240 245 LavenderBlush +255 228 225 misty rose +255 228 225 MistyRose +255 255 255 white + 0 0 0 black + 47 79 79 dark slate gray + 47 79 79 DarkSlateGray + 47 79 79 dark slate grey + 47 79 79 DarkSlateGrey +105 105 105 dim gray +105 105 105 DimGray +105 105 105 dim grey +105 105 105 DimGrey +112 128 144 slate gray +112 128 144 SlateGray +112 128 144 slate grey +112 128 144 SlateGrey +119 136 153 light slate gray +119 136 153 LightSlateGray +119 136 153 light slate grey +119 136 153 LightSlateGrey +190 190 190 gray +190 190 190 grey +211 211 211 light grey +211 211 211 LightGrey +211 211 211 light gray +211 211 211 LightGray + 25 25 112 midnight blue + 25 25 112 MidnightBlue + 0 0 128 navy + 0 0 128 navy blue + 0 0 128 NavyBlue +100 149 237 cornflower blue +100 149 237 CornflowerBlue + 72 61 139 dark slate blue + 72 61 139 DarkSlateBlue +106 90 205 slate blue +106 90 205 SlateBlue +123 104 238 medium slate blue +123 104 238 MediumSlateBlue +132 112 255 light slate blue +132 112 255 LightSlateBlue + 0 0 205 medium blue + 0 0 205 MediumBlue + 65 105 225 royal blue + 65 105 225 RoyalBlue + 0 0 255 blue + 30 144 255 dodger blue + 30 144 255 DodgerBlue + 0 191 255 deep sky blue + 0 191 255 DeepSkyBlue +135 206 235 sky blue +135 206 235 SkyBlue +135 206 250 light sky blue +135 206 250 LightSkyBlue + 70 130 180 steel blue + 70 130 180 SteelBlue +176 196 222 light steel blue +176 196 222 LightSteelBlue +173 216 230 light blue +173 216 230 LightBlue +176 224 230 powder blue +176 224 230 PowderBlue +175 238 238 pale turquoise +175 238 238 PaleTurquoise + 0 206 209 dark turquoise + 0 206 209 DarkTurquoise + 72 209 204 medium turquoise + 72 209 204 MediumTurquoise + 64 224 208 turquoise + 0 255 255 cyan +224 255 255 light cyan +224 255 255 LightCyan + 95 158 160 cadet blue + 95 158 160 CadetBlue +102 205 170 medium aquamarine +102 205 170 MediumAquamarine +127 255 212 aquamarine + 0 100 0 dark green + 0 100 0 DarkGreen + 85 107 47 dark olive green + 85 107 47 DarkOliveGreen +143 188 143 dark sea green +143 188 143 DarkSeaGreen + 46 139 87 sea green + 46 139 87 SeaGreen + 60 179 113 medium sea green + 60 179 113 MediumSeaGreen + 32 178 170 light sea green + 32 178 170 LightSeaGreen +152 251 152 pale green +152 251 152 PaleGreen + 0 255 127 spring green + 0 255 127 SpringGreen +124 252 0 lawn green +124 252 0 LawnGreen + 0 255 0 green +127 255 0 chartreuse + 0 250 154 medium spring green + 0 250 154 MediumSpringGreen +173 255 47 green yellow +173 255 47 GreenYellow + 50 205 50 lime green + 50 205 50 LimeGreen +154 205 50 yellow green +154 205 50 YellowGreen + 34 139 34 forest green + 34 139 34 ForestGreen +107 142 35 olive drab +107 142 35 OliveDrab +189 183 107 dark khaki +189 183 107 DarkKhaki +240 230 140 khaki +238 232 170 pale goldenrod +238 232 170 PaleGoldenrod +250 250 210 light goldenrod yellow +250 250 210 LightGoldenrodYellow +255 255 224 light yellow +255 255 224 LightYellow +255 255 0 yellow +255 215 0 gold +238 221 130 light goldenrod +238 221 130 LightGoldenrod +218 165 32 goldenrod +184 134 11 dark goldenrod +184 134 11 DarkGoldenrod +188 143 143 rosy brown +188 143 143 RosyBrown +205 92 92 indian red +205 92 92 IndianRed +139 69 19 saddle brown +139 69 19 SaddleBrown +160 82 45 sienna +205 133 63 peru +222 184 135 burlywood +245 245 220 beige +245 222 179 wheat +244 164 96 sandy brown +244 164 96 SandyBrown +210 180 140 tan +210 105 30 chocolate +178 34 34 firebrick +165 42 42 brown +233 150 122 dark salmon +233 150 122 DarkSalmon +250 128 114 salmon +255 160 122 light salmon +255 160 122 LightSalmon +255 165 0 orange +255 140 0 dark orange +255 140 0 DarkOrange +255 127 80 coral +240 128 128 light coral +240 128 128 LightCoral +255 99 71 tomato +255 69 0 orange red +255 69 0 OrangeRed +255 0 0 red +255 105 180 hot pink +255 105 180 HotPink +255 20 147 deep pink +255 20 147 DeepPink +255 192 203 pink +255 182 193 light pink +255 182 193 LightPink +219 112 147 pale violet red +219 112 147 PaleVioletRed +176 48 96 maroon +199 21 133 medium violet red +199 21 133 MediumVioletRed +208 32 144 violet red +208 32 144 VioletRed +255 0 255 magenta +238 130 238 violet +221 160 221 plum +218 112 214 orchid +186 85 211 medium orchid +186 85 211 MediumOrchid +153 50 204 dark orchid +153 50 204 DarkOrchid +148 0 211 dark violet +148 0 211 DarkViolet +138 43 226 blue violet +138 43 226 BlueViolet +160 32 240 purple +147 112 219 medium purple +147 112 219 MediumPurple +216 191 216 thistle +255 250 250 snow1 +238 233 233 snow2 +205 201 201 snow3 +139 137 137 snow4 +255 245 238 seashell1 +238 229 222 seashell2 +205 197 191 seashell3 +139 134 130 seashell4 +255 239 219 AntiqueWhite1 +238 223 204 AntiqueWhite2 +205 192 176 AntiqueWhite3 +139 131 120 AntiqueWhite4 +255 228 196 bisque1 +238 213 183 bisque2 +205 183 158 bisque3 +139 125 107 bisque4 +255 218 185 PeachPuff1 +238 203 173 PeachPuff2 +205 175 149 PeachPuff3 +139 119 101 PeachPuff4 +255 222 173 NavajoWhite1 +238 207 161 NavajoWhite2 +205 179 139 NavajoWhite3 +139 121 94 NavajoWhite4 +255 250 205 LemonChiffon1 +238 233 191 LemonChiffon2 +205 201 165 LemonChiffon3 +139 137 112 LemonChiffon4 +255 248 220 cornsilk1 +238 232 205 cornsilk2 +205 200 177 cornsilk3 +139 136 120 cornsilk4 +255 255 240 ivory1 +238 238 224 ivory2 +205 205 193 ivory3 +139 139 131 ivory4 +240 255 240 honeydew1 +224 238 224 honeydew2 +193 205 193 honeydew3 +131 139 131 honeydew4 +255 240 245 LavenderBlush1 +238 224 229 LavenderBlush2 +205 193 197 LavenderBlush3 +139 131 134 LavenderBlush4 +255 228 225 MistyRose1 +238 213 210 MistyRose2 +205 183 181 MistyRose3 +139 125 123 MistyRose4 +240 255 255 azure1 +224 238 238 azure2 +193 205 205 azure3 +131 139 139 azure4 +131 111 255 SlateBlue1 +122 103 238 SlateBlue2 +105 89 205 SlateBlue3 + 71 60 139 SlateBlue4 + 72 118 255 RoyalBlue1 + 67 110 238 RoyalBlue2 + 58 95 205 RoyalBlue3 + 39 64 139 RoyalBlue4 + 0 0 255 blue1 + 0 0 238 blue2 + 0 0 205 blue3 + 0 0 139 blue4 + 30 144 255 DodgerBlue1 + 28 134 238 DodgerBlue2 + 24 116 205 DodgerBlue3 + 16 78 139 DodgerBlue4 + 99 184 255 SteelBlue1 + 92 172 238 SteelBlue2 + 79 148 205 SteelBlue3 + 54 100 139 SteelBlue4 + 0 191 255 DeepSkyBlue1 + 0 178 238 DeepSkyBlue2 + 0 154 205 DeepSkyBlue3 + 0 104 139 DeepSkyBlue4 +135 206 255 SkyBlue1 +126 192 238 SkyBlue2 +108 166 205 SkyBlue3 + 74 112 139 SkyBlue4 +176 226 255 LightSkyBlue1 +164 211 238 LightSkyBlue2 +141 182 205 LightSkyBlue3 + 96 123 139 LightSkyBlue4 +198 226 255 SlateGray1 +185 211 238 SlateGray2 +159 182 205 SlateGray3 +108 123 139 SlateGray4 +202 225 255 LightSteelBlue1 +188 210 238 LightSteelBlue2 +162 181 205 LightSteelBlue3 +110 123 139 LightSteelBlue4 +191 239 255 LightBlue1 +178 223 238 LightBlue2 +154 192 205 LightBlue3 +104 131 139 LightBlue4 +224 255 255 LightCyan1 +209 238 238 LightCyan2 +180 205 205 LightCyan3 +122 139 139 LightCyan4 +187 255 255 PaleTurquoise1 +174 238 238 PaleTurquoise2 +150 205 205 PaleTurquoise3 +102 139 139 PaleTurquoise4 +152 245 255 CadetBlue1 +142 229 238 CadetBlue2 +122 197 205 CadetBlue3 + 83 134 139 CadetBlue4 + 0 245 255 turquoise1 + 0 229 238 turquoise2 + 0 197 205 turquoise3 + 0 134 139 turquoise4 + 0 255 255 cyan1 + 0 238 238 cyan2 + 0 205 205 cyan3 + 0 139 139 cyan4 +151 255 255 DarkSlateGray1 +141 238 238 DarkSlateGray2 +121 205 205 DarkSlateGray3 + 82 139 139 DarkSlateGray4 +127 255 212 aquamarine1 +118 238 198 aquamarine2 +102 205 170 aquamarine3 + 69 139 116 aquamarine4 +193 255 193 DarkSeaGreen1 +180 238 180 DarkSeaGreen2 +155 205 155 DarkSeaGreen3 +105 139 105 DarkSeaGreen4 + 84 255 159 SeaGreen1 + 78 238 148 SeaGreen2 + 67 205 128 SeaGreen3 + 46 139 87 SeaGreen4 +154 255 154 PaleGreen1 +144 238 144 PaleGreen2 +124 205 124 PaleGreen3 + 84 139 84 PaleGreen4 + 0 255 127 SpringGreen1 + 0 238 118 SpringGreen2 + 0 205 102 SpringGreen3 + 0 139 69 SpringGreen4 + 0 255 0 green1 + 0 238 0 green2 + 0 205 0 green3 + 0 139 0 green4 +127 255 0 chartreuse1 +118 238 0 chartreuse2 +102 205 0 chartreuse3 + 69 139 0 chartreuse4 +192 255 62 OliveDrab1 +179 238 58 OliveDrab2 +154 205 50 OliveDrab3 +105 139 34 OliveDrab4 +202 255 112 DarkOliveGreen1 +188 238 104 DarkOliveGreen2 +162 205 90 DarkOliveGreen3 +110 139 61 DarkOliveGreen4 +255 246 143 khaki1 +238 230 133 khaki2 +205 198 115 khaki3 +139 134 78 khaki4 +255 236 139 LightGoldenrod1 +238 220 130 LightGoldenrod2 +205 190 112 LightGoldenrod3 +139 129 76 LightGoldenrod4 +255 255 224 LightYellow1 +238 238 209 LightYellow2 +205 205 180 LightYellow3 +139 139 122 LightYellow4 +255 255 0 yellow1 +238 238 0 yellow2 +205 205 0 yellow3 +139 139 0 yellow4 +255 215 0 gold1 +238 201 0 gold2 +205 173 0 gold3 +139 117 0 gold4 +255 193 37 goldenrod1 +238 180 34 goldenrod2 +205 155 29 goldenrod3 +139 105 20 goldenrod4 +255 185 15 DarkGoldenrod1 +238 173 14 DarkGoldenrod2 +205 149 12 DarkGoldenrod3 +139 101 8 DarkGoldenrod4 +255 193 193 RosyBrown1 +238 180 180 RosyBrown2 +205 155 155 RosyBrown3 +139 105 105 RosyBrown4 +255 106 106 IndianRed1 +238 99 99 IndianRed2 +205 85 85 IndianRed3 +139 58 58 IndianRed4 +255 130 71 sienna1 +238 121 66 sienna2 +205 104 57 sienna3 +139 71 38 sienna4 +255 211 155 burlywood1 +238 197 145 burlywood2 +205 170 125 burlywood3 +139 115 85 burlywood4 +255 231 186 wheat1 +238 216 174 wheat2 +205 186 150 wheat3 +139 126 102 wheat4 +255 165 79 tan1 +238 154 73 tan2 +205 133 63 tan3 +139 90 43 tan4 +255 127 36 chocolate1 +238 118 33 chocolate2 +205 102 29 chocolate3 +139 69 19 chocolate4 +255 48 48 firebrick1 +238 44 44 firebrick2 +205 38 38 firebrick3 +139 26 26 firebrick4 +255 64 64 brown1 +238 59 59 brown2 +205 51 51 brown3 +139 35 35 brown4 +255 140 105 salmon1 +238 130 98 salmon2 +205 112 84 salmon3 +139 76 57 salmon4 +255 160 122 LightSalmon1 +238 149 114 LightSalmon2 +205 129 98 LightSalmon3 +139 87 66 LightSalmon4 +255 165 0 orange1 +238 154 0 orange2 +205 133 0 orange3 +139 90 0 orange4 +255 127 0 DarkOrange1 +238 118 0 DarkOrange2 +205 102 0 DarkOrange3 +139 69 0 DarkOrange4 +255 114 86 coral1 +238 106 80 coral2 +205 91 69 coral3 +139 62 47 coral4 +255 99 71 tomato1 +238 92 66 tomato2 +205 79 57 tomato3 +139 54 38 tomato4 +255 69 0 OrangeRed1 +238 64 0 OrangeRed2 +205 55 0 OrangeRed3 +139 37 0 OrangeRed4 +255 0 0 red1 +238 0 0 red2 +205 0 0 red3 +139 0 0 red4 +255 20 147 DeepPink1 +238 18 137 DeepPink2 +205 16 118 DeepPink3 +139 10 80 DeepPink4 +255 110 180 HotPink1 +238 106 167 HotPink2 +205 96 144 HotPink3 +139 58 98 HotPink4 +255 181 197 pink1 +238 169 184 pink2 +205 145 158 pink3 +139 99 108 pink4 +255 174 185 LightPink1 +238 162 173 LightPink2 +205 140 149 LightPink3 +139 95 101 LightPink4 +255 130 171 PaleVioletRed1 +238 121 159 PaleVioletRed2 +205 104 137 PaleVioletRed3 +139 71 93 PaleVioletRed4 +255 52 179 maroon1 +238 48 167 maroon2 +205 41 144 maroon3 +139 28 98 maroon4 +255 62 150 VioletRed1 +238 58 140 VioletRed2 +205 50 120 VioletRed3 +139 34 82 VioletRed4 +255 0 255 magenta1 +238 0 238 magenta2 +205 0 205 magenta3 +139 0 139 magenta4 +255 131 250 orchid1 +238 122 233 orchid2 +205 105 201 orchid3 +139 71 137 orchid4 +255 187 255 plum1 +238 174 238 plum2 +205 150 205 plum3 +139 102 139 plum4 +224 102 255 MediumOrchid1 +209 95 238 MediumOrchid2 +180 82 205 MediumOrchid3 +122 55 139 MediumOrchid4 +191 62 255 DarkOrchid1 +178 58 238 DarkOrchid2 +154 50 205 DarkOrchid3 +104 34 139 DarkOrchid4 +155 48 255 purple1 +145 44 238 purple2 +125 38 205 purple3 + 85 26 139 purple4 +171 130 255 MediumPurple1 +159 121 238 MediumPurple2 +137 104 205 MediumPurple3 + 93 71 139 MediumPurple4 +255 225 255 thistle1 +238 210 238 thistle2 +205 181 205 thistle3 +139 123 139 thistle4 + 0 0 0 gray0 + 0 0 0 grey0 + 3 3 3 gray1 + 3 3 3 grey1 + 5 5 5 gray2 + 5 5 5 grey2 + 8 8 8 gray3 + 8 8 8 grey3 + 10 10 10 gray4 + 10 10 10 grey4 + 13 13 13 gray5 + 13 13 13 grey5 + 15 15 15 gray6 + 15 15 15 grey6 + 18 18 18 gray7 + 18 18 18 grey7 + 20 20 20 gray8 + 20 20 20 grey8 + 23 23 23 gray9 + 23 23 23 grey9 + 26 26 26 gray10 + 26 26 26 grey10 + 28 28 28 gray11 + 28 28 28 grey11 + 31 31 31 gray12 + 31 31 31 grey12 + 33 33 33 gray13 + 33 33 33 grey13 + 36 36 36 gray14 + 36 36 36 grey14 + 38 38 38 gray15 + 38 38 38 grey15 + 41 41 41 gray16 + 41 41 41 grey16 + 43 43 43 gray17 + 43 43 43 grey17 + 46 46 46 gray18 + 46 46 46 grey18 + 48 48 48 gray19 + 48 48 48 grey19 + 51 51 51 gray20 + 51 51 51 grey20 + 54 54 54 gray21 + 54 54 54 grey21 + 56 56 56 gray22 + 56 56 56 grey22 + 59 59 59 gray23 + 59 59 59 grey23 + 61 61 61 gray24 + 61 61 61 grey24 + 64 64 64 gray25 + 64 64 64 grey25 + 66 66 66 gray26 + 66 66 66 grey26 + 69 69 69 gray27 + 69 69 69 grey27 + 71 71 71 gray28 + 71 71 71 grey28 + 74 74 74 gray29 + 74 74 74 grey29 + 77 77 77 gray30 + 77 77 77 grey30 + 79 79 79 gray31 + 79 79 79 grey31 + 82 82 82 gray32 + 82 82 82 grey32 + 84 84 84 gray33 + 84 84 84 grey33 + 87 87 87 gray34 + 87 87 87 grey34 + 89 89 89 gray35 + 89 89 89 grey35 + 92 92 92 gray36 + 92 92 92 grey36 + 94 94 94 gray37 + 94 94 94 grey37 + 97 97 97 gray38 + 97 97 97 grey38 + 99 99 99 gray39 + 99 99 99 grey39 +102 102 102 gray40 +102 102 102 grey40 +105 105 105 gray41 +105 105 105 grey41 +107 107 107 gray42 +107 107 107 grey42 +110 110 110 gray43 +110 110 110 grey43 +112 112 112 gray44 +112 112 112 grey44 +115 115 115 gray45 +115 115 115 grey45 +117 117 117 gray46 +117 117 117 grey46 +120 120 120 gray47 +120 120 120 grey47 +122 122 122 gray48 +122 122 122 grey48 +125 125 125 gray49 +125 125 125 grey49 +127 127 127 gray50 +127 127 127 grey50 +130 130 130 gray51 +130 130 130 grey51 +133 133 133 gray52 +133 133 133 grey52 +135 135 135 gray53 +135 135 135 grey53 +138 138 138 gray54 +138 138 138 grey54 +140 140 140 gray55 +140 140 140 grey55 +143 143 143 gray56 +143 143 143 grey56 +145 145 145 gray57 +145 145 145 grey57 +148 148 148 gray58 +148 148 148 grey58 +150 150 150 gray59 +150 150 150 grey59 +153 153 153 gray60 +153 153 153 grey60 +156 156 156 gray61 +156 156 156 grey61 +158 158 158 gray62 +158 158 158 grey62 +161 161 161 gray63 +161 161 161 grey63 +163 163 163 gray64 +163 163 163 grey64 +166 166 166 gray65 +166 166 166 grey65 +168 168 168 gray66 +168 168 168 grey66 +171 171 171 gray67 +171 171 171 grey67 +173 173 173 gray68 +173 173 173 grey68 +176 176 176 gray69 +176 176 176 grey69 +179 179 179 gray70 +179 179 179 grey70 +181 181 181 gray71 +181 181 181 grey71 +184 184 184 gray72 +184 184 184 grey72 +186 186 186 gray73 +186 186 186 grey73 +189 189 189 gray74 +189 189 189 grey74 +191 191 191 gray75 +191 191 191 grey75 +194 194 194 gray76 +194 194 194 grey76 +196 196 196 gray77 +196 196 196 grey77 +199 199 199 gray78 +199 199 199 grey78 +201 201 201 gray79 +201 201 201 grey79 +204 204 204 gray80 +204 204 204 grey80 +207 207 207 gray81 +207 207 207 grey81 +209 209 209 gray82 +209 209 209 grey82 +212 212 212 gray83 +212 212 212 grey83 +214 214 214 gray84 +214 214 214 grey84 +217 217 217 gray85 +217 217 217 grey85 +219 219 219 gray86 +219 219 219 grey86 +222 222 222 gray87 +222 222 222 grey87 +224 224 224 gray88 +224 224 224 grey88 +227 227 227 gray89 +227 227 227 grey89 +229 229 229 gray90 +229 229 229 grey90 +232 232 232 gray91 +232 232 232 grey91 +235 235 235 gray92 +235 235 235 grey92 +237 237 237 gray93 +237 237 237 grey93 +240 240 240 gray94 +240 240 240 grey94 +242 242 242 gray95 +242 242 242 grey95 +245 245 245 gray96 +245 245 245 grey96 +247 247 247 gray97 +247 247 247 grey97 +250 250 250 gray98 +250 250 250 grey98 +252 252 252 gray99 +252 252 252 grey99 +255 255 255 gray100 +255 255 255 grey100 +169 169 169 dark grey +169 169 169 DarkGrey +169 169 169 dark gray +169 169 169 DarkGray +0 0 139 dark blue +0 0 139 DarkBlue +0 139 139 dark cyan +0 139 139 DarkCyan +139 0 139 dark magenta +139 0 139 DarkMagenta +139 0 0 dark red +139 0 0 DarkRed +144 238 144 light green +144 238 144 LightGreen diff --git a/src/star/genetics/visualizers/Visualizer.java b/src/star/genetics/visualizers/Visualizer.java new file mode 100644 index 0000000..ee182e0 --- /dev/null +++ b/src/star/genetics/visualizers/Visualizer.java @@ -0,0 +1,30 @@ +package star.genetics.visualizers; + +import java.util.Map; + +import star.genetics.genetic.model.Creature; + +public interface Visualizer +{ + + public enum UIClass + { + Fly, Worm, Yeast; + } + + public void setSex(Creature.Sex sex); + + public void setName(String name); + + public void setNote(String note); + + // NOTE: For 'Show info' to work in summary tab, visualizer needs be subclass of JComponent + // and JComponent shoul return this + public Object getJComponent(); + + public void setProperties(Map properties, Creature.Sex sex); + + public Map getTooltipProperties(); + + public UIClass getUIClass(); +} diff --git a/src/star/genetics/visualizers/VisualizerFactory.java b/src/star/genetics/visualizers/VisualizerFactory.java new file mode 100644 index 0000000..bb928c4 --- /dev/null +++ b/src/star/genetics/visualizers/VisualizerFactory.java @@ -0,0 +1,6 @@ +package star.genetics.visualizers; + +public interface VisualizerFactory +{ + public Visualizer newVisualizerInstance(); +} diff --git a/src/star/genetics/xls/ParseException.java b/src/star/genetics/xls/ParseException.java new file mode 100644 index 0000000..c5f4c21 --- /dev/null +++ b/src/star/genetics/xls/ParseException.java @@ -0,0 +1,17 @@ +package star.genetics.xls; + +public class ParseException extends Exception +{ + + private static final long serialVersionUID = 1L; + + public ParseException(String name) + { + super(name); + } + + public ParseException(String name, Throwable source) + { + super(name, source); + } +} diff --git a/src/star/genetics/xls/Properties.java b/src/star/genetics/xls/Properties.java new file mode 100644 index 0000000..1dece01 --- /dev/null +++ b/src/star/genetics/xls/Properties.java @@ -0,0 +1,32 @@ +/** + * + */ +package star.genetics.xls; + +public enum Properties +{ + NAME("Name") // //$NON-NLS-1$ + , VISUALIZER("Visualizer") // //$NON-NLS-1$ + , MATING_TYPE("Mating type") // //$NON-NLS-1$ + , PROGENIESCOUNT("Total progeny per cross") // //$NON-NLS-1$ + , MALERECOMBINATIONRATE("Male recombination rate") // //$NON-NLS-1$ + , FEMALERECOMBINATIONRATE("Female recombination rate") // //$NON-NLS-1$ + , MATINGSCOUNT("Matings") // //$NON-NLS-1$ + , SPONTANIOUSMALES("Spontanious males") // //$NON-NLS-1$ + , AVAILABLEEXPERIMENTS("Available experiments") // //$NON-NLS-1$ + , TWINNINGFREQUENCY("Twinning frequency") // //$NON-NLS-1$ + , IDENTICALTWINSFREQUENCY("Identical twins frequency"); //$NON-NLS-1$ + + String name; + + private Properties(String name) + { + this.name = name; + } + + @Override + public String toString() + { + return name; + } +} \ No newline at end of file diff --git a/war/Stargenetics_gwt_java.css b/war/Stargenetics_gwt_java.css new file mode 100644 index 0000000..7aca7ac --- /dev/null +++ b/war/Stargenetics_gwt_java.css @@ -0,0 +1,34 @@ +/** Add css rules here for your application. */ + + +/** Example rules used by the template application (remove for your app) */ +h1 { + font-size: 2em; + font-weight: bold; + color: #777777; + margin: 40px 0px 70px; + text-align: center; +} + +.sendButton { + display: block; + font-size: 16pt; +} + +/** Most GWT widgets already have a style name defined */ +.gwt-DialogBox { + width: 400px; +} + +.dialogVPanel { + margin: 5px; +} + +.serverResponseLabelError { + color: red; +} + +/** Set ids using widget.getElement().setId("idOfElement") */ +#closeButton { + margin: 15px 6px 6px; +} diff --git a/war/Stargenetics_gwt_java.html b/war/Stargenetics_gwt_java.html new file mode 100644 index 0000000..7dd0f76 --- /dev/null +++ b/war/Stargenetics_gwt_java.html @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + Web Application Starter Project + + + + + + + + + + + + + + + + + + + + + + +

Web Application Starter Project

+ + + + + + + + + + + + +
Please enter your name:
+ + diff --git a/war/WEB-INF/web.xml b/war/WEB-INF/web.xml new file mode 100644 index 0000000..fbb02b4 --- /dev/null +++ b/war/WEB-INF/web.xml @@ -0,0 +1,13 @@ + + + + + + Stargenetics_gwt_java.html + + + diff --git a/war/favicon.ico b/war/favicon.ico new file mode 100644 index 0000000..858a707 Binary files /dev/null and b/war/favicon.ico differ diff --git a/war/stargenetics_gwt_java/A4F90E89AD961B49B56FF39C9B0D4613.cache.html b/war/stargenetics_gwt_java/A4F90E89AD961B49B56FF39C9B0D4613.cache.html new file mode 100644 index 0000000..3258d11 --- /dev/null +++ b/war/stargenetics_gwt_java/A4F90E89AD961B49B56FF39C9B0D4613.cache.html @@ -0,0 +1,451 @@ + + \ No newline at end of file diff --git a/war/stargenetics_gwt_java/A7B3ED58228A47ADF3B6C2FCB2FEB64F.cache.html b/war/stargenetics_gwt_java/A7B3ED58228A47ADF3B6C2FCB2FEB64F.cache.html new file mode 100644 index 0000000..c1e352a --- /dev/null +++ b/war/stargenetics_gwt_java/A7B3ED58228A47ADF3B6C2FCB2FEB64F.cache.html @@ -0,0 +1,464 @@ + + + \ No newline at end of file diff --git a/war/stargenetics_gwt_java/DA22CFA6C5FC806BE4E7675E10012783.cache.html b/war/stargenetics_gwt_java/DA22CFA6C5FC806BE4E7675E10012783.cache.html new file mode 100644 index 0000000..6cfd911 --- /dev/null +++ b/war/stargenetics_gwt_java/DA22CFA6C5FC806BE4E7675E10012783.cache.html @@ -0,0 +1,475 @@ + + + \ No newline at end of file diff --git a/war/stargenetics_gwt_java/E93DDC2D1A1CEE51C76F8F0BF233FC57.cache.html b/war/stargenetics_gwt_java/E93DDC2D1A1CEE51C76F8F0BF233FC57.cache.html new file mode 100644 index 0000000..be34ae6 --- /dev/null +++ b/war/stargenetics_gwt_java/E93DDC2D1A1CEE51C76F8F0BF233FC57.cache.html @@ -0,0 +1,481 @@ + + + \ No newline at end of file diff --git a/war/stargenetics_gwt_java/F915C834D89A24C70BF22596EC3F80A0.cache.html b/war/stargenetics_gwt_java/F915C834D89A24C70BF22596EC3F80A0.cache.html new file mode 100644 index 0000000..84d96b4 --- /dev/null +++ b/war/stargenetics_gwt_java/F915C834D89A24C70BF22596EC3F80A0.cache.html @@ -0,0 +1,490 @@ + + + \ No newline at end of file diff --git a/war/stargenetics_gwt_java/FB85208609937CB03861ACB89CBF33B8.cache.html b/war/stargenetics_gwt_java/FB85208609937CB03861ACB89CBF33B8.cache.html new file mode 100644 index 0000000..e0f519f --- /dev/null +++ b/war/stargenetics_gwt_java/FB85208609937CB03861ACB89CBF33B8.cache.html @@ -0,0 +1,463 @@ + + + \ No newline at end of file diff --git a/war/stargenetics_gwt_java/clear.cache.gif b/war/stargenetics_gwt_java/clear.cache.gif new file mode 100644 index 0000000..e565824 Binary files /dev/null and b/war/stargenetics_gwt_java/clear.cache.gif differ diff --git a/war/stargenetics_gwt_java/gwt/clean/clean.css b/war/stargenetics_gwt_java/gwt/clean/clean.css new file mode 100644 index 0000000..aa02d53 --- /dev/null +++ b/war/stargenetics_gwt_java/gwt/clean/clean.css @@ -0,0 +1,1264 @@ +/** + * The file contains styles for GWT widgets in the Clean theme. + * + * In order to maintain cross-browser compatibility, the following syntax is + * used to create IE6 specific style rules: + * .gwt-Widget { + * property: rule applies to all browsers + * -property: rule applies only to IE6 (overrides previous rule) + * } + * * html .gwt-Widget { + * property: rule applies to all versions of IE + * } + */ + +body, table td, select, button { + font-family: Arial Unicode MS, Arial, sans-serif; + font-size: small; +} +pre { + font-family: "courier new", courier; + font-size: small; +} +body { + color: black; + margin: 10px; + border: 0px; + padding: 0px; + background: #fff; + direction: ltr; +} +a, a:visited { + color: #0066cc; + text-decoration:none; +} + +a:hover { + color: #0066cc; + text-decoration:underline; +} + +select { + background: white; +} + +/** + * The reference theme can be used to determine when this style sheet has + * loaded. Create a hidden div element with absolute position, assign the style + * name below, and attach it to the DOM. Use a timer to detect when the + * element's height and width are set to 5px. + */ +.gwt-Reference-clean { + height: 5px; + width: 5px; + zoom: 1; +} + +.gwt-Button { + margin: 0; + padding: 5px 7px; + text-decoration: none; + cursor: pointer; + cursor: hand; + font-size:small; + background: url("images/hborder.png") repeat-x 0px -2077px; + border:1px solid #bbb; + border-bottom: 1px solid #a0a0a0; + border-radius: 3px; + -moz-border-radius: 3px; +} +.gwt-Button:active { + border: 1px inset #ccc; +} +.gwt-Button:hover { + border-color: #939393; +} +.gwt-Button[disabled] { + cursor: default; + color: #888; +} +.gwt-Button[disabled]:hover { + border: 1px outset #ccc; +} + +.gwt-CheckBox { +} +.gwt-CheckBox-disabled { + color: #888; +} + +.gwt-DecoratorPanel { +} +.gwt-DecoratorPanel .topCenter { + border-top: 1px solid #bbb; + line-height: 0px; +} +.gwt-DecoratorPanel .bottomCenter { + border-bottom: 1px solid #bbb; + line-height: 0px; +} +.gwt-DecoratorPanel .topCenterInner, +.gwt-DecoratorPanel .bottomCenterInner { + height: 1px; + line-height: 0px; + font-size: 1px; +} +.gwt-DecoratorPanel .middleLeft { + border-left: 1px solid #bbb; +} +.gwt-DecoratorPanel .middleRight { + border-right: 1px solid #bbb; +} +.gwt-DecoratorPanel .middleLeftInner, +.gwt-DecoratorPanel .middleRightInner { + width: 1px; + line-height: 1px; +} +.gwt-DecoratorPanel .topLeftInner, +.gwt-DecoratorPanel .topRightInner, +.gwt-DecoratorPanel .bottomLeftInner, +.gwt-DecoratorPanel .bottomRightInner { + width: 5px; + height: 5px; + zoom: 1; + font-size: 1px; + overflow: hidden; +} +.gwt-DecoratorPanel .topLeft { + line-height: 0px; + background: url(images/circles.png) no-repeat 0px -6px; + -background: url(images/circles_ie6.png) no-repeat 0px -6px; +} +.gwt-DecoratorPanel .topRight { + line-height: 0px; + background: url(images/circles.png) no-repeat -5px -6px; + -background: url(images/circles_ie6.png) no-repeat -5px -6px; +} +.gwt-DecoratorPanel .bottomLeft { + line-height: 0px; + background: url(images/circles.png) no-repeat 0px -11px; + -background: url(images/circles_ie6.png) no-repeat 0px -11px; +} +.gwt-DecoratorPanel .bottomRight { + line-height: 0px; + background: url(images/circles.png) no-repeat -5px -11px; + -background: url(images/circles_ie6.png) no-repeat -5px -11px; +} +* html .gwt-DecoratorPanel .topLeftInner, +* html .gwt-DecoratorPanel .topRightInner, +* html .gwt-DecoratorPanel .bottomLeftInner, +* html .gwt-DecoratorPanel .bottomRightInner { + width: 5px; + height: 5px; + overflow: hidden; +} + +.gwt-DialogBox .Caption { + background: #F1F1F1; + padding: 4px 8px 4px 4px; + cursor: default; + font-family: Arial Unicode MS, Arial, sans-serif; + font-weight: bold; + border-bottom: 1px solid #bbbbbb; + border-top: 1px solid #D2D2D2; +} +.gwt-DialogBox .dialogContent { +} +.gwt-DialogBox .dialogMiddleCenter { + padding: 3px; + background: white; +} +.gwt-DialogBox .dialogBottomCenter { + background: url(images/hborder.png) repeat-x 0px -2945px; + -background: url(images/hborder_ie6.png) repeat-x 0px -2144px; +} +.gwt-DialogBox .dialogMiddleLeft { + background: url(images/vborder.png) repeat-y -31px 0px; +} +.gwt-DialogBox .dialogMiddleRight { + background: url(images/vborder.png) repeat-y -32px 0px; + -background: url(images/vborder_ie6.png) repeat-y -32px 0px; +} +.gwt-DialogBox .dialogTopLeftInner { + width: 10px; + height: 8px; + zoom: 1; +} +.gwt-DialogBox .dialogTopRightInner { + width: 12px; + zoom: 1; +} +.gwt-DialogBox .dialogBottomLeftInner { + width: 10px; + height: 12px; + zoom: 1; +} +.gwt-DialogBox .dialogBottomRightInner { + width: 12px; + height: 12px; + zoom: 1; +} +.gwt-DialogBox .dialogTopLeft { + background: url(images/circles.png) no-repeat -20px 0px; + -background: url(images/circles_ie6.png) no-repeat -20px 0px; +} +.gwt-DialogBox .dialogTopRight { + background: url(images/circles.png) no-repeat -28px 0px; + -background: url(images/circles_ie6.png) no-repeat -28px 0px; +} +.gwt-DialogBox .dialogBottomLeft { + background: url(images/circles.png) no-repeat 0px -36px; + -background: url(images/circles_ie6.png) no-repeat 0px -36px; +} +.gwt-DialogBox .dialogBottomRight { + background: url(images/circles.png) no-repeat -8px -36px; + -background: url(images/circles_ie6.png) no-repeat -8px -36px; +} +* html .gwt-DialogBox .dialogTopLeftInner { + width: 10px; + overflow: hidden; +} +* html .gwt-DialogBox .dialogTopRightInner { + width: 12px; + overflow: hidden; +} +* html .gwt-DialogBox .dialogBottomLeftInner { + width: 10px; + height: 12px; + overflow: hidden; +} +* html .gwt-DialogBox .dialogBottomRightInner { + width: 12px; + height: 12px; + overflow: hidden; +} + +.gwt-DisclosurePanel { +} +.gwt-DisclosurePanel-open { +} +.gwt-DisclosurePanel-closed { +} +.gwt-DisclosurePanel .header, +.gwt-DisclosurePanel .header a, +.gwt-DisclosurePanel .header td { + text-decoration: none; /* Remove underline from header */ + color: black; + cursor: pointer; + cursor: hand; +} +.gwt-DisclosurePanel .content { + border-left: 3px solid #e7e7e7; + padding: 4px 0px 4px 8px; + margin-left: 6px; +} + +.gwt-FileUpload { +} + +.gwt-Frame { + border-top: 2px solid #666; + border-left: 2px solid #666; + border-right: 2px solid #bbb; + border-bottom: 2px solid #bbb; +} + +.gwt-HorizontalSplitPanel { +} +.gwt-HorizontalSplitPanel .hsplitter { + cursor: move; + border: 0px; + background: #e7e7e7; + line-height: 0px; +} +.gwt-VerticalSplitPanel { +} +.gwt-VerticalSplitPanel .vsplitter { + cursor: move; + border: 0px; + background: #e7e7e7; + line-height: 0px; +} + +.gwt-HTML { + padding: 0 0px; +} + +.gwt-Hyperlink { + cursor: pointer; +} + +.gwt-Image { +} + +.gwt-Label { +} + +.gwt-ListBox { +} + +.gwt-MenuBar { + cursor: default; +} +.gwt-MenuBar .gwt-MenuItem { + cursor: default; + font-family: Arial Unicode MS, Arial, sans-serif; +} +.gwt-MenuBar .gwt-MenuItem-selected { + background: #E3E8F3; +} +.gwt-MenuBar-horizontal { + background: #e3e8f3 url(images/hborder.png) repeat-x 0px -2003px; + border: 1px solid #e0e0e0; +} +.gwt-MenuBar-horizontal .gwt-MenuItem { + padding: 5px 10px; + vertical-align: bottom; + color: #000; + font-weight: bold; +} +.gwt-MenuBar-horizontal .gwt-MenuItemSeparator { + width: 1px; + padding: 0px; + margin: 0px; + border: 0px; + border-left: 1px solid #ccc; + background: white; +} +.gwt-MenuBar-horizontal .gwt-MenuItemSeparator .menuSeparatorInner { + width: 1px; + height: 1px; + background: white; +} +.gwt-MenuBar-vertical { + margin-top: 0px; + margin-left: 0px; + background: white; +} +.gwt-MenuBar-vertical table { + border-collapse: collapse; +} +.gwt-MenuBar-vertical .gwt-MenuItem { + padding: 2px 40px 2px 1px; +} +.gwt-MenuBar-vertical .gwt-MenuItemSeparator { + padding: 2px 0px; +} +.gwt-MenuBar-vertical .gwt-MenuItemSeparator .menuSeparatorInner { + height: 1px; + padding: 0px; + border: 0px; + border-top: 1px solid #ccc; + overflow: hidden; +} +.gwt-MenuBar-vertical .subMenuIcon { + padding-right: 4px; +} +.gwt-MenuBar-vertical .subMenuIcon-selected { + background: #E3E8F3; +} +.gwt-MenuBarPopup { + margin: 0px 0px 0px 3px; +} +.gwt-MenuBarPopup .menuPopupTopCenter { + background: url(images/hborder.png) 0px -12px repeat-x; +} +.gwt-MenuBarPopup .menuPopupBottomCenter { + background: url(images/hborder.png) 0px -13px repeat-x; + -background: url(images/hborder_ie6.png) 0px -13px repeat-x; +} +.gwt-MenuBarPopup .menuPopupMiddleLeft { + background: url(images/vborder.png) -12px 0px repeat-y; + -background: url(images/vborder_ie6.png) -12px 0px repeat-y; +} +.gwt-MenuBarPopup .menuPopupMiddleRight { + background: url(images/vborder.png) -13px 0px repeat-y; + -background: url(images/vborder_ie6.png) -13px 0px repeat-y; +} +.gwt-MenuBarPopup .menuPopupTopLeftInner { + width: 5px; + height: 5px; + zoom: 1; +} +.gwt-MenuBarPopup .menuPopupTopRightInner { + width: 8px; + height: 5px; + zoom: 1; +} +.gwt-MenuBarPopup .menuPopupBottomLeftInner { + width: 5px; + height: 8px; + zoom: 1; +} +.gwt-MenuBarPopup .menuPopupBottomRightInner { + width: 8px; + height: 8px; + zoom: 1; +} +.gwt-MenuBarPopup .menuPopupTopLeft { + background: url(images/corner.png) no-repeat 0px -36px; + -background: url(images/corner_ie6.png) no-repeat 0px -36px; +} +.gwt-MenuBarPopup .menuPopupTopRight { + background: url(images/corner.png) no-repeat -5px -36px; + -background: url(images/corner_ie6.png) no-repeat -5px -36px; +} +.gwt-MenuBarPopup .menuPopupBottomLeft { + background: url(images/corner.png) no-repeat 0px -41px; + -background: url(images/corner_ie6.png) no-repeat 0px -41px; +} +.gwt-MenuBarPopup .menuPopupBottomRight { + background: url(images/corner.png) no-repeat -5px -41px; + -background: url(images/corner_ie6.png) no-repeat -5px -41px; +} +* html .gwt-MenuBarPopup .menuPopupTopLeftInner { + width: 5px; + height: 5px; + overflow: hidden; +} +* html .gwt-MenuBarPopup .menuPopupTopRightInner { + width: 8px; + height: 5px; + overflow: hidden; +} +* html .gwt-MenuBarPopup .menuPopupBottomLeftInner { + width: 5px; + height: 8px; + overflow: hidden; +} +* html .gwt-MenuBarPopup .menuPopupBottomRightInner { + width: 8px; + height: 8px; + overflow: hidden; +} + +.gwt-PasswordTextBox { + padding: 5px 4px; + border: 1px solid #ccc; + border-top: 1px solid #999; + font-size: 100%; +} +.gwt-PasswordTextBox-readonly { + color: #888; +} + +.gwt-PopupPanel { + border: 3px solid #e7e7e7; + padding: 3px; + background: white; +} + +.gwt-DecoratedPopupPanel .popupContent { +} +.gwt-DecoratedPopupPanel .popupMiddleCenter { + padding: 3px; + background: #f1f1f1; +} +.gwt-DecoratedPopupPanel .popupTopCenter { + background: url(images/hborder.png) 0px -2937px repeat-x; +} +.gwt-DecoratedPopupPanel .popupBottomCenter { + background: url(images/hborder.png) repeat-x 0px -2938px; + -background: url(images/hborder_ie6.png) repeat-x 0px -2138px; +} +.gwt-DecoratedPopupPanel .popupMiddleLeft { + background: url(images/vborder.png) -21px 0px repeat-y; +} +.gwt-DecoratedPopupPanel .popupMiddleRight { + background: url(images/vborder.png) repeat-y -24px 0px; + -background: url(images/vborder_ie6.png) repeat-y -24px 0px; +} +.gwt-DecoratedPopupPanel .popupTopLeftInner { + width: 6px; + height: 5px; + zoom: 1; +} +.gwt-DecoratedPopupPanel .popupTopRightInner { + width: 6px; + height: 5px; + zoom: 1; +} +.gwt-DecoratedPopupPanel .popupBottomLeftInner { + width: 6px; + height: 6px; + zoom: 1; +} +.gwt-DecoratedPopupPanel .popupBottomRightInner { + width: 6px; + height: 6px; + zoom: 1; +} +.gwt-DecoratedPopupPanel .popupTopLeft { + background: url(images/circles.png) no-repeat 0px -16px; + -background: url(images/circles_ie6.png) no-repeat 0px -16px; +} +.gwt-DecoratedPopupPanel .popupTopRight { + background: url(images/circles.png) no-repeat -6px -16px; + -background: url(images/circles_ie6.png) no-repeat -6px -16px; +} +.gwt-DecoratedPopupPanel .popupBottomLeft { + background: url(images/circles.png) no-repeat 0px -21px; + -background: url(images/circles_ie6.png) no-repeat 0px -21px; +} +.gwt-DecoratedPopupPanel .popupBottomRight { + background: url(images/circles.png) no-repeat -6px -21px; + -background: url(images/circles_ie6.png) no-repeat -6px -21px; +} +* html .gwt-DecoratedPopupPanel .popupTopLeftInner { + width: 6px; + height: 5px; + overflow: hidden; +} +* html .gwt-DecoratedPopupPanel .popupTopRightInner { + width: 6px; + height: 5px; + overflow: hidden; +} +* html .gwt-DecoratedPopupPanel .popupBottomLeftInner { + width: 6px; + height: 6px; + overflow: hidden; +} +* html .gwt-DecoratedPopupPanel .popupBottomRightInner { + width: 6px; + height: 6px; + overflow: hidden; +} + +.gwt-PopupPanelGlass { + background-color: #000; + opacity: 0.3; + filter: alpha(opacity=30); +} + +.gwt-PushButton-up, +.gwt-PushButton-up-hovering, +.gwt-PushButton-up-disabled, +.gwt-PushButton-down, +.gwt-PushButton-down-hovering, +.gwt-PushButton-down-disabled { + margin: 0; + text-decoration: none; + background: url("images/hborder.png") repeat-x 0px -27px; + border-radius: 2px; + -moz-border-radius: 2px; +} +.gwt-PushButton-up, +.gwt-PushButton-up-hovering, +.gwt-PushButton-up-disabled { + padding: 3px 5px 3px 5px; +} +.gwt-PushButton-up { + border:1px solid #bbb; + border-bottom: 1px solid #a0a0a0; + cursor: pointer; + cursor: hand; +} +.gwt-PushButton-up-hovering { + border: 1px solid; + border-color: #939393; + cursor: pointer; + cursor: hand; +} +.gwt-PushButton-up-disabled { + border: 1px solid #bbb; + cursor: default; + opacity: .5; + filter: alpha(opacity=45); + zoom: 1; +} +.gwt-PushButton-down, +.gwt-PushButton-down-hovering, +.gwt-PushButton-down-disabled { + padding: 4px 4px 2px 6px; + outline:none; +} +.gwt-PushButton-down { + border: 1px inset #666; + cursor: pointer; + cursor: hand; +} +.gwt-PushButton-down-hovering { + border: 1px solid #939393; + border-top: 1px solid #333333; + cursor: pointer; + cursor: hand; +} +.gwt-PushButton-down-disabled { + border: 1px outset #ccc; + cursor: default; + opacity: 0.5; + filter: alpha(opacity=45); + zoom: 1; +} + +.gwt-RadioButton { +} +.gwt-RadioButton-disabled { + color: #888; +} + +.gwt-RichTextArea { +} +.hasRichTextToolbar { + border: 0px; +} +.gwt-RichTextToolbar { + background: #e3e8f3 url(images/hborder.png) repeat-x 0px -2003px; + border-bottom: 1px solid #BBBBBB; + padding: 3px; + margin: 0px; +} +.gwt-RichTextToolbar .gwt-PushButton-up { + padding: 0px 1px 0px 0px; + margin-right: 4px; + margin-bottom: 4px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-PushButton-up-hovering { + margin-right: 4px; + margin-bottom: 4px; + padding: 0px 1px 0px 0px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-PushButton-down { + margin-right: 4px; + margin-bottom: 4px; + padding: 0px 0px 0px 1px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-PushButton-down-hovering { + margin-right: 4px; + margin-bottom: 4px; + padding: 0px 0px 0px 1px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-ToggleButton-up { + margin-right: 4px; + margin-bottom: 4px; + padding: 0px 1px 0px 0px; + border:1px solid #bbb; + border-bottom: 1px solid #a0a0a0; +} +.gwt-RichTextToolbar .gwt-ToggleButton-up-hovering { + margin-right: 4px; + margin-bottom: 4px; + padding: 0px 1px 0px 0px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-ToggleButton-down { + margin-right: 4px; + margin-bottom: 4px; + padding: 0px 0px 0px 1px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-ToggleButton-down-hovering { + margin-right: 4px; + margin-bottom: 4px; + padding: 0px 0px 0px 1px; + border-width: 1px; +} + +.gwt-StackPanel { + border-bottom: 1px solid #bbbbbb; +} +.gwt-StackPanel .gwt-StackPanelItem { + cursor: pointer; + cursor: hand; + font-weight: bold; + font-size: 1.3em; + padding: 3px; + border: 1px solid #bbbbbb; + border-bottom: 0px; + background: #d3def6 url(images/hborder.png) repeat-x 0px -989px; +} +.gwt-StackPanel .gwt-StackPanelContent { + border: 1px solid #bbbbbb; + border-bottom: 0px; + background: white; + padding: 2px 2px 10px 5px; +} + +.gwt-DecoratedStackPanel { + border-bottom: 1px solid #bbbbbb; +} +.gwt-DecoratedStackPanel .gwt-StackPanelContent { + border: 1px solid #bbbbbb; + border-bottom: 0px; + background: white; + padding: 2px 2px 10px 5px; +} +.gwt-DecoratedStackPanel .gwt-StackPanelItem { + cursor: pointer; + cursor: hand; +} +.gwt-DecoratedStackPanel .stackItemTopLeft, +.gwt-DecoratedStackPanel .stackItemTopRight { + height: 6px; + width: 6px; + zoom: 1; +} +.gwt-DecoratedStackPanel .stackItemTopLeft { + border-left: 1px solid #bbbbbb; + background: #d3def6 url(images/corner.png) no-repeat 0px -49px; + -background: #d3def6 url(images/corner_ie6.png) no-repeat 0px -49px; +} +.gwt-DecoratedStackPanel .stackItemTopRight { + border-right: 1px solid #bbbbbb; + background: #d3def6 url(images/corner.png) no-repeat -6px -49px; + -background: #d3def6 url(images/corner_ie6.png) no-repeat -6px -49px; +} +.gwt-DecoratedStackPanel .stackItemTopLeftInner, +.gwt-DecoratedStackPanel .stackItemTopRightInner { + width: 1px; + height: 1px; +} +* html .gwt-DecoratedStackPanel .stackItemTopLeftInner, +* html .gwt-DecoratedStackPanel .stackItemTopRightInner { + width: 6px; + height: 6px; + overflow: hidden; +} +.gwt-DecoratedStackPanel .stackItemTopCenter { + background: url(images/hborder.png) 0px -21px repeat-x; +} +.gwt-DecoratedStackPanel .stackItemMiddleLeft { + background: #d3def6 url(images/hborder.png) repeat-x 0px -989px; + border-left: 1px solid #bbbbbb; +} +.gwt-DecoratedStackPanel .stackItemMiddleLeftInner, +.gwt-DecoratedStackPanel .stackItemMiddleRightInner { + width: 1px; + height: 1px; +} +.gwt-DecoratedStackPanel .stackItemMiddleRight { + background: #d3def6 url(images/hborder.png) repeat-x 0px -989px; + border-right: 1px solid #bbbbbb; +} +.gwt-DecoratedStackPanel .stackItemMiddleCenter { + font-weight: bold; + font-size: 1.3em; + background: #d3def6 url(images/hborder.png) repeat-x 0px -989px; +} +.gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopRight, +.gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopLeft { + border: 0px; + background-color: white; +} +.gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopLeft, +.gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopRight { + background-color: white; +} + +.gwt-SuggestBox { + padding: 5px 4px; + border: 1px solid #ccc; + border-top: 1px solid #999; + font-size: 100%; + font-family: Arial Unicode MS, Arial, sans-serif; +} + +.gwt-SuggestBoxPopup { +} + +.gwt-SuggestBoxPopup .item { + padding: 2px 6px; + color: #000; + cursor: default; + font-size: 110%; +} +.gwt-SuggestBoxPopup .item-selected { + background: #D5E2FF; +} +.gwt-SuggestBoxPopup .suggestPopupContent { + background: white; +} +.gwt-SuggestBoxPopup .suggestPopupTopCenter { + border-top: 1px solid #bbb; +} +.gwt-SuggestBoxPopup .suggestPopupBottomCenter { + border-bottom: 1px solid #bbb; +} +.gwt-SuggestBoxPopup .suggestPopupTopCenterInner, +.gwt-SuggestBoxPopup .suggestPopupBottomCenterInner { + height: 1px; + line-height: 1px; +} +.gwt-SuggestBoxPopup .suggestPopupMiddleLeft { + border-left: 1px solid #bbb; +} +.gwt-SuggestBoxPopup .suggestPopupMiddleRight { + border-right: 1px solid #bbb; +} +.gwt-SuggestBoxPopup .suggestPopupMiddleLeftInner, +.gwt-SuggestBoxPopup .suggestPopupMiddleRightInner { + width: 1px; + line-height: 1px; +} +.gwt-SuggestBoxPopup .suggestPopupTopLeftInner { + width: 0px; + height: 0px; + zoom: 1; +} +.gwt-SuggestBoxPopup .suggestPopupTopRightInner { + width: 0px; + height: 0px; + zoom: 1; +} +.gwt-SuggestBoxPopup .suggestPopupBottomLeftInner { + width: 0px; + height: 0px; + zoom: 1; +} +.gwt-SuggestBoxPopup .suggestPopupBottomRightInner { + width: 0px; + height: 0px; + zoom: 1; +} +.gwt-SuggestBoxPopup .suggestPopupTopLeft { + background: url(images/circles.png) no-repeat 0px -6px; + -background: url(images/circles_ie6.png) no-repeat 0px -6px; + width:5px; + height:5px; +} +.gwt-SuggestBoxPopup .suggestPopupTopRight { + background: url(images/circles.png) no-repeat -5px -6px; + -background: url(images/circles_ie6.png) no-repeat -5px -6px; + width:5px; + height:5px; +} +.gwt-SuggestBoxPopup .suggestPopupBottomLeft { + background: url(images/circles.png) no-repeat 0px -11px; + -background: url(images/circles_ie6.png) no-repeat 0px -11px; + width:5px; + height:5px; +} +.gwt-SuggestBoxPopup .suggestPopupBottomRight { + background: url(images/circles.png) no-repeat -5px -11px; + -background: url(images/circles_ie6.png) no-repeat -5px -11px; + width:5px; + height:5px; +} +* html .gwt-SuggestBoxPopup .suggestPopupTopLeftInner { + width: 0px; + height: 0px; + overflow: hidden; +} +* html .gwt-SuggestBoxPopup .suggestPopupTopRightInner { + width: 0px; + height: 0px; + overflow: hidden; +} +* html .gwt-SuggestBoxPopup .suggestPopupBottomLeftInner { + width: 0px; + height: 0px; + overflow: hidden; +} +* html .gwt-SuggestBoxPopup .suggestPopupBottomRightInner { + width: 0px; + height: 0px; + overflow: hidden; +} + +.gwt-TabBar { + background: #ccc; + padding-top: 6px; +} +.gwt-TabBar .gwt-TabBarFirst { + width: 5px; /* first tab distance from the left */ +} +.gwt-TabBar .gwt-TabBarRest { +} +.gwt-TabBar .gwt-TabBarItem { + margin-left: 4px; + padding: 4px 8px 4px 8px; + cursor: pointer; + cursor: hand; + color: white; + font-weight: normal; + text-align: center; + background: #8E8E8E; + -moz-border-radius: 3px 3px 0px 0px; + border-radius: 3px 3px 0px 0px; +} +.gwt-TabBar .gwt-TabBarItem-selected { + cursor: default; + background: white; + color: #333; + font-weight: bold; +} +.gwt-TabBar .gwt-TabBarItem-disabled { + cursor: default; + color: #999999; +} +.gwt-TabPanel { +} +.gwt-TabPanelBottom { + border-color: #ccc; + border-style: solid; + border-width: 0px 1px 1px; + overflow: hidden; + padding: 6px; +} +.gwt-DecoratedTabBar { + background: #ccc; + padding-top: 6px; +} +.gwt-DecoratedTabBar .gwt-TabBarFirst { + width: 5px; /* first tab distance from the left */ +} +.gwt-DecoratedTabBar .gwt-TabBarRest { +} +.gwt-DecoratedTabBar .gwt-TabBarItem { + border-collapse: collapse; + margin-left: 4px; +} +.gwt-DecoratedTabBar .tabTopCenter { + padding: 0px; + background: #8E8E8E; +} +.gwt-DecoratedTabBar .tabTopLeft, +.gwt-DecoratedTabBar .tabTopRight { + padding: 0px; + zoom: 1; +} +.gwt-DecoratedTabBar .tabTopLeftInner, +.gwt-DecoratedTabBar .tabTopRightInner { + width: 3px; + height: 3px; +} +.gwt-DecoratedTabBar .tabTopLeft { + background: url(images/circles.png) no-repeat 0px 0px; + -background: url(images/circles_ie6.png) no-repeat 0px 0px; +} +.gwt-DecoratedTabBar .tabTopRight { + background: url(images/circles.png) no-repeat -3px 0px; + -background: url(images/circles_ie6.png) no-repeat -3px 0px; +} +* html .gwt-DecoratedTabBar .tabTopLeftInner, +* html .gwt-DecoratedTabBar .tabTopRightInner { + width: 3px; + height: 3px; + overflow: hidden; +} +.gwt-DecoratedTabBar .tabMiddleLeft, +.gwt-DecoratedTabBar .tabMiddleRight { + width: 3px; + padding: 0px; + background: #8E8E8E; +} +.gwt-DecoratedTabBar .tabMiddleLeftInner, +.gwt-DecoratedTabBar .tabMiddleRightInner { + width: 1px; + height: 1px; +} +.gwt-DecoratedTabBar .tabMiddleCenter { + padding: 0px 5px 4px 5px; + cursor: pointer; + cursor: hand; + color: #fff; + font-weight: normal; + text-align: center; + background: #8E8E8E; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopCenter { + background:#fff; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopLeft { + background: url(images/circles.png) no-repeat -6px 0px; + -background: url(images/circles_ie6.png) no-repeat -6px 0px; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopRight { + background: url(images/circles.png) no-repeat -9px 0px; + -background: url(images/circles_ie6.png) no-repeat -9px 0px; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleLeft, +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleRight { + background: #fff; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleCenter { + cursor: default; + background: #fff; + color:#333; + font-weight:bold; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-disabled .tabMiddleCenter { + cursor: default; + color: #999999; +} + +.gwt-TextArea { + padding: 4px; + border: 1px solid #ccc; + border-top: 1px solid #666; + font-size: 100%; + font-family: Arial Unicode MS, Arial, sans-serif; +} +.gwt-TextArea-readonly { + color: #888; +} + +.gwt-TextBox { + padding: 5px 4px; + border: 1px solid #ccc; + border-top: 1px solid #999; + font-size: small; + font-family: Arial Unicode MS, Arial, sans-serif; +} +.gwt-TextBox-readonly { + color: #888; +} +.gwt-ToggleButton-up, +.gwt-ToggleButton-up-hovering, +.gwt-ToggleButton-up-disabled, +.gwt-ToggleButton-down, +.gwt-ToggleButton-down-hovering, +.gwt-ToggleButton-down-disabled { + margin: 0; + text-decoration: none; + background: url("images/hborder.png") repeat-x 0px -27px; + -moz-border-radius: 2px; + border-radius: 2px; +} +.gwt-ToggleButton-up, +.gwt-ToggleButton-up-hovering, +.gwt-ToggleButton-up-disabled { + padding: 3px 5px 3px 5px; +} +.gwt-ToggleButton-up { + border:1px solid #bbb; + border-bottom: 1px solid #a0a0a0; + cursor: pointer; + cursor: hand; +} +.gwt-ToggleButton-up-hovering { + border: 1px solid; + border-color: #939393; + cursor: pointer; + cursor: hand; +} +.gwt-ToggleButton-up-disabled { + border: 1px solid #bbb; + cursor: default; + opacity: .5; + zoom: 1; + filter: alpha(opacity=45); +} +.gwt-ToggleButton-down, +.gwt-ToggleButton-down-hovering, +.gwt-ToggleButton-down-disabled { + padding: 4px 4px 2px 6px; +} +.gwt-ToggleButton-down { + background-position: 0 -513px; + border: 1px inset #666; + cursor: pointer; + cursor: hand; +} +.gwt-ToggleButton-down-hovering { + background-position: 0 -513px; + border: 1px inset; + border-color: #9cf #69e #69e #7af; + cursor: pointer; + cursor: hand; +} +.gwt-ToggleButton-down-disabled { + background-position: 0 -513px; + border: 1px inset #ccc; + cursor: default; + opacity: .5; + zoom: 1; + filter: alpha(opacity=45); +} + +.gwt-Tree .gwt-TreeItem { + padding: 1px 0px; + margin: 0px; + white-space: nowrap; + cursor: hand; + cursor: pointer; +} +.gwt-Tree .gwt-TreeItem-selected { + background: #ebeff9; +} +.gwt-TreeItem .gwt-RadioButton input, +.gwt-TreeItem .gwt-CheckBox input { + margin-left: 0px; +} +* html .gwt-TreeItem .gwt-RadioButton input, +* html .gwt-TreeItem .gwt-CheckBox input { + margin-left: -4px; +} + +.gwt-DateBox { + padding: 5px 4px; + border: 1px solid #ccc; + border-top: 1px solid #999; + font-size: 100%; +} +.gwt-DateBox input { + width: 8em; +} +.dateBoxFormatError { + background: #ffcccc; +} +.dateBoxPopup { +} + +.gwt-DatePicker { + border: 1px solid #ccc; + border-top:1px solid #999; + cursor: default; +} +.gwt-DatePicker td, +.datePickerMonthSelector td:focus { + outline: none; +} +.datePickerDays { + width: 100%; + background: white; +} +.datePickerDay, +.datePickerWeekdayLabel, +.datePickerWeekendLabel { + font-size: 85%; + text-align: center; + padding: 4px; + outline: none; + font-weight:bold; + color:#333; + border-right: 1px solid #EDEDED; + border-bottom: 1px solid #EDEDED; +} +.datePickerWeekdayLabel, +.datePickerWeekendLabel { + background: #fff; + padding: 0px 4px 2px; + cursor: default; + color:#666; + font-size:70%; + font-weight:normal; +} +.datePickerDay { + padding: 4px 7px; + cursor: hand; + cursor: pointer; +} +.datePickerDayIsWeekend { + background: #f7f7f7; +} +.datePickerDayIsFiller { + color: #999; + font-weight:normal; +} +.datePickerDayIsValue { + background: #d7dfe8; +} +.datePickerDayIsDisabled { + color: #AAAAAA; + font-style: italic; +} +.datePickerDayIsHighlighted { + background: #F0E68C; +} +.datePickerDayIsValueAndHighlighted { + background: #d7dfe8; +} +.datePickerDayIsToday { + padding: 3px; + color: #fff; + background: url(images/hborder.png) repeat-x 0px -2607px; +} + +.datePickerMonthSelector { + width: 100%; + padding: 1px 0 5px 0; + background: #fff; +} +td.datePickerMonth { + text-align: center; + vertical-align: middle; + white-space: nowrap; + font-size: 100%; + font-weight: bold; + color: #333; +} +.datePickerPreviousButton, +.datePickerNextButton { + font-size: 120%; + line-height: 1em; + color: #3a6aad; + cursor: hand; + cursor: pointer; + font-weight: bold; + padding: 0px 4px; + outline: none; +} + +.gwt-StackLayoutPanel { + border-bottom: 1px solid #bbbbbb; +} +.gwt-StackLayoutPanel .gwt-StackLayoutPanelHeader { + cursor: pointer; + cursor: hand; + font-weight: bold; + font-size: 1.3em; + padding: 3px; + border: 1px solid #bbbbbb; + border-bottom: 0px; + background: #d3def6 url(images/hborder.png) repeat-x 0px -989px; +} +.gwt-StackLayoutPanel .gwt-StackLayoutPanelHeader-hovering { + background: #d3def6; +} +.gwt-StackLayoutPanel .gwt-StackLayoutPanelContent { + border: 1px solid #bbbbbb; + border-bottom: 0px; + background: white; + padding: 2px 2px 10px 5px; +} + +.gwt-TabLayoutPanel { +} +.gwt-TabLayoutPanel .gwt-TabLayoutPanelTabs { + background: #ccc; + padding-top: 6px; + padding-left: 5px; +} +.gwt-TabLayoutPanel .gwt-TabLayoutPanelContentContainer { + border-color: #ccc; + border-style: solid; + border-width: 0px 1px 1px; +} +.gwt-TabLayoutPanel .gwt-TabLayoutPanelContent { + overflow: hidden; + padding: 6px; +} +.gwt-TabLayoutPanel .gwt-TabLayoutPanelTab { + margin-left: 4px; + padding: 4px 8px 4px 8px; + cursor: pointer; + cursor: hand; + color: white; + font-weight: normal; + text-align: center; + background: #8E8E8E; + -moz-border-radius: 3px 3px 0px 0px; + border-radius: 3px 3px 0px 0px; +} +.gwt-TabLayoutPanel .gwt-TabLayoutPanelTab-selected { + cursor: default; + background: white; + color: #333; + font-weight: bold; +} + +.gwt-SplitLayoutPanel-HDragger { + background: #e7e7e7 url(images/thumb_vertical.png) center center no-repeat; + cursor: col-resize; +} + +.gwt-SplitLayoutPanel-VDragger { + background: #e7e7e7 url(images/thumb_horz.png) center center no-repeat; + cursor: row-resize; +} \ No newline at end of file diff --git a/war/stargenetics_gwt_java/gwt/clean/clean_rtl.css b/war/stargenetics_gwt_java/gwt/clean/clean_rtl.css new file mode 100644 index 0000000..7e2c695 --- /dev/null +++ b/war/stargenetics_gwt_java/gwt/clean/clean_rtl.css @@ -0,0 +1,1265 @@ +/** + * The file contains styles for GWT widgets in the Clean theme, in RTL mode. + * + * In order to maintain cross-browser compatibility, the following syntax is + * used to create IE6 specific style rules: + * .gwt-Widget { + * property: rule applies to all browsers + * -property: rule applies only to IE6 (overrides previous rule) + * } + * * html .gwt-Widget { + * property: rule applies to all versions of IE + * } + */ + +body, table td, select, button { + font-family: Arial Unicode MS, Arial, sans-serif; + font-size: small; +} +pre { + font-family: "courier new", courier; + font-size: small; +} +body { + color: black; + margin: 10px; + border: 0px; + padding: 0px; + background: #fff; + direction: rtl; +} +a, a:visited { + color: #0066cc; + text-decoration:none; +} + +a:hover { + color: #0066cc; + text-decoration:underline; +} + +select { + background: white; +} + +/** + * The reference theme can be used to determine when this style sheet has + * loaded. Create a hidden div element with absolute position, assign the style + * name below, and attach it to the DOM. Use a timer to detect when the + * element's height and width are set to 5px. + */ +.gwt-Reference-clean-rtl { + height: 5px; + width: 5px; + zoom: 1; +} + +.gwt-Button { + margin: 0; + padding: 5px 7px; + text-decoration: none; + cursor: pointer; + cursor: hand; + font-size:small; + background: url("images/hborder.png") repeat-x 0px -2077px; + border:1px solid #bbb; + border-bottom: 1px solid #a0a0a0; + border-radius: 3px; + -moz-border-radius: 3px; +} +.gwt-Button:active { + border: 1px inset #ccc; +} +.gwt-Button:hover { + border-color: #939393; +} +.gwt-Button[disabled] { + cursor: default; + color: #888; +} +.gwt-Button[disabled]:hover { + border: 1px outset #ccc; +} + +.gwt-CheckBox { +} +.gwt-CheckBox-disabled { + color: #888; +} + +.gwt-DecoratorPanel { +} +.gwt-DecoratorPanel .topCenter { + border-top: 1px solid #bbb; + line-height: 0px; +} +.gwt-DecoratorPanel .bottomCenter { + border-bottom: 1px solid #bbb; + line-height: 0px; +} +.gwt-DecoratorPanel .topCenterInner, +.gwt-DecoratorPanel .bottomCenterInner { + height: 1px; + line-height: 0px; + font-size: 1px; +} +.gwt-DecoratorPanel .middleLeft { + border-left: 1px solid #bbb; +} +.gwt-DecoratorPanel .middleRight { + border-right: 1px solid #bbb; +} +.gwt-DecoratorPanel .middleLeftInner, +.gwt-DecoratorPanel .middleRightInner { + width: 1px; + line-height: 1px; +} +.gwt-DecoratorPanel .topLeftInner, +.gwt-DecoratorPanel .topRightInner, +.gwt-DecoratorPanel .bottomLeftInner, +.gwt-DecoratorPanel .bottomRightInner { + width: 5px; + height: 5px; + zoom: 1; + font-size: 1px; + overflow: hidden; +} +.gwt-DecoratorPanel .topLeft { + line-height: 0px; + background: url(images/circles.png) no-repeat 0px -6px; + -background: url(images/circles_ie6.png) no-repeat 0px -6px; +} +.gwt-DecoratorPanel .topRight { + line-height: 0px; + background: url(images/circles.png) no-repeat -5px -6px; + -background: url(images/circles_ie6.png) no-repeat -5px -6px; +} +.gwt-DecoratorPanel .bottomLeft { + line-height: 0px; + background: url(images/circles.png) no-repeat 0px -11px; + -background: url(images/circles_ie6.png) no-repeat 0px -11px; +} +.gwt-DecoratorPanel .bottomRight { + line-height: 0px; + background: url(images/circles.png) no-repeat -5px -11px; + -background: url(images/circles_ie6.png) no-repeat -5px -11px; +} +* html .gwt-DecoratorPanel .topLeftInner, +* html .gwt-DecoratorPanel .topRightInner, +* html .gwt-DecoratorPanel .bottomLeftInner, +* html .gwt-DecoratorPanel .bottomRightInner { + width: 5px; + height: 5px; + overflow: hidden; +} + +.gwt-DialogBox .Caption { + background: #F1F1F1; + padding: 4px 4px 4px 8px; + cursor: default; + font-family: Arial Unicode MS, Arial, sans-serif; + font-weight: bold; + border-bottom: 1px solid #bbbbbb; + border-top: 1px solid #D2D2D2; +} +.gwt-DialogBox .dialogContent { +} +.gwt-DialogBox .dialogMiddleCenter { + padding: 3px; + background: white; +} +.gwt-DialogBox .dialogBottomCenter { + background: url(images/hborder.png) repeat-x 0px -2945px; + -background: url(images/hborder_ie6.png) repeat-x 0px -2144px; +} +.gwt-DialogBox .dialogMiddleLeft { + background: url(images/vborder.png) repeat-y -31px 0px; +} +.gwt-DialogBox .dialogMiddleRight { + background: url(images/vborder.png) repeat-y -32px 0px; + -background: url(images/vborder_ie6.png) repeat-y -32px 0px; +} +.gwt-DialogBox .dialogTopLeftInner { + width: 10px; + height: 8px; + zoom: 1; +} +.gwt-DialogBox .dialogTopRightInner { + width: 12px; + zoom: 1; +} +.gwt-DialogBox .dialogBottomLeftInner { + width: 10px; + height: 12px; + zoom: 1; +} +.gwt-DialogBox .dialogBottomRightInner { + width: 12px; + height: 12px; + zoom: 1; +} +.gwt-DialogBox .dialogTopLeft { + background: url(images/circles.png) no-repeat -20px 0px; + -background: url(images/circles_ie6.png) no-repeat -20px 0px; +} +.gwt-DialogBox .dialogTopRight { + background: url(images/circles.png) no-repeat -28px 0px; + -background: url(images/circles_ie6.png) no-repeat -28px 0px; +} +.gwt-DialogBox .dialogBottomLeft { + background: url(images/circles.png) no-repeat 0px -36px; + -background: url(images/circles_ie6.png) no-repeat 0px -36px; +} +.gwt-DialogBox .dialogBottomRight { + background: url(images/circles.png) no-repeat -8px -36px; + -background: url(images/circles_ie6.png) no-repeat -8px -36px; +} +* html .gwt-DialogBox .dialogTopLeftInner { + width: 10px; + overflow: hidden; +} +* html .gwt-DialogBox .dialogTopRightInner { + width: 12px; + overflow: hidden; +} +* html .gwt-DialogBox .dialogBottomLeftInner { + width: 10px; + height: 12px; + overflow: hidden; +} +* html .gwt-DialogBox .dialogBottomRightInner { + width: 12px; + height: 12px; + overflow: hidden; +} + +.gwt-DisclosurePanel { +} +.gwt-DisclosurePanel-open { +} +.gwt-DisclosurePanel-closed { +} +.gwt-DisclosurePanel .header, +.gwt-DisclosurePanel .header a, +.gwt-DisclosurePanel .header td { + text-decoration: none; /* Remove underline from header */ + color: black; + cursor: pointer; + cursor: hand; +} +.gwt-DisclosurePanel .content { + border-right: 3px solid #e7e7e7; + padding: 4px 8px 4px 0px; + margin-right: 6px; +} + +.gwt-FileUpload { +} + +.gwt-Frame { + border-top: 2px solid #666; + border-left: 2px solid #666; + border-right: 2px solid #bbb; + border-bottom: 2px solid #bbb; +} + +.gwt-HorizontalSplitPanel { +} +.gwt-HorizontalSplitPanel .hsplitter { + cursor: move; + border: 0px; + background: #e7e7e7; + line-height: 0px; +} +.gwt-VerticalSplitPanel { +} +.gwt-VerticalSplitPanel .vsplitter { + cursor: move; + border: 0px; + background: #e7e7e7; + line-height: 0px; +} + +.gwt-HTML { + padding: 0 0px; +} + +.gwt-Hyperlink { + cursor: pointer; +} + +.gwt-Image { +} + +.gwt-Label { +} + +.gwt-ListBox { +} + +.gwt-MenuBar { + cursor: default; +} +.gwt-MenuBar .gwt-MenuItem { + cursor: default; + font-family: Arial Unicode MS, Arial, sans-serif; +} +.gwt-MenuBar .gwt-MenuItem-selected { + background: #E3E8F3; +} +.gwt-MenuBar-horizontal { + background: #e3e8f3 url(images/hborder.png) repeat-x 0px -2003px; + border: 1px solid #e0e0e0; +} +.gwt-MenuBar-horizontal .gwt-MenuItem { + padding: 5px 10px; + vertical-align: bottom; + color: #000; + font-weight: bold; +} +.gwt-MenuBar-horizontal .gwt-MenuItemSeparator { + width: 1px; + padding: 0px; + margin: 0px; + border: 0px; + border-right: 1px solid #ccc; + background: white; +} +.gwt-MenuBar-horizontal .gwt-MenuItemSeparator .menuSeparatorInner { + width: 1px; + height: 1px; + background: white; +} +.gwt-MenuBar-vertical { + margin-top: 0px; + margin-right: 0px; + background: white; +} +.gwt-MenuBar-vertical table { + border-collapse: collapse; +} +.gwt-MenuBar-vertical .gwt-MenuItem { + padding: 2px 1px 2px 40px; +} +.gwt-MenuBar-vertical .gwt-MenuItemSeparator { + padding: 2px 0px; +} +.gwt-MenuBar-vertical .gwt-MenuItemSeparator .menuSeparatorInner { + height: 1px; + padding: 0px; + border: 0px; + border-top: 1px solid #ccc; + overflow: hidden; +} +.gwt-MenuBar-vertical .subMenuIcon { + padding-left: 4px; +} +.gwt-MenuBar-vertical .subMenuIcon-selected { + background: #E3E8F3; +} +.gwt-MenuBarPopup { + margin: 0px 3px 0px 0px; +} +.gwt-MenuBarPopup .menuPopupTopCenter { + background: url(images/hborder.png) 0px -12px repeat-x; +} +.gwt-MenuBarPopup .menuPopupBottomCenter { + background: url(images/hborder.png) 0px -13px repeat-x; + -background: url(images/hborder_ie6.png) 0px -13px repeat-x; +} +.gwt-MenuBarPopup .menuPopupMiddleLeft { + background: url(images/vborder.png) -12px 0px repeat-y; + -background: url(images/vborder_ie6.png) -12px 0px repeat-y; +} +.gwt-MenuBarPopup .menuPopupMiddleRight { + background: url(images/vborder.png) -13px 0px repeat-y; + -background: url(images/vborder_ie6.png) -13px 0px repeat-y; +} +.gwt-MenuBarPopup .menuPopupTopLeftInner { + width: 5px; + height: 5px; + zoom: 1; +} +.gwt-MenuBarPopup .menuPopupTopRightInner { + width: 8px; + height: 5px; + zoom: 1; +} +.gwt-MenuBarPopup .menuPopupBottomLeftInner { + width: 5px; + height: 8px; + zoom: 1; +} +.gwt-MenuBarPopup .menuPopupBottomRightInner { + width: 8px; + height: 8px; + zoom: 1; +} +.gwt-MenuBarPopup .menuPopupTopLeft { + background: url(images/corner.png) no-repeat 0px -36px; + -background: url(images/corner_ie6.png) no-repeat 0px -36px; +} +.gwt-MenuBarPopup .menuPopupTopRight { + background: url(images/corner.png) no-repeat -5px -36px; + -background: url(images/corner_ie6.png) no-repeat -5px -36px; +} +.gwt-MenuBarPopup .menuPopupBottomLeft { + background: url(images/corner.png) no-repeat 0px -41px; + -background: url(images/corner_ie6.png) no-repeat 0px -41px; +} +.gwt-MenuBarPopup .menuPopupBottomRight { + background: url(images/corner.png) no-repeat -5px -41px; + -background: url(images/corner_ie6.png) no-repeat -5px -41px; +} +* html .gwt-MenuBarPopup .menuPopupTopLeftInner { + width: 5px; + height: 5px; + overflow: hidden; +} +* html .gwt-MenuBarPopup .menuPopupTopRightInner { + width: 8px; + height: 5px; + overflow: hidden; +} +* html .gwt-MenuBarPopup .menuPopupBottomLeftInner { + width: 5px; + height: 8px; + overflow: hidden; +} +* html .gwt-MenuBarPopup .menuPopupBottomRightInner { + width: 8px; + height: 8px; + overflow: hidden; +} + +.gwt-PasswordTextBox { + padding: 5px 4px; + border: 1px solid #ccc; + border-top: 1px solid #999; + font-size: 100%; +} +.gwt-PasswordTextBox-readonly { + color: #888; +} + +.gwt-PopupPanel { + border: 3px solid #e7e7e7; + padding: 3px; + background: white; +} + +.gwt-DecoratedPopupPanel .popupContent { +} +.gwt-DecoratedPopupPanel .popupMiddleCenter { + padding: 3px; + background: #f1f1f1; +} +.gwt-DecoratedPopupPanel .popupTopCenter { + background: url(images/hborder.png) 0px -2937px repeat-x; +} +.gwt-DecoratedPopupPanel .popupBottomCenter { + background: url(images/hborder.png) repeat-x 0px -2938px; + -background: url(images/hborder_ie6.png) repeat-x 0px -2138px; +} +.gwt-DecoratedPopupPanel .popupMiddleLeft { + background: url(images/vborder.png) -21px 0px repeat-y; +} +.gwt-DecoratedPopupPanel .popupMiddleRight { + background: url(images/vborder.png) repeat-y -24px 0px; + -background: url(images/vborder_ie6.png) repeat-y -24px 0px; +} +.gwt-DecoratedPopupPanel .popupTopLeftInner { + width: 6px; + height: 5px; + zoom: 1; +} +.gwt-DecoratedPopupPanel .popupTopRightInner { + width: 6px; + height: 5px; + zoom: 1; +} +.gwt-DecoratedPopupPanel .popupBottomLeftInner { + width: 6px; + height: 6px; + zoom: 1; +} +.gwt-DecoratedPopupPanel .popupBottomRightInner { + width: 6px; + height: 6px; + zoom: 1; +} +.gwt-DecoratedPopupPanel .popupTopLeft { + background: url(images/circles.png) no-repeat 0px -16px; + -background: url(images/circles_ie6.png) no-repeat 0px -16px; +} +.gwt-DecoratedPopupPanel .popupTopRight { + background: url(images/circles.png) no-repeat -6px -16px; + -background: url(images/circles_ie6.png) no-repeat -6px -16px; +} +.gwt-DecoratedPopupPanel .popupBottomLeft { + background: url(images/circles.png) no-repeat 0px -21px; + -background: url(images/circles_ie6.png) no-repeat 0px -21px; +} +.gwt-DecoratedPopupPanel .popupBottomRight { + background: url(images/circles.png) no-repeat -6px -21px; + -background: url(images/circles_ie6.png) no-repeat -6px -21px; +} +* html .gwt-DecoratedPopupPanel .popupTopLeftInner { + width: 6px; + height: 5px; + overflow: hidden; +} +* html .gwt-DecoratedPopupPanel .popupTopRightInner { + width: 6px; + height: 5px; + overflow: hidden; +} +* html .gwt-DecoratedPopupPanel .popupBottomLeftInner { + width: 6px; + height: 6px; + overflow: hidden; +} +* html .gwt-DecoratedPopupPanel .popupBottomRightInner { + width: 6px; + height: 6px; + overflow: hidden; +} + +.gwt-PopupPanelGlass { + background-color: #000; + opacity: 0.3; + filter: alpha(opacity=30); +} + +.gwt-PushButton-up, +.gwt-PushButton-up-hovering, +.gwt-PushButton-up-disabled, +.gwt-PushButton-down, +.gwt-PushButton-down-hovering, +.gwt-PushButton-down-disabled { + margin: 0; + text-decoration: none; + background: url("images/hborder.png") repeat-x 0px -27px; + border-radius: 2px; + -moz-border-radius: 2px; +} +.gwt-PushButton-up, +.gwt-PushButton-up-hovering, +.gwt-PushButton-up-disabled { + padding: 3px 5px 3px 5px; +} +.gwt-PushButton-up { + border:1px solid #bbb; + border-bottom: 1px solid #a0a0a0; + cursor: pointer; + cursor: hand; +} +.gwt-PushButton-up-hovering { + border: 1px solid; + border-color: #939393; + cursor: pointer; + cursor: hand; +} +.gwt-PushButton-up-disabled { + border: 1px solid #bbb; + cursor: default; + opacity: .5; + filter: alpha(opacity=45); + zoom: 1; +} +.gwt-PushButton-down, +.gwt-PushButton-down-hovering, +.gwt-PushButton-down-disabled { + padding: 4px 6px 2px 4px; + outline:none; +} +.gwt-PushButton-down { + border: 1px inset #666; + cursor: pointer; + cursor: hand; +} +.gwt-PushButton-down-hovering { + border: 1px solid #939393; + border-top: 1px solid #333333; + cursor: pointer; + cursor: hand; +} +.gwt-PushButton-down-disabled { + border: 1px outset #ccc; + cursor: default; + opacity: 0.5; + filter: alpha(opacity=45); + zoom: 1; +} + +.gwt-RadioButton { +} +.gwt-RadioButton-disabled { + color: #888; +} + +.gwt-RichTextArea { +} +.hasRichTextToolbar { + border: 0px; +} +.gwt-RichTextToolbar { + background: #e3e8f3 url(images/hborder.png) repeat-x 0px -2003px; + border-bottom: 1px solid #BBBBBB; + padding: 3px; + margin: 0px; +} +.gwt-RichTextToolbar .gwt-PushButton-up { + padding: 0px 0px 0px 1px; + margin-left: 4px; + margin-bottom: 4px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-PushButton-up-hovering { + margin-left: 4px; + margin-bottom: 4px; + padding: 0px 0px 0px 1px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-PushButton-down { + margin-left: 4px; + margin-bottom: 4px; + padding: 0px 1px 0px 0px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-PushButton-down-hovering { + margin-left: 4px; + margin-bottom: 4px; + padding: 0px 1px 0px 0px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-ToggleButton-up { + margin-left: 4px; + margin-bottom: 4px; + padding: 0px 0px 0px 1px; + border:1px solid #bbb; + border-bottom: 1px solid #a0a0a0; +} +.gwt-RichTextToolbar .gwt-ToggleButton-up-hovering { + margin-left: 4px; + margin-bottom: 4px; + padding: 0px 0px 0px 1px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-ToggleButton-down { + margin-left: 4px; + margin-bottom: 4px; + padding: 0px 1px 0px 0px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-ToggleButton-down-hovering { + margin-left: 4px; + margin-bottom: 4px; + padding: 0px 1px 0px 0px; + border-width: 1px; +} + +.gwt-StackPanel { + border-bottom: 1px solid #bbbbbb; +} +.gwt-StackPanel .gwt-StackPanelItem { + cursor: pointer; + cursor: hand; + font-weight: bold; + font-size: 1.3em; + padding: 3px; + border: 1px solid #bbbbbb; + border-bottom: 0px; + background: #d3def6 url(images/hborder.png) repeat-x 0px -989px; +} +.gwt-StackPanel .gwt-StackPanelContent { + border: 1px solid #bbbbbb; + border-bottom: 0px; + background: white; + padding: 2px 2px 10px 5px; +} + +.gwt-DecoratedStackPanel { + border-bottom: 1px solid #bbbbbb; +} +.gwt-DecoratedStackPanel .gwt-StackPanelContent { + border: 1px solid #bbbbbb; + border-bottom: 0px; + background: white; + padding: 2px 5px 10px 2px; +} +.gwt-DecoratedStackPanel .gwt-StackPanelItem { + cursor: pointer; + cursor: hand; +} +.gwt-DecoratedStackPanel .stackItemTopLeft, +.gwt-DecoratedStackPanel .stackItemTopRight { + height: 6px; + width: 6px; + zoom: 1; +} +.gwt-DecoratedStackPanel .stackItemTopLeft { + border-left: 1px solid #bbbbbb; + background: #d3def6 url(images/corner.png) no-repeat 0px -49px; + -background: #d3def6 url(images/corner_ie6.png) no-repeat 0px -49px; +} +.gwt-DecoratedStackPanel .stackItemTopRight { + border-right: 1px solid #bbbbbb; + background: #d3def6 url(images/corner.png) no-repeat -6px -49px; + -background: #d3def6 url(images/corner_ie6.png) no-repeat -6px -49px; +} +.gwt-DecoratedStackPanel .stackItemTopLeftInner, +.gwt-DecoratedStackPanel .stackItemTopRightInner { + width: 1px; + height: 1px; +} +* html .gwt-DecoratedStackPanel .stackItemTopLeftInner, +* html .gwt-DecoratedStackPanel .stackItemTopRightInner { + width: 6px; + height: 6px; + overflow: hidden; +} +.gwt-DecoratedStackPanel .stackItemTopCenter { + background: url(images/hborder.png) 0px -21px repeat-x; +} +.gwt-DecoratedStackPanel .stackItemMiddleLeft { + background: #d3def6 url(images/hborder.png) repeat-x 0px -989px; + border-left: 1px solid #bbbbbb; +} +.gwt-DecoratedStackPanel .stackItemMiddleLeftInner, +.gwt-DecoratedStackPanel .stackItemMiddleRightInner { + width: 1px; + height: 1px; +} +.gwt-DecoratedStackPanel .stackItemMiddleRight { + background: #d3def6 url(images/hborder.png) repeat-x 0px -989px; + border-right: 1px solid #bbbbbb; +} +.gwt-DecoratedStackPanel .stackItemMiddleCenter { + font-weight: bold; + font-size: 1.3em; + background: #d3def6 url(images/hborder.png) repeat-x 0px -989px; +} +.gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopRight, +.gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopLeft { + border: 0px; + background-color: white; +} +.gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopLeft, +.gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopRight { + background-color: white; +} + +.gwt-SuggestBox { + padding: 5px 4px; + border: 1px solid #ccc; + border-top: 1px solid #999; + font-size: 100%; + font-family: Arial Unicode MS, Arial, sans-serif; +} + +.gwt-SuggestBoxPopup { +} + +.gwt-SuggestBoxPopup .item { + padding: 2px 6px; + color: #000; + cursor: default; + font-size: 110%; +} +.gwt-SuggestBoxPopup .item-selected { + background: #D5E2FF; +} +.gwt-SuggestBoxPopup .suggestPopupContent { + background: white; +} +.gwt-SuggestBoxPopup .suggestPopupTopCenter { + border-top: 1px solid #bbb; +} +.gwt-SuggestBoxPopup .suggestPopupBottomCenter { + border-bottom: 1px solid #bbb; +} +.gwt-SuggestBoxPopup .suggestPopupTopCenterInner, +.gwt-SuggestBoxPopup .suggestPopupBottomCenterInner { + height: 1px; + line-height: 1px; +} +.gwt-SuggestBoxPopup .suggestPopupMiddleLeft { + border-left: 1px solid #bbb; +} +.gwt-SuggestBoxPopup .suggestPopupMiddleRight { + border-right: 1px solid #bbb; +} +.gwt-SuggestBoxPopup .suggestPopupMiddleLeftInner, +.gwt-SuggestBoxPopup .suggestPopupMiddleRightInner { + width: 1px; + line-height: 1px; +} +.gwt-SuggestBoxPopup .suggestPopupTopLeftInner { + width: 0px; + height: 0px; + zoom: 1; +} +.gwt-SuggestBoxPopup .suggestPopupTopRightInner { + width: 0px; + height: 0px; + zoom: 1; +} +.gwt-SuggestBoxPopup .suggestPopupBottomLeftInner { + width: 0px; + height: 0px; + zoom: 1; +} +.gwt-SuggestBoxPopup .suggestPopupBottomRightInner { + width: 0px; + height: 0px; + zoom: 1; +} +.gwt-SuggestBoxPopup .suggestPopupTopLeft { + background: url(images/circles.png) no-repeat 0px -6px; + -background: url(images/circles_ie6.png) no-repeat 0px -6px; + width:5px; + height:5px; +} +.gwt-SuggestBoxPopup .suggestPopupTopRight { + background: url(images/circles.png) no-repeat -5px -6px; + -background: url(images/circles_ie6.png) no-repeat -5px -6px; + width:5px; + height:5px; +} +.gwt-SuggestBoxPopup .suggestPopupBottomLeft { + background: url(images/circles.png) no-repeat 0px -11px; + -background: url(images/circles_ie6.png) no-repeat 0px -11px; + width:5px; + height:5px; +} +.gwt-SuggestBoxPopup .suggestPopupBottomRight { + background: url(images/circles.png) no-repeat -5px -11px; + -background: url(images/circles_ie6.png) no-repeat -5px -11px; + width:5px; + height:5px; +} +* html .gwt-SuggestBoxPopup .suggestPopupTopLeftInner { + width: 0px; + height: 0px; + overflow: hidden; +} +* html .gwt-SuggestBoxPopup .suggestPopupTopRightInner { + width: 0px; + height: 0px; + overflow: hidden; +} +* html .gwt-SuggestBoxPopup .suggestPopupBottomLeftInner { + width: 0px; + height: 0px; + overflow: hidden; +} +* html .gwt-SuggestBoxPopup .suggestPopupBottomRightInner { + width: 0px; + height: 0px; + overflow: hidden; +} + +.gwt-TabBar { + background: #ccc; + padding-top: 6px; +} +.gwt-TabBar .gwt-TabBarFirst { + width: 5px; /* first tab distance from the left */ +} +.gwt-TabBar .gwt-TabBarRest { +} +.gwt-TabBar .gwt-TabBarItem { + margin-right: 4px; + padding: 4px 8px 4px 8px; + cursor: pointer; + cursor: hand; + color: white; + font-weight: normal; + text-align: center; + background: #8E8E8E; + -moz-border-radius: 3px 3px 0px 0px; + border-radius: 3px 3px 0px 0px; +} +.gwt-TabBar .gwt-TabBarItem-selected { + cursor: default; + background: white; + color: #333; + font-weight: bold; +} +.gwt-TabBar .gwt-TabBarItem-disabled { + cursor: default; + color: #999999; +} +.gwt-TabPanel { +} +.gwt-TabPanelBottom { + border-color: #ccc; + border-style: solid; + border-width: 0px 1px 1px; + overflow: hidden; + padding: 6px; +} +.gwt-DecoratedTabBar { + background: #ccc; + padding-top: 6px; +} +.gwt-DecoratedTabBar .gwt-TabBarFirst { + width: 5px; /* first tab distance from the left */ +} +.gwt-DecoratedTabBar .gwt-TabBarRest { +} +.gwt-DecoratedTabBar .gwt-TabBarItem { + border-collapse: collapse; + margin-right: 4px; +} +.gwt-DecoratedTabBar .tabTopCenter { + padding: 0px; + background: #8E8E8E; +} +.gwt-DecoratedTabBar .tabTopLeft, +.gwt-DecoratedTabBar .tabTopRight { + padding: 0px; + zoom: 1; +} +.gwt-DecoratedTabBar .tabTopLeftInner, +.gwt-DecoratedTabBar .tabTopRightInner { + width: 3px; + height: 3px; +} +.gwt-DecoratedTabBar .tabTopLeft { + background: url(images/circles.png) no-repeat 0px 0px; + -background: url(images/circles_ie6.png) no-repeat 0px 0px; +} +.gwt-DecoratedTabBar .tabTopRight { + background: url(images/circles.png) no-repeat -3px 0px; + -background: url(images/circles_ie6.png) no-repeat -3px 0px; +} +* html .gwt-DecoratedTabBar .tabTopLeftInner, +* html .gwt-DecoratedTabBar .tabTopRightInner { + width: 3px; + height: 3px; + overflow: hidden; +} +.gwt-DecoratedTabBar .tabMiddleLeft, +.gwt-DecoratedTabBar .tabMiddleRight { + width: 3px; + padding: 0px; + background: #8E8E8E; +} +.gwt-DecoratedTabBar .tabMiddleLeftInner, +.gwt-DecoratedTabBar .tabMiddleRightInner { + width: 1px; + height: 1px; +} +.gwt-DecoratedTabBar .tabMiddleCenter { + padding: 0px 5px 4px 5px; + cursor: pointer; + cursor: hand; + color: #fff; + font-weight: normal; + text-align: center; + background: #8E8E8E; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopCenter { + background:#fff; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopLeft { + background: url(images/circles.png) no-repeat -6px 0px; + -background: url(images/circles_ie6.png) no-repeat -6px 0px; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopRight { + background: url(images/circles.png) no-repeat -9px 0px; + -background: url(images/circles_ie6.png) no-repeat -9px 0px; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleLeft, +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleRight { + background: #fff; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleCenter { + cursor: default; + background: #fff; + color:#333; + font-weight:bold; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-disabled .tabMiddleCenter { + cursor: default; + color: #999999; +} + +.gwt-TextArea { + padding: 4px; + border: 1px solid #ccc; + border-top: 1px solid #666; + font-size: 100%; + font-family: Arial Unicode MS, Arial, sans-serif; +} +.gwt-TextArea-readonly { + color: #888; +} + +.gwt-TextBox { + padding: 5px 4px; + border: 1px solid #ccc; + border-top: 1px solid #999; + font-size: small; + font-family: Arial Unicode MS, Arial, sans-serif; +} +.gwt-TextBox-readonly { + color: #888; +} +.gwt-ToggleButton-up, +.gwt-ToggleButton-up-hovering, +.gwt-ToggleButton-up-disabled, +.gwt-ToggleButton-down, +.gwt-ToggleButton-down-hovering, +.gwt-ToggleButton-down-disabled { + margin: 0; + text-decoration: none; + background: url("images/hborder.png") repeat-x 0px -27px; + -moz-border-radius: 2px; + border-radius: 2px; +} +.gwt-ToggleButton-up, +.gwt-ToggleButton-up-hovering, +.gwt-ToggleButton-up-disabled { + padding: 3px 5px 3px 5px; +} +.gwt-ToggleButton-up { + border:1px solid #bbb; + border-bottom: 1px solid #a0a0a0; + cursor: pointer; + cursor: hand; +} +.gwt-ToggleButton-up-hovering { + border: 1px solid; + border-color: #939393; + cursor: pointer; + cursor: hand; +} +.gwt-ToggleButton-up-disabled { + border: 1px solid #bbb; + cursor: default; + opacity: .5; + zoom: 1; + filter: alpha(opacity=45); +} +.gwt-ToggleButton-down, +.gwt-ToggleButton-down-hovering, +.gwt-ToggleButton-down-disabled { + padding: 4px 6px 2px 4px; +} +.gwt-ToggleButton-down { + background-position: 0 -513px; + border: 1px inset #666; + cursor: pointer; + cursor: hand; +} +.gwt-ToggleButton-down-hovering { + background-position: 0 -513px; + border: 1px inset; + border-color: #9cf #69e #69e #7af; + cursor: pointer; + cursor: hand; +} +.gwt-ToggleButton-down-disabled { + background-position: 0 -513px; + border: 1px inset #ccc; + cursor: default; + opacity: .5; + zoom: 1; + filter: alpha(opacity=45); +} + +.gwt-Tree .gwt-TreeItem { + padding: 1px 0px; + margin: 0px; + white-space: nowrap; + cursor: hand; + cursor: pointer; + zoom: 1; +} +.gwt-Tree .gwt-TreeItem-selected { + background: #ebeff9; +} +.gwt-TreeItem .gwt-RadioButton input, +.gwt-TreeItem .gwt-CheckBox input { + margin-right: 0px; +} +* html .gwt-TreeItem .gwt-RadioButton input, +* html .gwt-TreeItem .gwt-CheckBox input { + margin-right: -4px; +} + +.gwt-DateBox { + padding: 5px 4px; + border: 1px solid #ccc; + border-top: 1px solid #999; + font-size: 100%; +} +.gwt-DateBox input { + width: 8em; +} +.dateBoxFormatError { + background: #ffcccc; +} +.dateBoxPopup { +} + +.gwt-DatePicker { + border: 1px solid #ccc; + border-top:1px solid #999; + cursor: default; +} +.gwt-DatePicker td, +.datePickerMonthSelector td:focus { + outline: none; +} +.datePickerDays { + width: 100%; + background: white; +} +.datePickerDay, +.datePickerWeekdayLabel, +.datePickerWeekendLabel { + font-size: 85%; + text-align: center; + padding: 4px; + outline: none; + font-weight:bold; + color:#333; + border-right: 1px solid #EDEDED; + border-bottom: 1px solid #EDEDED; +} +.datePickerWeekdayLabel, +.datePickerWeekendLabel { + background: #fff; + padding: 0px 4px 2px; + cursor: default; + color:#666; + font-size:70%; + font-weight:normal; +} +.datePickerDay { + padding: 4px 7px; + cursor: hand; + cursor: pointer; +} +.datePickerDayIsWeekend { + background: #f7f7f7; +} +.datePickerDayIsFiller { + color: #999; + font-weight:normal; +} +.datePickerDayIsValue { + background: #d7dfe8; +} +.datePickerDayIsDisabled { + color: #AAAAAA; + font-style: italic; +} +.datePickerDayIsHighlighted { + background: #F0E68C; +} +.datePickerDayIsValueAndHighlighted { + background: #d7dfe8; +} +.datePickerDayIsToday { + padding: 3px; + color: #fff; + background: url(images/hborder.png) repeat-x 0px -2607px; +} + +.datePickerMonthSelector { + width: 100%; + padding: 1px 0 5px 0; + background: #fff; +} +td.datePickerMonth { + text-align: center; + vertical-align: middle; + white-space: nowrap; + font-size: 100%; + font-weight: bold; + color: #333; +} +.datePickerPreviousButton, +.datePickerNextButton { + font-size: 120%; + line-height: 1em; + color: #3a6aad; + cursor: hand; + cursor: pointer; + font-weight: bold; + padding: 0px 4px; + outline: none; +} + +.gwt-StackLayoutPanel { + border-bottom: 1px solid #bbbbbb; +} +.gwt-StackLayoutPanel .gwt-StackLayoutPanelHeader { + cursor: pointer; + cursor: hand; + font-weight: bold; + font-size: 1.3em; + padding: 3px; + border: 1px solid #bbbbbb; + border-bottom: 0px; + background: #d3def6 url(images/hborder.png) repeat-x 0px -989px; +} +.gwt-StackLayoutPanel .gwt-StackLayoutPanelHeader-hovering { + background: #d3def6; +} +.gwt-StackLayoutPanel .gwt-StackLayoutPanelContent { + border: 1px solid #bbbbbb; + border-bottom: 0px; + background: white; + padding: 2px 5px 10px 2px; +} + +.gwt-TabLayoutPanel { +} +.gwt-TabLayoutPanel .gwt-TabLayoutPanelTabs { + background: #ccc; + padding-top: 6px; + padding-right: 5px; +} +.gwt-TabLayoutPanel .gwt-TabLayoutPanelContentContainer { + border-color: #ccc; + border-style: solid; + border-width: 0px 1px 1px; +} +.gwt-TabLayoutPanel .gwt-TabLayoutPanelContent { + overflow: hidden; + padding: 6px; +} +.gwt-TabLayoutPanel .gwt-TabLayoutPanelTab { + margin-right: 4px; + padding: 4px 8px 4px 8px; + cursor: pointer; + cursor: hand; + color: white; + font-weight: normal; + text-align: center; + background: #8E8E8E; + -moz-border-radius: 3px 3px 0px 0px; + border-radius: 3px 3px 0px 0px; +} +.gwt-TabLayoutPanel .gwt-TabLayoutPanelTab-selected { + cursor: default; + background: white; + color: #333; + font-weight: bold; +} + +.gwt-SplitLayoutPanel-HDragger { + background: #e7e7e7 url(images/thumb_vertical.png) center center no-repeat; + cursor: col-resize; +} + +.gwt-SplitLayoutPanel-VDragger { + background: #e7e7e7 url(images/thumb_horz.png) center center no-repeat; + cursor: row-resize; +} \ No newline at end of file diff --git a/war/stargenetics_gwt_java/gwt/clean/images/circles.png b/war/stargenetics_gwt_java/gwt/clean/images/circles.png new file mode 100644 index 0000000..2a84b9c Binary files /dev/null and b/war/stargenetics_gwt_java/gwt/clean/images/circles.png differ diff --git a/war/stargenetics_gwt_java/gwt/clean/images/circles_ie6.png b/war/stargenetics_gwt_java/gwt/clean/images/circles_ie6.png new file mode 100644 index 0000000..3a388fc Binary files /dev/null and b/war/stargenetics_gwt_java/gwt/clean/images/circles_ie6.png differ diff --git a/war/stargenetics_gwt_java/gwt/clean/images/corner.png b/war/stargenetics_gwt_java/gwt/clean/images/corner.png new file mode 100644 index 0000000..51aa458 Binary files /dev/null and b/war/stargenetics_gwt_java/gwt/clean/images/corner.png differ diff --git a/war/stargenetics_gwt_java/gwt/clean/images/corner_ie6.png b/war/stargenetics_gwt_java/gwt/clean/images/corner_ie6.png new file mode 100644 index 0000000..5197449 Binary files /dev/null and b/war/stargenetics_gwt_java/gwt/clean/images/corner_ie6.png differ diff --git a/war/stargenetics_gwt_java/gwt/clean/images/hborder.png b/war/stargenetics_gwt_java/gwt/clean/images/hborder.png new file mode 100644 index 0000000..ec58ae6 Binary files /dev/null and b/war/stargenetics_gwt_java/gwt/clean/images/hborder.png differ diff --git a/war/stargenetics_gwt_java/gwt/clean/images/hborder_ie6.png b/war/stargenetics_gwt_java/gwt/clean/images/hborder_ie6.png new file mode 100644 index 0000000..2268f88 Binary files /dev/null and b/war/stargenetics_gwt_java/gwt/clean/images/hborder_ie6.png differ diff --git a/war/stargenetics_gwt_java/gwt/clean/images/thumb_horz.png b/war/stargenetics_gwt_java/gwt/clean/images/thumb_horz.png new file mode 100644 index 0000000..b43e683 Binary files /dev/null and b/war/stargenetics_gwt_java/gwt/clean/images/thumb_horz.png differ diff --git a/war/stargenetics_gwt_java/gwt/clean/images/thumb_vertical.png b/war/stargenetics_gwt_java/gwt/clean/images/thumb_vertical.png new file mode 100644 index 0000000..bd57f59 Binary files /dev/null and b/war/stargenetics_gwt_java/gwt/clean/images/thumb_vertical.png differ diff --git a/war/stargenetics_gwt_java/gwt/clean/images/vborder.png b/war/stargenetics_gwt_java/gwt/clean/images/vborder.png new file mode 100644 index 0000000..6840d11 Binary files /dev/null and b/war/stargenetics_gwt_java/gwt/clean/images/vborder.png differ diff --git a/war/stargenetics_gwt_java/gwt/clean/images/vborder_ie6.png b/war/stargenetics_gwt_java/gwt/clean/images/vborder_ie6.png new file mode 100644 index 0000000..90baeb1 Binary files /dev/null and b/war/stargenetics_gwt_java/gwt/clean/images/vborder_ie6.png differ diff --git a/war/stargenetics_gwt_java/hosted.html b/war/stargenetics_gwt_java/hosted.html new file mode 100644 index 0000000..48b87f3 --- /dev/null +++ b/war/stargenetics_gwt_java/hosted.html @@ -0,0 +1,365 @@ + + + +This html file is for Development Mode support. + diff --git a/war/stargenetics_gwt_java/stargenetics_gwt_java.nocache.js b/war/stargenetics_gwt_java/stargenetics_gwt_java.nocache.js new file mode 100644 index 0000000..b74a780 --- /dev/null +++ b/war/stargenetics_gwt_java/stargenetics_gwt_java.nocache.js @@ -0,0 +1,18 @@ +function stargenetics_gwt_java(){var P='',xb='" for "gwt:onLoadErrorFn"',vb='" for "gwt:onPropertyErrorFn"',ib='"><\/script>',Z='#',Xb='.cache.html',_='/',lb='//',Wb=':',pb='::',dc='