New upstream version 10.027+dfsg
Ole Streicher
6 years ago
251 | 251 | static protected final String FULLTITRE = "Aladin Sky Atlas"; |
252 | 252 | |
253 | 253 | /** Numero de version */ |
254 | static public final String VERSION = "v10.025"; | |
254 | static public final String VERSION = "v10.027"; | |
255 | 255 | static protected final String AUTHORS = "P.Fernique, T.Boch, A.Oberto, F.Bonnarel, Chaitra"; |
256 | 256 | // static protected final String OUTREACH_VERSION = " *** UNDERGRADUATE MODE (based on "+VERSION+") ***"; |
257 | 257 | static protected final String BETA_VERSION = " *** BETA VERSION (based on "+VERSION+") ***"; |
279 | 279 | |
280 | 280 | // Gère le mode particuliers |
281 | 281 | static boolean LOG=true; // false si on inhibe les logs |
282 | public static boolean BETA =false; | |
282 | public static boolean BETA =false; | |
283 | 283 | public static boolean CDS=false; // true si on tourne en mode CDS |
284 | 284 | 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; | |
286 | 286 | 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; | |
288 | 288 | static int ALIASING=0; // 0-défaut système, 1-actif, -1-désactivé |
289 | 289 | |
290 | 290 | // La couleur du fond |
2223 | 2223 | } else if( THEME==null ) DARK_THEME = false; |
2224 | 2224 | |
2225 | 2225 | aladinSession = (++ALADINSESSION); |
2226 | targetHistory = new TargetHistory(aladin); | |
2226 | 2227 | configuration = new Configuration(this); |
2227 | 2228 | if( STANDALONE ) { |
2228 | 2229 | try { configuration.load(); } |
2578 | 2578 | |
2579 | 2579 | /** Mémorise les dernières targets */ |
2580 | 2580 | protected void setLastTarget(String target ) { |
2581 | if( aladin.targetHistory==null ) aladin.targetHistory = new TargetHistory(aladin); | |
2582 | 2581 | aladin.targetHistory.add(target); |
2583 | 2582 | } |
2584 | 2583 |
614 | 614 | flagMegaDrag=true; |
615 | 615 | } |
616 | 616 | |
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 | // } | |
627 | 627 | |
628 | 628 | // /** Retourne true si on a fini le taquin */ |
629 | 629 | // private boolean isTaquinOk() { |
657 | 657 | */ |
658 | 658 | protected boolean stopMegaDrag(Object target,int x, int y,boolean ctrlPressed) { |
659 | 659 | boolean rep=true; |
660 | ||
660 | 661 | |
661 | 662 | if( !isMegaDrag() ) return false; |
662 | 663 | |
667 | 668 | int i = getTargetViewForEvent(target,x,y); |
668 | 669 | megaDragViewTarget = i<0?null:viewSimple[i]; |
669 | 670 | |
671 | ||
670 | 672 | if( !flagMegaDrag |
671 | 673 | || megaDragViewSource==null && megaDragPlanSource==null |
672 | 674 | || megaDragViewTarget==null ) { |
679 | 681 | if( rep && megaDragViewTarget==megaDragViewSource ) rep=false; |
680 | 682 | |
681 | 683 | // 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; | |
686 | 688 | |
687 | 689 | flagMegaDrag=false; |
688 | 690 |