Codebase list aladin / 83dcdce
New upstream version 10.027+dfsg Ole Streicher 6 years ago
3 changed file(s) with 21 addition(s) and 19 deletion(s). Raw diff Collapse all Expand all
251251 static protected final String FULLTITRE = "Aladin Sky Atlas";
252252
253253 /** Numero de version */
254 static public final String VERSION = "v10.025";
254 static public final String VERSION = "v10.027";
255255 static protected final String AUTHORS = "P.Fernique, T.Boch, A.Oberto, F.Bonnarel, Chaitra";
256256 // static protected final String OUTREACH_VERSION = " *** UNDERGRADUATE MODE (based on "+VERSION+") ***";
257257 static protected final String BETA_VERSION = " *** BETA VERSION (based on "+VERSION+") ***";
279279
280280 // Gère le mode particuliers
281281 static boolean LOG=true; // false si on inhibe les logs
282 public static boolean BETA =false;
282 public static boolean BETA =false;
283283 public static boolean CDS=false; // true si on tourne en mode CDS
284284 public static boolean PROTO=false; // true si on tourne en mode PROTO (nécessite Proto.jar)
285 static public boolean OUTREACH =false;
285 static public boolean OUTREACH =false;
286286 static public boolean SLIDERTEST=false; // true pour les tests de développement sur le slider de transparent actif même pour les plans de référence
287 // static boolean setOUTREACH =false;
287 // static boolean setOUTREACH =false;
288288 static int ALIASING=0; // 0-défaut système, 1-actif, -1-désactivé
289289
290290 // La couleur du fond
22232223 } else if( THEME==null ) DARK_THEME = false;
22242224
22252225 aladinSession = (++ALADINSESSION);
2226 targetHistory = new TargetHistory(aladin);
22262227 configuration = new Configuration(this);
22272228 if( STANDALONE ) {
22282229 try { configuration.load(); }
25782578
25792579 /** Mémorise les dernières targets */
25802580 protected void setLastTarget(String target ) {
2581 if( aladin.targetHistory==null ) aladin.targetHistory = new TargetHistory(aladin);
25822581 aladin.targetHistory.add(target);
25832582 }
25842583
614614 flagMegaDrag=true;
615615 }
616616
617 /** Retourne true s'il s'agit d'indices de vues adjacentes */
618 private boolean isAcote(int s, int t) {
619 int n = (int)Math.sqrt(modeView);
620 int s1 = s%n;
621 if( t==s-1 && s1>0 ) return true;
622 if( t==s+1 && s1<n-1 ) return true;
623 if( t==s+n && s<modeView-n ) return true;
624 if( t==s-n && s>n-1 ) return true;
625 return false;
626 }
617 // /** Retourne true s'il s'agit d'indices de vues adjacentes */
618 // private boolean isAcote(int s, int t) {
619 // int n = (int)Math.sqrt(modeView);
620 // int s1 = s%n;
621 // if( t==s-1 && s1>0 ) return true;
622 // if( t==s+1 && s1<n-1 ) return true;
623 // if( t==s+n && s<modeView-n ) return true;
624 // if( t==s-n && s>n-1 ) return true;
625 // return false;
626 // }
627627
628628 // /** Retourne true si on a fini le taquin */
629629 // private boolean isTaquinOk() {
657657 */
658658 protected boolean stopMegaDrag(Object target,int x, int y,boolean ctrlPressed) {
659659 boolean rep=true;
660
660661
661662 if( !isMegaDrag() ) return false;
662663
667668 int i = getTargetViewForEvent(target,x,y);
668669 megaDragViewTarget = i<0?null:viewSimple[i];
669670
671
670672 if( !flagMegaDrag
671673 || megaDragViewSource==null && megaDragPlanSource==null
672674 || megaDragViewTarget==null ) {
679681 if( rep && megaDragViewTarget==megaDragViewSource ) rep=false;
680682
681683 // En mode Taquin la source doit être vide et juste à coté
682 if( rep && /* flagTaquin && */
683 (megaDragPlanSource!=null
684 || !megaDragViewTarget.isFree()
685 || !isAcote(megaDragViewSource.n,megaDragViewTarget.n)) ) rep=false;
684 // if( rep && flagTaquin &&
685 // (megaDragPlanSource!=null
686 // || !megaDragViewTarget.isFree()
687 // || !isAcote(megaDragViewSource.n,megaDragViewTarget.n)) ) rep=false;
686688
687689 flagMegaDrag=false;
688690