Rendering in color

I have rendered all my clips in color. I have checked very carefully to make sure everyone of them says completed and has the green label.
So when I send them back to FCp it says not all of my clips have been rendered. This is not so , when I created the render queue , I hit " add all".
No suprise when I sent the project to FCp , the video doesnt have the corrections. Any help is much appreciated.

Usually problems with Color can be traced to improper material being sent from FCP.
Your material should be in ProRes format in FCP (i.e. no AVCHD, H.264, or other non-I frame format)
There should be NO retiming, effects or other trickery on the clips within FCP
There should be NO overlays, transitions, fades, etc,
The material should all be the same standard Time Base.
If any of the clips violate these rules, trouble may occur.
x

Similar Messages

  • Looking for Pre-Rendered Editing / Color Grading Workflow suggestions.

    Looking for Pre-Rendered Editing / Color Grading Workflow suggestions.
    All my material is rendered via RenderMan, our resolution is 1280x544, and our format is generally .exr in 32 bit space.
    Our editor has been converting over to 32-bit tiffs, and using Apple Intermediate Codec for editing, mostly for speed concerns.
    We need to re-vamp our workflow so that we can edit our footage, and then do color grading of the edit head to tail to smooth the look between scenes. We want to do this in Color, being fed by Final Cut Pro's timeline.
    We want to keep our bit depth as high as possible when coming into Color.
    My question is, does anyone here have any workflow suggestions for doing what I am talking about.
    I wasn't sure if we should just export and EDL from FCP and try to get Color to load our single frames from that. Or if there is a special Quicktime wrapper we should be using, or converting our 32-bit .exr files into some other format more readily available for using in Color?
    Any thoughts would be great, thanks in advance!

    You're not going to get anywhere beyond 10-bit. That's it.
    Try encoding to 10-bit LOG dpx if you need upscale RGB.
    jPo

  • Field Order Changes?  Rendering from Color.

    I received a project from a client that was run through color. I noticed their source files were lower field dominant (525/29.97) and their renders from color were upper or odd field dominant. This caused some strangeness in their sequences and it looks like they de-interlaced their clips and/or changed the field order of their sequences. I can't find anywhere in Color to set this as a pre-set, other than setting to de-interlace renders. Is it possible that Color is inverting the field order when it renders? This used to happen with Compressor, when I would export FCP for DVD's, sometimes Compressor would (set to Auto) guess wrong on the field dominance. Can anyone advise?
    Thanks in advance.

    If only it were that easy. Of course, you will want to set a "re-interlace" for export....
    De-interlace seems to be poorly understood and not very well executed in a lot of file-based image processing. In COLOR, both the Geometry and COLORFX rooms display spectacular weaknesses in this regard. To even use the word as its applied in COLORFX is a bit of a misnomer, because the real thrust of the exercise is to "split" and flag the fields for proper dominance handling. The COLOR USER manual has a good illustrated example of how to do this -- the result is a "twin" effects tree -- split the frame into its components at the top, do your voodoo identically for each "field" stream, then correctly zipper them back together at the bottom. Its a bit of a secret process, not entirely dissociated from a Masonic handshake.
    There is a notional similarity to SHAKE in this regard, although that application only needs the FileIn node and the GLOBALS render tab enabled appropriately.
    jPo

  • Bad Rendering Of Colors

    I took a look and saw several discussions relating to improper rendering of colors, but none of the solutions seem to resolve my issue. I have posted my pics after PS editing to a "Zen Photo" site and a "Coppermine" site. Here is an example of the problem on a Coppermine site. The initial picture is way off, but if you click on picture and enlarge you will see it renders correctly. Any help would be appreciated:
    http://www.dfwtower.com/coppermine/displayimage.php?album=lastup&cat=0&pos=0

    OK, problem resolved.
    Before edit in Photoshop I was doing a small bit of pre-processing in Lightroom. Lightroom had a color profile selection that was not sRGB. So, when in LR I would right click on my image and select edit with PS. The LR color profile that was NOT sRGB carried over to PS. Although PS has sRGB selected the color profile from LR carried all the way through Save.
    When I set the color in LR to sRGB and continued as I had in the past with my PS edits, colors in Zen Photo and Coppermine were then correct.
    So, the bottom line, I'm not sure this is a problem, but to me it was and I suspect others are having the same issues...
    Thanks to the community for the replies.

  • Rendering alternate colors in JTree

    I have a JTree within a scrollpane.
    What I would like to do is have every alternate line on the JTree rendered with one of 2 colors, i.e. line 1 is blue, line 2 is yellow, line 3 is blue etc.
    The tricky bit is that I want this color to fill the width of the scrollpane - changing the background of the JLabel color in the renderer will only update from the tree node to the right of the scrollpane (it leaves the area to the left of the node blank).
    Am I making any sense?

    Try this
    regards
    Stas
    import javax.swing.*;
    import java.awt.*;
    import javax.swing.tree.*;
    public class Test {
    JScrollPane scroll;
    JTree tree;
    public Test() throws Exception {
    JFrame frame=new JFrame();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    DefaultMutableTreeNode root=new DefaultMutableTreeNode("root");
    DefaultMutableTreeNode node1=new DefaultMutableTreeNode("node1");
    DefaultMutableTreeNode node2=new DefaultMutableTreeNode("node2");
    root.add(node1);
    root.add(node2);
    DefaultMutableTreeNode subnode2=new DefaultMutableTreeNode("node2_1");
    node2.add(subnode2);
    subnode2=new DefaultMutableTreeNode("node2_2");
    node2.add(subnode2);
    subnode2=new DefaultMutableTreeNode("node2_3");
    node2.add(subnode2);
    tree=new JTree(root);
    tree.setCellRenderer(new MyRenderer());
    frame.getContentPane().add(tree);
    frame.setBounds(100,100,200,200);
    frame.show();
    public static void main(String[] args) throws Exception {
    new Test();
    class MyRenderer extends DefaultTreeCellRenderer {
    public MyRenderer() {
    super();
    setOpaque(true);
    public Component getTreeCellRendererComponent(JTree tree, Object value,
    boolean sel,
    boolean expanded,
    boolean leaf, int row,
    boolean hasFocus) {
    JLabel l=(JLabel)super.getTreeCellRendererComponent(tree, value,
    sel,
    expanded,
    leaf, row,
    hasFocus);
    l.setPreferredSize(new Dimension(5000,20));
    if (row % 2==0) {
    l.setBackground(Color.CYAN);
    else {
    l.setBackground(Color.YELLOW);
    return l;

  • WebView weird rendering issue (Color rectangles) - Debug Mode

    Hi,
    i got a problem with a JavaFX Webview.
    Everything loads fine, but every single Element in the DOM of the page (including the body) is overlayed with a random colored rectangle when hovered.
    After a few seconds the entire page is renders unreadable and is only a freaky mix of colors.
    It does work without problems in the JavaFX Ensemble Example so i think it can't be a javafx probleme but i am doing something wrong somewhere else in my application.
    The initialisation code is the same as in the example:
    webview = new WebView();
    previewStage.getChildren().add(webview);
    final WebEngine webEngine = webview.getEngine();
    webEngine.load("http://www.google.de");
    Thought it might be an stylesheet issue, but i removed all stylesheets and it still looks the same.
    I attached some pictures how it looks.
    http://www.tinyuploads.com/images/31lf1b.png
    http://www.tinyuploads.com/images/UxK8wZ.png
    I appreciate any help.
    Thank you!

    THANK YOU VERY MUCH.
    This solved my problem and it was driving me crazy. :-)
    For Future reference:
    WebView enters a debug mode when logging is set to a level higher than FINEST.
    You can change it for the particular class using these lines:
    Logger logger = Logger.getLogger( WCGraphicsPrismContext.class.getName() );
    logger.setLevel( Level.OFF );

  • Premiere Pro Freezes mac while rendering Fast Color Corrector & Rgb curves

    I am having a problem that is impacting our business. We are doing commercials that we are doing color correction of the subject using Fast Color Corrector and RGB curves. When these effects are added to the sequenced video, the performance of the Mac Pro slows down considerably.
    Then when we go to render the project so that we can see the effects in real time, the computer freezes completely. The program usually informs us that it must close due to a serious error. I have attempted to restart the computer, clean up permissions etc to solve this problem but to no avail. Why would this happen? Any ideas on how to solve it?
    Here are the specs:
    Using Premiere Pro CC 7.2.1 (4)
    Mac Pro: 3.2 Ghz Quad-Core Intel Xeon
    Memory: 24 GB
    ATI Radeon HD 5770 (1024 MB)
    OS: 10.8.5

    Yes. I experimented on my own and got confirms from a couple of sources. Where the problem was is bad suggestions about what settings to use in Premiere Pro.
    The first setting you want to check (although Premiere Pro will probably see the card right away is:
    File > Project Settings > General - Make sure that Mercury Playback Engine GPU Acceleration is selected. Everyone agrees on this.
    Now is where the fun begins. There is a school of thought that says to go here:
    Sequence > Sequence Setttings - Under Video Previews, they want you to check off Maximum Render Quality. Once you do this, you must also go to:
    Preferences > Memory - and change Optimize Rendering for Performance
    DO NOT DO THIS! What I found is that this significantly slows down your system and makes rendering and exporting take over your computer (and I have a lot of ram). Leave your change with the setting Mercury Playback Engine GPU Acceleration and you should be great.
    I have found a significant change in running color correction effects, exporting and rendering. You will too.
    Let me know how you make out after your setup.
    Have a great day!

  • Blown out levels when rendering in Color

    I'm encountering a very strange problem in Color, one which I have never had before.  I'm attempting to color correct a small number of clips, about 5, all in DVCPRO HD format.  Once in Color, the initial levels mirror those in FCP, both in the viewer and my external monitor.  After doing some very basic color correcting in the Primary In and then attempting to render the clip, the levels are completely blown out.  I've even tried rendering the clips without color correcting, and I get the same result.  Even stranger, after attempting to render a clip, this blown out look is automatically applied to the other clips, even though I made no changes to them and did not attempt to render them.  Has anyone encountered anything like this?  Color has worked fine for me up until now. 

    and it is just a .mov file
    That wasn't what I asked for. I asked what format your source footage was.
    It sounds like you need to revert back to 1.0.2. Download this app to remove Color, then reinstall from your original disc: http://www.digitalrebellion.com/fcs_remover.htm
    If you need the Color 1.0.2 installer (which is no longer available for download on Apple's site), then email me for information on where to download it from my archive.
    <Edited by Moderator>

  • 512Mb VRAM a mandatory requirement for 4K/DPX rendering in Color in FCS?

    "For rendering of 4K files and DPX: a graphics card with at least 512MB of VRAM
    For 32-bit rendering: a graphics card with at least 256MB of VRAM"
    - Is this a mandatory requirement to have 512Mb VRAM on the graphics card or is it just recommendation (i.e. the rendering will just run slower)?
    I would like a definitive answer, please advise. Thanks in advance.

    It will likely run FCP but won't run Motion or Color. If the fastest external drive connection you have is FW800 then you'll be somewhat limited in the number of streams of video you can work with at the same time.
    Also, it would run better with 4 GB RAM.
    x

  • Lightroom 5 not rendering the color red correctly

    Out of the blue, LR5 has decided to render red as a dark orange - similar to the orange in the SF Giants team colors.  But red in the LR5 import previews is correct.  It's also correct in a different editor, Faststone Image Viewer and Irfan View.
    It's orange when opened in Camera RAW 8.1 from PS Elements 10.  So the culprit would seem to be Camera Raw 8.1.
    A picture is worth a thousand words:

    Couldn't you reach 120 Luminance in Eye One Match in advanced mode using the display's Brightness control? Are you using on the 'Custom' display preset mode and adjusting the RGB controls in Eye One Match for 6500K? Try downloading the latest Eye One Match v3.6.2 software, uninstall what you have now and reinstall with the new download v3.6.2. Something's wrong with the calibration process.
    Please provide your display control settings, including Brightness, Contrast, RGB Color, and any other display control settings. Here's what TFT Central used:
    Calibrated Settings
    (Custom mode)
    luminance (cd/m2)
    121
    Black Point (cd/m2)
    0.18
    Contrast Ratio
    672:1
    Firstly I calibrated the screen using LaCie's software suite while also changing the monitor to the 'Custom' preset mode, affording me access to the RGB colour controls. During the calibration process the screens brightness was adjusted to 20%, with contrast being left at 50%. RGB values were altered to 92, 90 and 98 respectively. It should be noted that OSD adjustments only form part of the calibration process with the majority of changes being made automatically at the graphics card LUT level.
    After calibration, the results of the test and report were far more pleasing! Luminance was corrected nicely to 121 cd/m2, with black depth being improved also to 0.18 cd/m2. This gave us a static contrast ratio of 672:1 which was adequate. The gamma was now corrected to 2.2, and colour temperature was also now recorded at 6477k (<1% out). Most impressively the colour accuracy was improved drastically, with dE average being only 0.5, and maximum being only 1.0. LaCie would consider colour accuracy to be excellent here, and this was certainly a very pleasing improvement to the default factory settings.

  • Clips are getting distorted after rendering a color grade; any solutions?

    I've been experiencing this problem as I've been learning to color grade.  Once I have all of my layers set the way I want them (initial correction, color alteration, masking, and sometimes adding a vinette) and I go to render, my clip will become completely distorted.  Is there any solution to this when it happens, or will I have to restart the grade completely?  Could there just be something I'm doing wrong in my workflow?  I'm open to any and all answers.

    Pure guess, do you have set in preferences high quality in playback.

  • Photoshop CC rendering crazy color overlays in file

    Photoshop is doing some insane things to a file we're working on, it's adding multi-colored, random blocks of color overlays all throughout the file. We'll close the file and reopen it, and it's fine. Then it starts doing it again! Has anyone else ever encountered this? The file size is aroud 470MB, on a 2013 Macbook Pro that has 8GB RAM/500GB hardrive, OS Mountain Lion. Attached is a screenshot. To me, it seems like the file may be corrupted somehow but PS not giving an error message.

    If this is just the one file, then you may be right about it being corrupted.  At 470Mb I'm guessing that it has lots of layers, in which case I'd be looking carefully at blend modes, but that doesn't gel with it being intermittent.
    Going just from the screen shot, I'd be wondering about video card driver, but you'd expect that to affect all files.
    Sometimes Photoshop can get into a muddle with layered documents, and things don't work how they should.  I have always found that duplicating the layers to a new document fixes that.   Select all layers, right click and choose Duplicate and then New.
    It's an interesting anomaly though, so please come back and tell us if and how you fix it.

  • JTable custom renderer selection color

    I have included JSpinners in the last column of my JTable. However when I highlight rows all cells with a JSpinner do not have a blue background and it looks rather odd. I would have thought the following code snippet would sort it out but it hasnt. Any suggestions?
                if (isSelected) {
                    super.setForeground(table.getSelectionForeground());
                    super.setBackground(table.getSelectionBackground());
                } import java.awt.*;
    import java.awt.event.MouseEvent;
    import java.util.Arrays;
    import java.util.EventObject;
    import javax.swing.*;
    import javax.swing.table.*;
    public class JTableRender {
        private Object[][] data = {
            {"1", "2", "5"},
            {"4", "5", "5"},
            {"7", "8", "5"},
            {"7", "8", "5"}};
        public void createGui() {
            Object[] columnNames = new Object[]{"A", "B", "C"};
            JTable table = new JTable(new DefaultTableModel(data, columnNames));
            TableColumn col = table.getColumnModel().getColumn(2);
            SpinnerNumberModel snm = new SpinnerNumberModel(0,0,100,1);
            col.setCellRenderer(new MySpinnerRenderer(snm));
            col.setCellEditor(new MySpinnerEditor(snm));
            JPanel pane = new JPanel(new BorderLayout());
            pane.add(new JScrollPane(table), BorderLayout.CENTER);
            JFrame f = new JFrame("JTableExample");
            f.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
            f.add(pane);
            f.pack();
            f.setLocationRelativeTo(null);
            f.setVisible(true);
        public static void main(String[] args) {
            JTableRender te = new JTableRender();
            te.createGui();
        class MySpinnerRenderer extends JSpinner implements TableCellRenderer {
            public MySpinnerRenderer(SpinnerModel sm) {
                super(sm);
            public Component getTableCellRendererComponent(JTable table, Object value,
                    boolean isSelected, boolean hasFocus, int row, int column) {
                if (isSelected) {
                    super.setForeground(table.getSelectionForeground());
                    super.setBackground(table.getSelectionBackground());
                } else {
                    setForeground(table.getForeground());
                    setBackground(table.getBackground());
                setValue(Integer.parseInt(value.toString()));
                return this;
        class MySpinnerEditor extends AbstractCellEditor implements TableCellEditor {
            final JSpinner spinner = new JSpinner();
            public MySpinnerEditor(SpinnerModel sm){
                spinner.setModel(sm);
            public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected,
                    int row, int column) {
                spinner.setValue(Integer.parseInt(value.toString()));
                return spinner;
            @Override
            public boolean isCellEditable(EventObject evt) {
                if (evt instanceof MouseEvent) {
                    return ((MouseEvent) evt).getClickCount() >= 2;
                return true;
            public Object getCellEditorValue() {
                return spinner.getValue();
    }Thanks in advance
    Calypso

    JSpinner is a complex component that is composed of several other components including an editor which also contains a JFormattedTextField. The API will explain all, but as an example:
        public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected,
            boolean hasFocus, int row, int column) {
          JSpinner.NumberEditor editor = (NumberEditor) super.getEditor(); //!!
          JFormattedTextField tField = editor.getTextField();
          if (isSelected) {
            tField.setForeground(table.getSelectionForeground());
            tField.setBackground(table.getSelectionBackground());
          } else {
            tField.setForeground(table.getForeground());
            tField.setBackground(table.getBackground());
          setValue(Integer.parseInt(value.toString()));
          return this;
     

  • JTree custom renderer setting selection background color problem

    Hi,
    I have a JTree with a custom icon renderer that displays an icon. The JTree is part of a TreeTable component. Iam having a problem setting the selection background uniformly for the entire row. There is no problem when there is no row selected in the JTable.
    My present code looks like this:
    Iam overriding paint in my renderer which extends DefaultCellRenderer.
           super.paint(g);
            Color bColor = null;
            if(!m_selected) {
                 if(currRow % 2 == 0) {
                      bColor = Color.WHITE;
                 } else {
                                                    bColor = backColor;
            } else {
                 bColor = table.getSelectionBackground();                  bColor = getRowSelectionColor();
         if(bColor != null) {
                           g.setColor(bColor);
             if(!m_selected) {
                   g.setXORMode(new Color(0xFF, 0xFF, 0xFF));
             } else {
                 g.setXORMode(new Color(0x00, 0x00, 0x00));
                  I have a color I arrive at using some algorithm that I want using method getRowSelectionColor(). The other cells in the row have this color. But the cell containing the tree node shows different color. Iam not able to arrive at the right combination of the color to set and the xor color so my tree node also looks like the other cells in the row.
    It is not a problem really as the table still looks good. Its just that the tree node looks like it has been highlighted and this might cause a problem when a table cell is highlighed later on in the application ( two cells in the row would be highlighted causing confusion).
    Any help would be appreciated.
    Regards,
    vidyut

    Hi Camickr,
    Thanks for the reply. Iam sorry I didn't include the sources the first time around. There were too many of them. I have created a small, self-contained, compilable program that demonstrates the problem and including it herewith. Still there's quite many files but they are all needed Iam afraid. The only one you will have to concern yourself fior this problem is the file IconRenderer.java. The treenode background and the other cells background are not in sync when table row is not selected in this example though. But they are in my real program. I just need them to be in sync i.e have the same background color when the row is selected.
    Your help would be very much appreciated.
    These are the files that are included below:
    1. AbstractTreeTableModel.java
    2. Bookmarks.java
    3. BookmarksModel.java
    4. DynamicTreeTableModel.java
    5. IconRenderer.java
    6. IndicatorRenderer.java
    7. JTreeTable.java
    8. TreeTableExample3.java (contains main)
    9. TreeTableModel.java
    10. TreeTableModelAdapter.java
    The copyright and javadocs information has been stripped for clarity.
    cheers,
    vidyut
    // AbstractTreeTableModel.java BEGIN
    import javax.swing.tree.*;
    import javax.swing.event.*;
    public abstract class AbstractTreeTableModel implements TreeTableModel {
        protected Object root;    
        protected EventListenerList listenerList = new EventListenerList();
        public AbstractTreeTableModel(Object root) {
            this.root = root;
        // Default implementations for methods in the TreeModel interface.
        public Object getRoot() {
            return root;
        public boolean isLeaf(Object node) {
            return getChildCount(node) == 0;
        public void valueForPathChanged(TreePath path, Object newValue) {}
        // This is not called in the JTree's default mode:
        // use a naive implementation.
        public int getIndexOfChild(Object parent, Object child) {
            for (int i = 0; i < getChildCount(parent); i++) {
             if (getChild(parent, i).equals(child)) {
                 return i;
         return -1;
        public void addTreeModelListener(TreeModelListener l) {
            listenerList.add(TreeModelListener.class, l);
        public void removeTreeModelListener(TreeModelListener l) {
            listenerList.remove(TreeModelListener.class, l);
        protected void fireTreeNodesChanged(Object source, Object[] path,
                                            int[] childIndices,
                                            Object[] children) {
            // Guaranteed to return a non-null array
            Object[] listeners = listenerList.getListenerList();
            TreeModelEvent e = null;
            // Process the listeners last to first, notifying
            // those that are interested in this event
            for (int i = listeners.length-2; i>=0; i-=2) {
                if (listeners==TreeModelListener.class) {
    // Lazily create the event:
    if (e == null)
    e = new TreeModelEvent(source, path,
    childIndices, children);
    ((TreeModelListener)listeners[i+1]).treeNodesChanged(e);
    protected void fireTreeNodesInserted(Object source, Object[] path,
    int[] childIndices,
    Object[] children) {
    // Guaranteed to return a non-null array
    Object[] listeners = listenerList.getListenerList();
    TreeModelEvent e = null;
    // Process the listeners last to first, notifying
    // those that are interested in this event
    for (int i = listeners.length-2; i>=0; i-=2) {
    if (listeners[i]==TreeModelListener.class) {
    // Lazily create the event:
    if (e == null)
    e = new TreeModelEvent(source, path,
    childIndices, children);
    ((TreeModelListener)listeners[i+1]).treeNodesInserted(e);
    protected void fireTreeNodesRemoved(Object source, Object[] path,
    int[] childIndices,
    Object[] children) {
    // Guaranteed to return a non-null array
    Object[] listeners = listenerList.getListenerList();
    TreeModelEvent e = null;
    // Process the listeners last to first, notifying
    // those that are interested in this event
    for (int i = listeners.length-2; i>=0; i-=2) {
    if (listeners[i]==TreeModelListener.class) {
    // Lazily create the event:
    if (e == null)
    e = new TreeModelEvent(source, path,
    childIndices, children);
    ((TreeModelListener)listeners[i+1]).treeNodesRemoved(e);
    protected void fireTreeStructureChanged(Object source, Object[] path,
    int[] childIndices,
    Object[] children) {
    // Guaranteed to return a non-null array
    Object[] listeners = listenerList.getListenerList();
    TreeModelEvent e = null;
    // Process the listeners last to first, notifying
    // those that are interested in this event
    for (int i = listeners.length-2; i>=0; i-=2) {
    if (listeners[i]==TreeModelListener.class) {
    // Lazily create the event:
    if (e == null)
    e = new TreeModelEvent(source, path,
    childIndices, children);
    ((TreeModelListener)listeners[i+1]).treeStructureChanged(e);
    // Default impelmentations for methods in the TreeTableModel interface.
    public Class getColumnClass(int column) { return Object.class; }
    public boolean isCellEditable(Object node, int column) {
    return getColumnClass(column) == TreeTableModel.class;
    public void setValueAt(Object aValue, Object node, int column) {}
    // Left to be implemented in the subclass:
    * public Object getChild(Object parent, int index)
    * public int getChildCount(Object parent)
    * public int getColumnCount()
    * public String getColumnName(Object node, int column)
    * public Object getValueAt(Object node, int column)
    // AbstractTreeTableModel.java END
    // Bookmarks.java BEGIN
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import javax.swing.text.*;
    import javax.swing.text.html.*;
    import javax.swing.text.html.parser.*;
    public class Bookmarks {
    /** The root node the bookmarks are added to. */
    private BookmarkDirectory root;
    * Creates a new Bookmarks object, with the entries coming from
    * <code>path</code>.
    public Bookmarks(String path) {
         root = new BookmarkDirectory("Bookmarks");
         if (path != null) {
         parse(path);
    * Returns the root of the bookmarks.
    public BookmarkDirectory getRoot() {
         return root;
    protected void parse(String path) {
         try {
         BufferedReader reader = new BufferedReader(new FileReader
                                       (path));
         new ParserDelegator().parse(reader, new CallbackHandler(), true);
         catch (IOException ioe) {
         System.out.println("IOE: " + ioe);
         JOptionPane.showMessageDialog(null, "Load Bookmarks",
                             "Unable to load bookmarks",
                             JOptionPane.ERROR_MESSAGE);
    private static final short NO_ENTRY = 0;
    private static final short BOOKMARK_ENTRY = 2;
    private static final short DIRECTORY_ENTRY = 3;
    private class CallbackHandler extends HTMLEditorKit.ParserCallback {
         /** Parent node that new entries are added to. */
         private BookmarkDirectory parent;
         /** The most recently parsed tag. */
         private HTML.Tag tag;
         /** The last tag encountered. */
         private HTML.Tag lastTag;
         * The state, will be one of NO_ENTRY, DIRECTORY_ENTRY,
    * or BOOKMARK_ENTRY.
         private short state;
         * Date for the next BookmarkDirectory node.
         private Date parentDate;
         * The values from the attributes are placed in here. When the
         * text is encountered this is added to the node hierarchy and a
    * new instance is created.
         private BookmarkEntry lastBookmark;
         * Creates the CallbackHandler.
         public CallbackHandler() {
         parent = root;
         lastBookmark = new BookmarkEntry();
         // HTMLEditorKit.ParserCallback methods
         * Invoked when text in the html document is encountered. Based on
         * the current state, this will either: do nothing
    * (state == NO_ENTRY),
         * create a new BookmarkEntry (state == BOOKMARK_ENTRY) or
    * create a new
         * BookmarkDirectory (state == DIRECTORY_ENTRY). If state is
    * != NO_ENTRY, it is reset to NO_ENTRY after this is
    * invoked.
    public void handleText(char[] data, int pos) {
         switch (state) {
         case NO_ENTRY:
              break;
         case BOOKMARK_ENTRY:
              // URL.
              lastBookmark.setName(new String(data));
    parent.add(lastBookmark);
    lastBookmark = new BookmarkEntry();
              break;
         case DIRECTORY_ENTRY:
              // directory.
              BookmarkDirectory newParent = new
                   BookmarkDirectory(new String(data));
              newParent.setCreated(parentDate);
              parent.add(newParent);
              parent = newParent;
              break;
         default:
              break;
    state = NO_ENTRY;
         * Invoked when a start tag is encountered. Based on the tag
         * this may update the BookmarkEntry and state, or update the
         * parentDate.
         public void handleStartTag(HTML.Tag t, MutableAttributeSet a,
                        int pos) {
         lastTag = tag;
         tag = t;
         if (t == HTML.Tag.A && lastTag == HTML.Tag.DT) {
    long lDate;
              // URL
              URL url;
              try {
              url = new URL((String)a.getAttribute(HTML.Attribute.HREF));
              } catch (MalformedURLException murle) {
              url = null;
              lastBookmark.setLocation(url);
              // created
              Date date;
              try {
    lDate = Long.parseLong((String)a.getAttribute("add_date"));
    if (lDate != 0l) {
    date = new Date(1000l * lDate);
    else {
    date = null;
              } catch (Exception ex) {
              date = null;
              lastBookmark.setCreated(date);
              // last visited
              try {
    lDate = Long.parseLong((String)a.
    getAttribute("last_visit"));
    if (lDate != 0l) {
    date = new Date(1000l * lDate);
    else {
    date = null;
              } catch (Exception ex) {
              date = null;
              lastBookmark.setLastVisited(date);
              state = BOOKMARK_ENTRY;
         else if (t == HTML.Tag.H3 && lastTag == HTML.Tag.DT) {
              // new node.
              try {
              parentDate = new Date(1000l * Long.parseLong((String)a.
                                  getAttribute("add_date")));
              } catch (Exception ex) {
              parentDate = null;
              state = DIRECTORY_ENTRY;
         * Invoked when the end of a tag is encountered. If the tag is
         * a DL, this will set the node that parents are added to the current
         * nodes parent.
         public void handleEndTag(HTML.Tag t, int pos) {
         if (t == HTML.Tag.DL && parent != null) {
              parent = (BookmarkDirectory)parent.getParent();
    public static class BookmarkDirectory extends DefaultMutableTreeNode {
         /** Dates created. */
         private Date created;
         public BookmarkDirectory(String name) {
         super(name);
         public void setName(String name) {
         setUserObject(name);
         public String getName() {
         return (String)getUserObject();
         public void setCreated(Date date) {
         this.created = date;
         public Date getCreated() {
         return created;
    public static class BookmarkEntry extends DefaultMutableTreeNode {
         /** User description of the string. */
         private String name;
         /** The URL the bookmark represents. */
         private URL location;
         /** Dates the URL was last visited. */
         private Date lastVisited;
         /** Date the URL was created. */
         private Date created;
         public void setName(String name) {
         this.name = name;
         public String getName() {
         return name;
         public void setLocation(URL location) {
         this.location = location;
         public URL getLocation() {
         return location;
         public void setLastVisited(Date date) {
         lastVisited = date;
         public Date getLastVisited() {
         return lastVisited;
         public void setCreated(Date date) {
         this.created = date;
         public Date getCreated() {
         return created;
         public String toString() {
         return getName();
    // Bookmarks.java END
    // BookmarksModel.java BEGIN
    import java.util.Date;
    public class BookmarksModel extends DynamicTreeTableModel {
    * Names of the columns.
    private static final String[] columnNames =
    { "Name", "Location", "Last Visited", "Created" };
    * Method names used to access the data to display.
    private static final String[] methodNames =
    { "getName", "getLocation", "getLastVisited","getCreated" };
    * Method names used to set the data.
    private static final String[] setterMethodNames =
    { "setName", "setLocation", "setLastVisited","setCreated" };
    private static final Class[] classes =
    { TreeTableModel.class, String.class, Date.class, Date.class };
    public BookmarksModel(Bookmarks.BookmarkDirectory root) {
         super(root, columnNames, methodNames, setterMethodNames, classes);
    public boolean isCellEditable(Object node, int column) {
         switch (column) {
         case 0:
         // Allow editing of the name, as long as not the root.
         return (node != getRoot());
         case 1:
         // Allow editing of the location, as long as not a
         // directory
         return (node instanceof Bookmarks.BookmarkEntry);
         default:
         // Don't allow editing of the date fields.
         return false;
    // BookmarksModel.java END
    // DynamicTreeTableModel.java BEGIN
    import java.lang.reflect.*;
    import javax.swing.tree.*;
    public class DynamicTreeTableModel extends AbstractTreeTableModel {
    /** Names of the columns, used for the TableModel getColumnName method. */
    private String[] columnNames;
    private String[] methodNames;
    private String[] setterMethodNames;
    /** Column classes, used for the TableModel method getColumnClass. */
    private Class[] cTypes;
    public DynamicTreeTableModel(TreeNode root, String[] columnNames,
                        String[] getterMethodNames,
                        String[] setterMethodNames,
                        Class[] cTypes) {
         super(root);
         this.columnNames = columnNames;
         this.methodNames = getterMethodNames;
         this.setterMethodNames = setterMethodNames;
         this.cTypes = cTypes;
    public int getChildCount(Object node) {
         return ((TreeNode)node).getChildCount();
    public Object getChild(Object node, int i) {
         return ((TreeNode)node).getChildAt(i);
    public boolean isLeaf(Object node) {
         return ((TreeNode)node).isLeaf();
    public int getColumnCount() {
         return columnNames.length;
    public String getColumnName(int column) {
         if (cTypes == null || column < 0 || column >= cTypes.length) {
         return null;
         return columnNames[column];
    public Class getColumnClass(int column) {
         if (cTypes == null || column < 0 || column >= cTypes.length) {
         return null;
         return cTypes[column];
    public Object getValueAt(Object node, int column) {
         try {
         Method method = node.getClass().getMethod(methodNames[column],
                                  null);
         if (method != null) {
              return method.invoke(node, null);
         catch (Throwable th) {}
         return null;
    * Returns true if there is a setter method name for column
    * <code>column</code>. This is set in the constructor.
    public boolean isCellEditable(Object node, int column) {
    return (setterMethodNames != null &&
         setterMethodNames[column] != null);
    // Note: This looks up the methods each time! This is rather inefficient;
    // it should really be changed to cache matching
    // methods/constructors
    // based on <code>node</code>'s class, and code>aValue</code>'s
    //class.
    public void setValueAt(Object aValue, Object node, int column) {
         boolean found = false;
         try {
         // We have to search through all the methods since the
         // types may not match up.
         Method[] methods = node.getClass().getMethods();
         for (int counter = methods.length - 1; counter >= 0; counter--) {
              if (methods[counter].getName().equals
              (setterMethodNames[column]) && methods[counter].
              getParameterTypes() != null && methods[counter].
              getParameterTypes().length == 1) {
              // We found a matching method
              Class param = methods[counter].getParameterTypes()[0];
              if (!param.isInstance(aValue)) {
                   // Yes, we can use the value passed in directly,
                   // no coercision is necessary!
                   if (aValue instanceof String &&
                   ((String)aValue).length() == 0) {
                   // Assume an empty string is null, this is
                   // probably bogus for here.
                   aValue = null;
                   else {
                   // Have to attempt some sort of coercision.
                   // See if the expected parameter type has
                   // a constructor that takes a String.
                   Constructor cs = param.getConstructor
                   (new Class[] { String.class });
                   if (cs != null) {
                        aValue = cs.newInstance(new Object[]
                                       { aValue });
                   else {
                        aValue = null;
              // null either means it was an empty string, or there
              // was no translation. Could potentially deal with these
              // differently.
              methods[counter].invoke(node, new Object[] { aValue });
              found = true;
              break;
         } catch (Throwable th) {
         System.out.println("exception: " + th);
         if (found) {
         // The value changed, fire an event to notify listeners.
         TreeNode parent = ((TreeNode)node).getParent();
         fireTreeNodesChanged(this, getPathToRoot(parent),
                        new int[] { getIndexOfChild(parent, node) },
                        new Object[] { node });
    public TreeNode[] getPathToRoot(TreeNode aNode) {
    return getPathToRoot(aNode, 0);
    private TreeNode[] getPathToRoot(TreeNode aNode, int depth) {
    TreeNode[] retNodes;
         // This method recurses, traversing towards the root in order
         // size the array. On the way back, it fills in the nodes,
         // starting from the root and working back to the original node.
    /* Check for null, in case someone passed in a null node, or
    they passed in an element that isn't rooted at root. */
    if(aNode == null) {
    if(depth == 0)
    return null;
    else
    retNodes = new TreeNode[depth];
    else {
    depth++;
    if(aNode == root)
    retNodes = new TreeNode[depth];
    else
    retNodes = getPathToRoot(aNode.getParent(), depth);
    retNodes[retNodes.length - depth] = aNode;
    return retNodes;
    // DynamicTreeTableModel.java END
    // IconRenderer.java BEGIN
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import javax.swing.plaf.basic.BasicTreeUI;
    class IconRenderer extends DefaultTreeCellRenderer
    // Color backColor = new Color(0xD0, 0xCC, 0xFF);
    Color backColor = new Color(0xF0, 0xF0, 0xE0);
    String tipText = "";
    JTree tree;
    int currRow = 0;
    boolean m_selected;
    JTable table;
    public IconRenderer(JTree tree, JTable table) {
    this.table = table;
    // setBackground(backColor);
    setBackground(Color.GREEN);
    setForeground(Color.black);
         this.tree = tree;
    public Component getTreeCellRendererComponent(JTree tree, Object value,
    boolean selected,
    boolean expanded, boolean leaf,
    int row, boolean hasFocus) {
         Object node = null;
         super.getTreeCellRendererComponent(
    tree, value, selected,
    expanded, leaf, row,
    hasFocus);
         TreePath treePath = tree.getPathForRow(row);
    if(treePath != null)
              node = treePath.getLastPathComponent();
    currRow = row;
    m_selected = selected;
    DefaultMutableTreeNode itc = null;
    if (node instanceof DefaultMutableTreeNode) {
    itc = (DefaultMutableTreeNode)node;
         setClosedIcon(closedIcon);
    setOpenIcon(openIcon);
    return this;
    /* Override the default to send back different strings for folders and leaves. */
    public String getToolTipText() {
    return tipText;
    * Paints the value. The background is filled based on selected.
    public void paint(Graphics g) {
         super.paint(g);
         Color bColor = null;
         if(!m_selected) {
              System.out.println(" iconren not sel currRow " + currRow);
              if(currRow % 2 == 0) {
                   bColor = Color.WHITE;
              } else {
              bColor = backColor;
         } else {
              bColor = table.getSelectionBackground();
              System.out.println("in else selbg = " + bColor);           
              bColor = new Color(0xF0, 0xCC, 0x92);
              System.out.println(" bColor aft = " + bColor);           
         int imageOffset = -1;
         if(bColor != null) {
         imageOffset = getLabelStart();
         g.setColor(bColor);
         if(!m_selected) {
              System.out.println(" not sel setting white ");
              g.setXORMode(new Color(0xFF, 0xFF, 0xFF));
         } else {
    //          g.setXORMode(new Color(0xCC, 0xCC, 0x9F));
              g.setXORMode(new Color(0x00, 0x00, 0x00));
              System.out.println(" using color = " + g.getColor());           
         if(getComponentOrientation().isLeftToRight()) {
         g.fillRect(imageOffset, 0, getWidth() - 1 - imageOffset,
                   getHeight());
         } else {
         g.fillRect(0, 0, getWidth() - 1 - imageOffset,
                   getHeight());
    private int getLabelStart() {
         Icon currentI = getIcon();
         if(currentI != null && getText() != null) {
         return currentI.getIconWidth() + Math.max(0, getIconTextGap() - 1);
         return 0;
    // IconRenderer.java END
    // IndicatorRenderer.java BEGIN
    // import java.awt.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.event.*;
    import javax.swing.tree.*;
    import javax.swing.table.*;
    import javax.swing.table.*;
    import javax.swing.plaf.basic.*;
    import java.awt.event.*;
    import java.util.EventObject;
    import java.text.NumberFormat;
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.StringTokenizer;
    import java.util.Arrays;
    class IndicatorRenderer extends DefaultTableCellRenderer {
    /** Makes sure the number of displayed in an internationalized
    * manner. */
    protected NumberFormat formatter;
    /** Row that is currently being painted. */
    protected int lastRow;
    protected int reloadRow;
    protected int reloadCounter;
    protected TreeTableModel treeTableModel;
    protected TreeTableModelAdapter treeTblAdapter;
    protected JTable table;
    Component renderer = null;
    Color backColor = new Color(0xF0, 0xF0, 0xE0);
    IndicatorRenderer(TreeTableModelAdapter treeTblAdapter, TreeTableModel treeTableModel) {
         setHorizontalAlignment(JLabel.RIGHT);
         setFont(new Font("serif", Font.BOLD, 12));
         this.treeTableModel = treeTableModel;
         this.treeTblAdapter = treeTblAdapter;
    * Invoked as part of DefaultTableCellRenderers implemention. Sets
    * the text of the label.
    public void setValue(Object value) {
    /* setText((value == null) ? "---" : formatter.format(value)); */
         setText((value == null) ? "---" : (String) value.toString());
    * Returns this.
    public Component getTableCellRendererComponent(JTable table,
    Object value, boolean isSelected, boolean hasFocus,
    int row, int column) {
         renderer = super.getTableCellRendererComponent(table, value, isSelected,
    hasFocus, row, column);
         lastRow = row;
         this.table = table;
              if(isSelected) {
                   doMask(hasFocus, isSelected);
              } else
              setBackground(table.getBackground());
    return renderer;
    * If the row being painted is also being reloaded this will draw
    * a little indicator.
    public void paint(Graphics g) {
         super.paint(g);
    private void doMask(boolean hasFocus, boolean selected) {
              maskBackground(hasFocus, selected);
    private void maskBackground(boolean hasFocus, boolean selected) {
              Color seed = null;
              seed = table.getSelectionBackground();
              Color color = seed;
              if (color != null) {
                   setBackground(
    new Color(0xF0, 0xCC, 0x92));
    // IndicatorRenderer.java END
    // JTreeTable.java BEGIN
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.event.*;
    import javax.swing.tree.*;
    import javax.swing.table.*;
    import java.awt.event.*;
    import java.util.EventObject;
    public class JTreeTable extends JTable {
    /** A subclass of JTree. */
    protected TreeTableCellRenderer tree;
    protected IndicatorRenderer indicatorRenderer = null;
    public JTreeTable(TreeTableModel treeTableModel) {
         super();
         // Creates the tree. It will be used as a renderer and editor.
         tree = new TreeTableCellRenderer(treeTableModel);
         TreeTableModelAdapter tdap = new TreeTableModelAdapter(treeTableModel, tree);
         // Installs a tableModel representing the visible rows in the tree.
         super.setModel(tdap);
         // Forces the JTable and JTree to share their row selection models.
         ListToTreeSelectionModelWrapper selectionWrapper = new
         ListToTreeSelectionModelWrapper();
         tree.setSelectionModel(selectionWrapper);
         setSelectionModel(selectionWrapper.getListSelectionModel());
         // Installs the tree editor renderer and editor.
         setDefaultRenderer(TreeTableModel.class, tree);
         setDefaultEditor(TreeTableModel.class, new TreeTableCellEditor());
         indicatorRenderer = new IndicatorRenderer(tdap, treeTableModel);     
         // No grid.
         setShowGrid(false);
         // No intercell spacing
         setIntercellSpacing(new Dimension(0, 0));     
         // And update the height of the trees row to match that of
         // the table.
         //if (tree.getRowHeight() < 1) {
         // Metal looks better like this.
         setRowHeight(20);
    public TableCellRenderer getCellRenderer(int row, int col) {
              if(col == 0)
              return tree;
              else
              return indicatorRenderer;     
    public void updateUI() {
         super.updateUI();
         if(tree != null) {
         tree.updateUI();
         // Do this so that the editor is referencing the current renderer
         // from the tree. The renderer can potentially change each time
         // laf changes.
         setDefaultEditor(TreeTableModel.class, new TreeTableCellEditor());
         // Use the tree's default foreground and background colors in the
         // table.
    LookAndFeel.installColorsAndFont(this, "Tree.background",
    "Tree.foreground", "Tree.font");
    public int getEditingRow() {
    return (getColumnClass(editingColumn) == TreeTableModel.class) ? -1 :
         editingRow;
    private int realEditingRow() {
         return editingRow;
    public void sizeColumnsToFit(int resizingColumn) {
         super.sizeColumnsToFit(resizingColumn);
         if (getEditingColumn() != -1 && getColumnClass(editingColumn) ==
         TreeTableModel.class) {
         Rectangle cellRect = getCellRect(realEditingRow(),
                             getEditingColumn(), false);
    Component component = getEditorComponent();
         component.setBounds(cellRect);
    component.validate();
    public void setRowHeight(int rowHeight) {
    super.setRowHeight(rowHeight);
         if (tree != null && tree.getRowHeight() != rowHeight) {
    tree.setRowHeight(getRowHeight());
    public JTree getTree() {
         return tree;
    public boolean editCellAt(int row, int column, EventObject e){
         boolean retValue = super.editCellAt(row, column, e);
         if (retValue && getColumnClass(column) == TreeTableModel.class) {
         repaint(getCellRect(row, column, false));
         return retValue;
    public class TreeTableCellRenderer extends JTree implements
         TableCellRenderer {
         /** Last table/tree row asked to renderer. */
         protected int visibleRow;
         /** Border to draw around the tree, if this is non-null, it will
         * be painted. */
         protected Border highlightBorder;
         public TreeTableCellRenderer(Tr

  • Cross product Color Rendering Issue (probably not profiles)

    I can't yet figure this scene out:
    I use a grayscale tif file as a slide/theme background in Apple's Keynote. Since it's grayscale, it prints using only K ink from both Preview and when imported into an InDesign page.
    Since the grayscale serves only as background, completed slides are of course full of color elements on top of the background. Trouble is when I print to my color laser the background area prints in CMYK (and as a further test, when I print to an inkjet the background area prints in RGB or RGBK). This "quatra-toning" massively shifts the variously shaded K background to very blue-ish. (the images is of a piece of slate stone).
    This color shift persists no matter how I can figure to save the slides: using Keynotes export to save slides as jpgs, pngs, or tifs. It also persists when printing from screen captures (which I believe OS X saves as pngs by default). Yet *all* these formats show a nice grayscale slate background onscreen.
    I guess there's some color rendering, or color management, or both issue. I'm no color management maven, but I have used Bridge to set a suite-wide colorspace, and have used Photoshop to change the export files' colorspace as needed.
    What's the fix? TIA. Bart

    Bart,
    Why not try the Color Management forum: http://www.adobeforums.com/cgi-bin/webx?14@@.eea5b31
    Neil

Maybe you are looking for

  • My iPod Touch (5th generation) is not responding to my touch. There are also several colored lines in the background of my screen. Virus?

    Since my iPod isn't responding to my touch, I can't switch it off or restart it as I normally would. I've tried doing the hold-down-the-sleep-button-and-the-home-button-for-ten-seconds thing but when the Apple logo appears, it's either completely pin

  • Will not boot after 10.10.2 security update

    I downloaded the security update as usual. computer starts to boot back up, gray screen with Apple logo & progress bar gets 2/3 & stops. I restarted, used the disc utility to check & repair errors. nothing found. Re-installed os, but nothing works. i

  • Gta 4 on windows 7 using bootcamp intel problem

    hello, i installed windows 7 home premium on my mac using bootcamp, but i have heard of all these problems with intel 3000hd, is there a way to let me play gta 4 with the graphics the ram actually can take, or is there a way to trick the computer to

  • Need one link

    Hi All, I know its pretty silly question over here.But I really need that One.I need MYSQL question forum like oracle OTN. Because I am facing some problem with MYSQL procedure.Please provide me the link. Thanks in advance

  • HTTP response code: 405 Method Not Allowed

    I get the following error message when trying to log into the DTR. However from another machine the same URL seems to work. When tring to import the configuration from remote the following stack trace shows up: [code] com.sap.lcr.api.cimclient.LcrExc