Examples of PreferenceManager


Examples of org.broad.igv.PreferenceManager

                public void actionPerformed(ActionEvent aEvt) {
                    UIUtilities.invokeOnEventThread(new Runnable() {

                        public void run() {

                            final PreferenceManager prefs = PreferenceManager.getInstance();
                            File initDirectory = prefs.getLastTrackDirectory();
                            File file = FileDialogUtils.chooseFile("Select coverage file", initDirectory, FileDialog.LOAD);
                            if (file != null) {
                                prefs.setLastTrackDirectory(file.getParentFile());
                                String path = file.getAbsolutePath();
                                if (path.endsWith(".tdf") || path.endsWith(".tdf")) {
                                    TDFReader reader = TDFReader.getReader(file.getAbsolutePath());
                                    TDFDataSource ds = new TDFDataSource(reader, 0, getName() + " coverage", genome);
                                    getCoverageTrack().setDataSource(ds);
View Full Code Here

Examples of org.broad.igv.PreferenceManager

        ionTorrent = dataManager.isIonTorrent();

        minimumHeight = 50;
        maximumHeight = Integer.MAX_VALUE;

        PreferenceManager prefs = PreferenceManager.getInstance();

        setShowSpliceJunctions(prefs.getAsBoolean(PreferenceManager.SAM_SHOW_JUNCTION_TRACK));

        float maxRange = prefs.getAsFloat(PreferenceManager.SAM_MAX_VISIBLE_RANGE);
        minVisibleScale = (maxRange * 1000) / 700;

        renderer = AlignmentRenderer.getInstance();

        this.setDisplayMode(DisplayMode.EXPANDED);

        if (prefs.getAsBoolean(PreferenceManager.SAM_SHOW_REF_SEQ)) {
            sequenceTrack = new SequenceTrack("Reference sequence");
            sequenceTrack.setHeight(14);
        }

        if (renderOptions.getColorOption() == ColorOption.BISULFITE) {
View Full Code Here

Examples of org.broad.igv.PreferenceManager

    /**
     * The visibility window has changed.
     */
    private void visibilityWindowChanged() {
        PreferenceManager prefs = PreferenceManager.getInstance();
        float maxRange = prefs.getAsFloat(PreferenceManager.SAM_MAX_VISIBLE_RANGE);
        minVisibleScale = (maxRange * 1000) / 700;
    }
View Full Code Here

Examples of org.broad.igv.PreferenceManager

        }
    }

    public static void sortAlignmentTracks(SortOption option, String tag) {
        IGV.getInstance().sortAlignmentTracks(option, tag);
        final PreferenceManager prefMgr = PreferenceManager.getInstance();
        prefMgr.put(PreferenceManager.SAM_SORT_OPTION, option.toString());
        prefMgr.put(PreferenceManager.SAM_SORT_BY_TAG, tag);
        refresh();
    }
View Full Code Here

Examples of org.broad.igv.PreferenceManager

     * @param track
     * @param context
     * @param rect
     */
    public void renderAxis(Track track, RenderContext context, Rectangle rect) {
        PreferenceManager prefs = PreferenceManager.getInstance();

        // For now disable axes for all chromosome view
        if (context.getChr().equals(Globals.CHR_ALL)) {
            return;
        }
        if (prefs.getAsBoolean(PreferenceManager.CHART_DRAW_Y_AXIS))  {

            Rectangle axisRect = new Rectangle(rect.x, rect.y + 1, AXIS_AREA_WIDTH, rect.height);
            Graphics2D whiteGraphics = context.getGraphic2DForColor(Color.white);

            whiteGraphics.fillRect(axisRect.x, axisRect.y, axisRect.width, axisRect.height);
View Full Code Here

Examples of org.broad.igv.PreferenceManager

        super.renderAxis(track, context, arect);

        Rectangle drawingRect = calculateDrawingRect(arect);

        PreferenceManager prefs = PreferenceManager.getInstance();

        Color labelColor = prefs.getAsBoolean(PreferenceManager.CHART_COLOR_TRACK_NAME) ? track.getColor() : Color.black;
        Graphics2D labelGraphics = context.getGraphic2DForColor(labelColor);

        labelGraphics.setFont(FontManager.getFont(8));

        if (prefs.getAsBoolean(PreferenceManager.CHART_DRAW_TRACK_NAME)) {

            // Only attempt if track height is > 25 pixels
            if (arect.getHeight() > 25) {
                Rectangle labelRect = new Rectangle(arect.x, arect.y + 10, arect.width, 10);
                labelGraphics.setFont(FontManager.getFont(10));
                GraphicUtils.drawCenteredText(track.getName(), labelRect, labelGraphics);
            }
        }

        if (prefs.getAsBoolean(PreferenceManager.CHART_DRAW_Y_AXIS)) {

            Rectangle axisRect = new Rectangle(arect.x, arect.y + 1, AXIS_AREA_WIDTH, arect.height);


            DataRange axisDefinition = track.getDataRange();
View Full Code Here

Examples of org.eclipse.jface.preference.PreferenceManager

    public void widgetDefaultSelected(SelectionEvent e) {
    }

    public void widgetSelected(SelectionEvent e) {
      if (e.getSource() == openPreferences) {
        PreferenceManager manager = new PreferenceManager();
        manager.addToRoot(new PreferenceNode("Hadoop Installation Directory",
            new HadoopHomeDirPreferencePage()));
        PreferenceDialog dialog = new PreferenceDialog(this.getShell(), manager);
        dialog.create();
        dialog.setMessage("Select Hadoop Installation Directory");
        dialog.setBlockOnOpen(true);
View Full Code Here

Examples of org.eclipse.jface.preference.PreferenceManager

       
        ISelection sel = new StructuredSelection(new AnnotationTypeNode(editor, null));
        PropertyPage page = new EditorAnnotationPropertyPage();
        page.setElement(new AnnotationTypeNode(editor, null));
        page.setTitle("Styles");
        PreferenceManager mgr = new PreferenceManager();
        IPreferenceNode node = new PreferenceNode("1", page);
        mgr.addToRoot(node);
        PropertyDialog dialog = new PropertyDialog(getSite().getShell(), mgr, sel);
        dialog.create();
        dialog.setMessage(page.getTitle());
        dialog.open();
      }
View Full Code Here

Examples of org.eclipse.jface.preference.PreferenceManager

        this.prefAdmin = prefAdmin;   
        this.log = log;
    }

    public Data[] execute() {
      PreferenceManager prefManager = new PreferenceManager();
     
      addGlobalPreferences(prefManager);
      addLocalPreferences(prefManager);
      addParamPreferences(prefManager);
     
View Full Code Here

Examples of org.eclipse.jface.preference.PreferenceManager

  public void dispose() {

  }

  public Object execute(ExecutionEvent event) throws ExecutionException {
    PreferenceManager pm = new PreferenceManager();

    PreferencePage page = new ConfigPreferencePage();
    page.setTitle("TextRuler");
    PreferenceNode node = new PreferenceNode("org.apache.uima.ruta.textruler.config", page);
    pm.addToRoot(node);

    List<PreferenceNode> nodes = pm.getElements(0);
    PreferenceNode top = null;
    for (PreferenceNode n : nodes)
      if (n.getId().equals("org.apache.uima.ruta.textruler.config"))
        top = n;
    if (top != null) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.