JTree Custom TreeCellRenderer problem on Mac OS + Firefox

Hi,
I have a JApplet containing a JTree component with custom renderer that implements TreeCellRenderer to display CheckBox along the tree nodes.
Everything works fine on Window and Linux OS (firefox browser)
Problem is with :
Firefox + Mac: applet fails to load because getTreeCellRendererComponent() does not seem to get invoked.
Appreciate you time and thoughts on the problem.
Edited by: rg18mar on Nov 27, 2007 10:31 PM

Our only other environment we could set up was on Mac OS 10.7.5, and we could not reproduce the issue.  Based on that it would appear to be something new with Mac OS 10.8.

Similar Messages

  • Custom command problems on Mac OS X

    I am seeing a problem with custom context commands in our custom connector that is also reproducible with the sample FTP connector shipped with the SDK.  I am using Adobe Drive 3.2.0.41 on Mac OS X 10.8.2
    For my test I am connecting to a FTP server and attempting to run the "File Properties" command from a file's Adobe Drive menu in Finder.  When I first start Drive and connect, the command works and the "File Properties" dialog appears as expected.  However, if I disconnect, reconnect, then browse back to the file and attempt the command again, the File Properties dialog does not appear.  The Finder window does kind of "grey out" as if another dialog is about to be shown, but it never is. I don't see any kind of error messages in the CS5ServiceManager logs. 
    If I disconnect, close Drive, kill the AdobeDriveCS5 and CS5ServiceManager processes with Activity Monitor, and then restart Drive and reconnect, the custom commands work again.
    Has anyone else experienced these kinds of problems with custom commands on Mac OS after a disconnect/reconnect cycle?
    Thanks,
    Brian

    Our only other environment we could set up was on Mac OS 10.7.5, and we could not reproduce the issue.  Based on that it would appear to be something new with Mac OS 10.8.

  • Back button only works about 50% of the time. Have to hit it twice, sometimes three times before it works. Problem is intermittent. Firefox 3.6.10 on Mac OS 10.6.4 (same on both MacBook and iMac machines).

    Back button only works about 50% of the time. Have to hit it twice, sometimes three times before it works. Problem is intermittent. Firefox 3.6.10 on Mac OS 10.6.4 (same on both MacBook and iMac machines).

    You can try http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox

  • I have a mac. Firefox prompts me to download updates, but when I authorize the download it looks as though it's starting, but never gets underway or finishes. How do I address this problem?

    I have a mac. Firefox prompts me to download updates, but when I authorize the download it looks as though it's starting, but never gets underway or finishes. How do I address this problem?

    Try the alternate and easiest way by downloading
    * getfirefox.com

  • JTree Cell Renderer Problem

    Hi can someone help me please??
    I've created a JTree with a custom TreeUI which paints the JTree's backround with gradient paint.
    The problem i'm having is that i want to make the background color of the treecells transparent, no color at all. In my custom TreeCellRenderer it works fine setting the foreground color and everything, but not the background...
    Any clues anyone?

    Figured it out right after this post :)
    I had to do the following in my cellrenderer
    setBackgroundNonSelectionColor(new Color(0, 0, 0, 0));As a parameter I sent a color object with a alpha level of 0 (completly transparent)...

  • Custom TreeCellRenderer

    I've written a custom TreeCellRenderer that extends DefaultTreeCellRenderer. Each node in the tree has an object associated with it, and depending on that object, a different icon is used by the renderer (its not a file system, but similar).
    The problem is that when you edit a node, the default icons are used. The custom renderer is being used by the TreeCellEditor (also custom), but I think it is using the getXXXXIcon() methods rather than the getTreeCellRendererComponent method.
    The solution seems to be to override the getTreeCellEditorComponent() method in the TreeCellEditor class, but apart from the icon this is doint exactly what I want it to do.
    Is there an easy way to change the icon it will use without causing too much carnage?

    I wanted to make sure I was correct, but I wasn't.import java.awt.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import java.util.Random;
    public class Test2 extends JFrame {
      static final ImageIcon[] icons = { new ImageIcon("icon1.gif"),
                                         new ImageIcon("icon2.gif") };
      public Test2() {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        Container content = getContentPane();
        DefaultMutableTreeNode root = new DefaultMutableTreeNode(
                                                  new MyObject("root", icons[0]));
        JTree jt = new JTree(root);
        jt.setCellRenderer(new MyRenderer());
        Random r = new Random();
        for (int i=0; i<5; i++) {
          DefaultMutableTreeNode child = new DefaultMutableTreeNode(
                      new MyObject("Child-"+i,icons[r.nextInt(icons.length)]));
          root.add(child);
          for (int j=0; j<5; j++) {
            DefaultMutableTreeNode gchild = new DefaultMutableTreeNode(
                        new MyObject("Grandchild-"+j,icons[r.nextInt(icons.length)]));
            child.add(gchild);
          content.add(new JScrollPane(jt), BorderLayout.CENTER);
        setSize(300,300);
      public static void main(String[] args) { new Test2().setVisible(true); }
    class MyObject {
      String text;
      Icon icon;
      public MyObject(String text, Icon icon) { this.text=text; this.icon=icon; }
      public String toString() { return text; }
      public Icon getIcon() { return icon; }
    class MyRenderer extends DefaultTreeCellRenderer {
      public Component getTreeCellRendererComponent(JTree tree, Object value,
                                                    boolean sel, boolean exp,
                                                    boolean leaf, int row,
                                                    boolean focus) {
        Component c = super.getTreeCellRendererComponent(tree, value, sel, exp, leaf,
                                                    row, focus);
        if (value instanceof DefaultMutableTreeNode) {
          Object val = ( (DefaultMutableTreeNode) value).getUserObject();
          if (val instanceof MyObject) {
            System.out.println("Yes");
            setIcon( ( (MyObject) val).getIcon());
          } else System.out.println("No: " + val.getClass());
        return c;
    }

  • When I compose an email in either gmail or yahoo, the cursor lags behind for about 2 seconds. This does not happen when I compose an email with Safari or Chrome. I am using a Mac with Firefox version 3.6.3. Any idea why this happens?

    When I compose an email in either gmail or yahoo, the cursor lags behind for about 2 seconds. This does not happen when I compose an email with Safari or Chrome. I am using a Mac with Firefox version 3.6.3. Any idea why this happens?
    == This happened ==
    Every time Firefox opened

    try
    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
    Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!
    Thank you.

  • Clicking on a link in Mac Mail Firefox does not open in front of Mail--it used too. The link does open but I have to click on the Firefox icon in the Tray to bring it to full screen. Can you please help

    clicking on a link in Mac Mail Firefox does not open in front of Mail--it used too. The link does open but I have toclick on the Firefox icon in the Tray to bring it to full screen. Can you please help.

    Thanks Jason, I had the same problem and did exactly the steps above. Problem solved! You rock! :)

  • How can I tell if my internet problem is caused by firefox, my computer, or my internet connection?

    At certain times of the day (usually only late at night), my internet becomes unusable. The websites take so long to load that they just time out (or I give up). It happens periodically in the early evening as well (I just tried to watch a two-minute video and it took me half an hour). I can't tell if the problem is caused by firefox, my computer, or my internet. What can I do to determine where the problem is?
    Thanks!

    You have several issues.
    *1
    Your System Details shows;
    Installed Plug-ins
    Adobe Shockwave for Director Netscape plug-in, version 12.1.1.151
    Adobe Shockwave for Director Netscape plug-in, version 12.0
    Having more than one version of a program may cause issues.
    Flash is notorious for not cleaning out the older version as part of an update.
    Grab the uninstaller from here:
    '''[http://helpx.adobe.com/flash-player/kb/uninstall-flash-player-windows.html Uninstall Flash Player | Windows]'''
    '''[http://helpx.adobe.com/flash-player/kb/uninstall-flash-player-mac-os.html Uninstall Flash Player | Mac]'''
    Then reinstall the latest version.
    Flash Player '''v15.0.0.223 http://get.adobe.com/flashplayer/'''
    Shockwave Director '''v12.1.4.154 http://get.adobe.com/shockwave/'''

  • Determing which component from a custom TreeCellRenderer was clicked on

    hi,
    i've been experimenting with finding which component has been clicked on in a JTree which has a custom tree cell renderer. I've got a piece of code that appears to work, but am unsure if this is the proper way to go about doing this, and whether it might fail under some circumstances.
    any help appreciated,
    asjf
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import javax.swing.event.*;
    public class JTreeTest1 {
       public static void main(String[] arg) throws Exception {
          final JTree tree = new JTree();
          final TreeCellRenderer renderer = new MyRenderer();
          tree.setCellRenderer(renderer);
          tree.addMouseListener(new MouseAdapter() {
             public void mouseClicked(MouseEvent e) {
                int x = e.getX(), y = e.getY();
                int row = tree.getRowForLocation(x,y);
                TreePath path = tree.getPathForLocation(x,y);
                if(path!=null) {
                   Object o = path.getLastPathComponent();
                   Rectangle r = tree.getPathBounds(path);
                   // how to detect what component has been clicked on?
                   // simplification: pretend all boolean state has no effect on renderer (which is true for the renderer below)
                   Component renderedComponent = renderer.getTreeCellRendererComponent(tree, o, false, false, false, row, false);
                   renderedComponent.setBounds(r);
                   int _x = (int) ((double)e.getX() - r.getX());
                   int _y = (int) ((double)e.getY() - r.getY());
                   Component clickedUpon = SwingUtilities.getDeepestComponentAt(renderedComponent, _x, _y);
                   if(clickedUpon instanceof JLabel) {
                      JLabel jl = (JLabel) clickedUpon;
                      System.out.println(jl.getText());
          JFrame frame = new JFrame("JTreeTest1");
          frame.getContentPane().add(tree);
          frame.pack();
          frame.setVisible(true);
    class MyRenderer extends JPanel implements TreeCellRenderer {
       JLabel custom;
       public MyRenderer() {
          super(); // flow layout
          add(new JLabel("Hello"));
          add(custom = new JLabel());
          custom.setOpaque(true);
          custom.setBackground(UIManager.getColor("Tree.background"));
          custom.setForeground(UIManager.getColor("Tree.foreground"));
          add(new JLabel("World"));
       public Component getTreeCellRendererComponent(JTree tree, Object value, boolean isSelected, boolean expanded,
                                                     boolean leaf, int row, boolean hasFocus)
          custom.setText("("+value.toString()+")");
          return this;
    }

    My only advice would be to remember that rendered components are not actually added to the tree, so they are not a child of the tree... they actually cannot be clicked on. The rendered components are quickly used just to paint and specific image and then discarded (which is why you don't typically want to create new ones each time). When you click on the tree, there is no "rendered component" there, just an image that was painted.
    Hope this helps
    Josh Castagno
    http://www.jdc-software.com

  • I have created a powerpoint web app in sharepoint 2013 ,i used a ppt in this web app.My ppt image is not displaying correctly in MAC mozilla firefox

    I am facing this problem in MAC OS Mozilla Firefox.It is displaying correctly in other browsers like google chrome and internet explorer in MAC OS,but it is not displaying correctly in Mozilla firefox.
    I already checked the possible reasons like:
    1. Restarted my computer
    2. Clear cookies and cache
    3. Restarted Firefox in Safe Mode
    4. Troubleshoot all plugins
    5. Reinstalled Firefox
    6. Reset Firefox.
    anyone know how to fix this issue.I am waiting for your valuable answers.

    Looking at [http://sharepoint.stackexchange.com/questions/82591/in-powerpoint-web-app-2013-ppt-is-not-displayed-correctly-in-mac-os-mozilla-fire your screen shot] it reminds me of a problem with Flash on the Retina display not using the full area if hardware acceleration of graphics is disabled. See [https://support.mozilla.org/en-US/questions/968863 I'm only getting one quarter of a screen on Flash Player on Firefox] (unsolved).
    Not sure if that's relevant but does the display of the slide change if you make sure that hardware acceleration is enabled? The checkbox is here:
    Firefox menu > Prefences > Advanced
    On the "General" mini-tab, uncheck the box for "Use hardware acceleration when available"
    Note that any changes take effect after you exit and restart Firefox.
    To see whether Firefox actually is using hardware acceleration, you can check the troubleshooting information. Either:
    * Help > Troubleshooting Information
    * type or paste about:support in the address bar and press Enter
    Toward the end, in the Graphics section, look for this row:
    GPU Accelerated Windows
    The number will show a ratio of accelerated to non-accelerated window. If hardware acceleration is disabled, the first number will always be zero.
    By the way, is the SharePoint PPT viewer using Flash, or Silverlight, or another plugin? Typically Firefox will display an icon that looks a bit like a "Lego" block in the address bar showing what plugins are in use in the page.

  • Making JTree custom renderer panel scalable

    Hi, everyone. I have made custom TreeCellRenderer which extends JPanel. Panel's background is in different color than JTree's backgound. I need to get my panel rendering the nodes to fill the whole space JTree has in it's parent panel horizontally. For now I have put static width to nodes and it looks fine, but it's not scalable. If I don't put any sizes the panel takes only the size it needs in cell and the outfit is crappy because of panel's different bgcolor. Is there any easy way to make rendering panel use the width which JTree has in it's container. I have implemented getPreferredSize() method in custom TreeCellRenderer and now it returns the static width and height of the rendering panel. Do I have to get JTrees container panel's width every time and pass it to renderer and get size somehow from there or is there some easier way.
    -e

    Yes, there is a reason. Different levels of nodes contain different components. Example main level nodes have print and save buttons on the most right of the panel. Only leafs have same bgcolor as the tree has and those are already now scalable, because size is not set for them.

  • QTWriteObject_XHTML problem in Mac, works in Windows

    Hi There,
    I am facing a problem with the QT_WriteOBJECT_XHTML object on the web page.
    QT_WriteOBJECT_XHTML is used in the code to embed the streaming links for the course videos. The link for the videos had been working fine for a long time until today. Strangely, the links still work fine on Windows environment.
    As seen in the image, the quicktime jpg is disabled in the browser (safari, firefox and chrome) on Mac and there are no errors generated. Not sure, the root cause of the problem.
    Mac OS : Mac OS X 10.8.2
    Here is the code written -
    HTML Part
    <html>
    <head>
        <script src="http://<server name/_stream/AC_QuickTime.js" language="JavaScript" type="text/javascript"></script>
    <asp:DataGrid id="DemoGrid" runat="server" Font-Name="Arial" AutoGenerateColumns="False" DataKeyField="filedate" HorizontalAlign ="center" SelectedItemStyle-BackColor="#ffff00" AlternatingItemStyle-BackColor="#BEDFFA" AllowSorting="True" HeaderStyle-ForeColor="white" HeaderStyle-Font-Bold="True" Font-Size="10pt" HeaderStyle-BackColor="#6499F0" width="450">
         <Columns>
              <asp:TemplateColumn HeaderStyle-HorizontalAlign="Center" HeaderText="X">
              <ItemTemplate>
                   <asp:Checkbox ID="chkSelection" Runat="server" />
              </ItemTemplate>
              </asp:TemplateColumn>
                   <asp:TemplateColumn HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="center" HeaderText="Lecture" ItemStyle-Width="150">
                        <ItemTemplate>
                             <asp:Label id="lbltitle" text='<%# DataBinder.Eval(Container.DataItem, "title") %>' runat="server" />
                        </ItemTemplate>
                   </asp:TemplateColumn>
         </Columns>
         <Columns>
              <asp:TemplateColumn HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="center" HeaderText=".MOV Stream" ItemStyle-Width="80">
                   <ItemTemplate >
                        <%# calculate_lecturelink(DataBinder.Eval(Container.DataItem,"streamlink"),"mov")%>
                   </ItemTemplate>
              </asp:TemplateColumn>
    Function calculate_lecturelink(current_link As String, link_type As String) As String
         << --- Some processing is done before the resulting link is generated -- >>
         new_coursefolder = "rstp://<server name>/Spring2013/CE430/CE430_L01_0.mov"
         retvalue = "<script language=JavaScript type=text/javascript> QT_WriteOBJECT_XHTML('http://<server name>/images/qtime.jpg','40','40','','autoplay','true','cache','FALSE','control ler','false','href','" & new_coursefolder & "','target','QuickTimePlayer','type','video/quicktime'); <" & "/script>"
         Return retvalue
      End Function
    Any help to inspect the problem will be of a great help.
    Thank you!

    Hi There,
    I am facing a problem with the QT_WriteOBJECT_XHTML object on the web page.
    QT_WriteOBJECT_XHTML is used in the code to embed the streaming links for the course videos. The link for the videos had been working fine for a long time until today. Strangely, the links still work fine on Windows environment.
    As seen in the image, the quicktime jpg is disabled in the browser (safari, firefox and chrome) on Mac and there are no errors generated. Not sure, the root cause of the problem.
    Mac OS : Mac OS X 10.8.2
    Here is the code written -
    HTML Part
    <html>
    <head>
        <script src="http://<server name/_stream/AC_QuickTime.js" language="JavaScript" type="text/javascript"></script>
    <asp:DataGrid id="DemoGrid" runat="server" Font-Name="Arial" AutoGenerateColumns="False" DataKeyField="filedate" HorizontalAlign ="center" SelectedItemStyle-BackColor="#ffff00" AlternatingItemStyle-BackColor="#BEDFFA" AllowSorting="True" HeaderStyle-ForeColor="white" HeaderStyle-Font-Bold="True" Font-Size="10pt" HeaderStyle-BackColor="#6499F0" width="450">
         <Columns>
              <asp:TemplateColumn HeaderStyle-HorizontalAlign="Center" HeaderText="X">
              <ItemTemplate>
                   <asp:Checkbox ID="chkSelection" Runat="server" />
              </ItemTemplate>
              </asp:TemplateColumn>
                   <asp:TemplateColumn HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="center" HeaderText="Lecture" ItemStyle-Width="150">
                        <ItemTemplate>
                             <asp:Label id="lbltitle" text='<%# DataBinder.Eval(Container.DataItem, "title") %>' runat="server" />
                        </ItemTemplate>
                   </asp:TemplateColumn>
         </Columns>
         <Columns>
              <asp:TemplateColumn HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="center" HeaderText=".MOV Stream" ItemStyle-Width="80">
                   <ItemTemplate >
                        <%# calculate_lecturelink(DataBinder.Eval(Container.DataItem,"streamlink"),"mov")%>
                   </ItemTemplate>
              </asp:TemplateColumn>
    Function calculate_lecturelink(current_link As String, link_type As String) As String
         << --- Some processing is done before the resulting link is generated -- >>
         new_coursefolder = "rstp://<server name>/Spring2013/CE430/CE430_L01_0.mov"
         retvalue = "<script language=JavaScript type=text/javascript> QT_WriteOBJECT_XHTML('http://<server name>/images/qtime.jpg','40','40','','autoplay','true','cache','FALSE','control ler','false','href','" & new_coursefolder & "','target','QuickTimePlayer','type','video/quicktime'); <" & "/script>"
         Return retvalue
      End Function
    Any help to inspect the problem will be of a great help.
    Thank you!

  • Thawte Personal Email Cert - Problem with Mac Mail

    Hi, I have requested a free cert from Thawte and there seems to be a problem with Mac Mail (using 2.0.7).
    I am using Entourage to send a signed message from [email protected] to [email protected]
    If I check mail for [email protected]
    Mac Mail reports "There was a problem reading the digital signature for this message"
    If I check the same account with Thunderbird, everything works fine.
    Anyone else having or had problems?
    -chris

    Hi,
    Thanks for the responses. I requested another cert and that did not help. Here is the process I used after requesting another cert.
    1. Logged into www.thawte.com and requested a new cert.
    2. Using Firefox, retrieved the cert.
    3. In Firefox, backed up the cert to a pkcs12 file.
    4. Opened Keychain and deleted the first cert.
    5. Imported the pkcs12 backup file. Imported fine.
    6. Open Entourage, under tools, accounts, exchange profile, security, selected the cert Thawte Freemail Member.
    7. Checked all 3 options (sign, include cert, clear test signed.
    8. Created a test message from Entourage to .mac account address.
    9. Checked mail with Mac Mail and signature fails.
    10. Check with 1.02 Thunderbird and it comes back with valid digital signature.
    Next, I sent a test email to my Exchange account from Entourage and that message verifies fine. It just seems to not work when I check my email with Mac Mail.
    Thanks!
    -chris

  • Mac OS firefox sync issue

    On mac os firefox sync does not give me option under preferences>sync to sync other device

    Hello,
    In order to better assist you with your issue please provide us with a screenshot. If you need help to create a screenshot, please see [[How do I create a screenshot of my problem?]]
    Once you've done this, attach the saved screenshot file to your forum post by clicking the '''Browse...''' button below the ''Post your reply'' box. This will help us to visualize the problem.
    Thank you!

Maybe you are looking for