Problem with focus border and ListCellRenderer in custom listbox

I have a bug in some code that I adapted from another posting on this board -- basically what I've done is I have a class that implements a custom "key/value" mapping listbox in which each list item/cell is actually a JPanel consisting of 3 JLabels: the first label is the "key", the second is a fixed "==>" mapping string, and the 3rd is the value to which "key" is mapped.
The code works fine as long as the list cell doesn't have the focus. When it does, it draws a border rectangle to indicate focus, but if the listbox needs to scroll horizontally to display all the text, part of the text gets cut off (i.e. "sometex..." where "sometext" should be displayed).
The ListCellRenderer creates a Gridlayout to lay out the 3 labels in the cell's JPanel.
What can I do to remedy this situation? I'm not sure what I'd need to do in terms of setting the size of the panel so that all the text gets displayed OK within the listbox. Or if there's something else I can do to fix this. The code and a main() to run the code are provided below. To reproduce the problem, click the Add Left and Add Right buttons to add a "mapping" -- when it doesn't have focus, everything displays fine, but when you give it focus, note the text on the right label gets cut off.
//======================================================================
// Begin Source Listing
//======================================================================
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.Collection;
import java.util.Iterator;
import java.util.Vector;
import java.util.Enumeration;
public class TwoColumnListbox extends JPanel
private JList m_list;
private JScrollPane m_Pane;
public TwoColumnListbox(Collection c)
     DataMapListModel model = new DataMapListModel();
     if (c != null)
     Iterator it = c.iterator();
     while (it.hasNext())
     model.addElement(it.next());
     m_list = new JList(model);
     ListBoxRenderer renderer= new ListBoxRenderer();
          m_list.setCellRenderer(renderer);
          setLayout(new BorderLayout());
          m_list.setVisibleRowCount(4);
          m_Pane = new JScrollPane(m_list);
          add(m_Pane, BorderLayout.NORTH);
public JList getList()
return m_list;
public JScrollPane getScrollPane()
return m_Pane;
public static void main(String s[])
          JFrame frame = new JFrame("TwoColumnListbox");
          frame.addWindowListener(new WindowAdapter() {
          public void windowClosing(WindowEvent e) {System.exit(0);}
final DataMappings dm = new DataMappings();
final TwoColumnListbox lb = new TwoColumnListbox(dm.getMappings());
          final DataMap map = new DataMap();
          JButton leftAddBtn = new JButton("Add Left");
          leftAddBtn.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e)
          map.setSource("JButton1");
          DefaultListModel model = new DefaultListModel();
          model.addElement(map);
          lb.getList().setModel(model);
          JButton leftRemoveBtn = new JButton("Remove Left");
          leftRemoveBtn.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e)
          map.setSource("");
          DefaultListModel model = new DefaultListModel();
          model.addElement(map);
          lb.getList().setModel(model);
          JButton rightAddBtn = new JButton("Add Right");
rightAddBtn.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e)
          map.setDestination("/getQuote/symbol[]");
          DefaultListModel model = new DefaultListModel();
          model.addElement(map);
          lb.getList().setModel(model);
          JButton rightRemoveBtn = new JButton("Remove Right");
rightRemoveBtn.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e)
          map.setDestination("");
          DefaultListModel model = new DefaultListModel();
          model.addElement(map);
          lb.getList().setModel(model);
          JPanel leftPanel = new JPanel(new BorderLayout());
          leftPanel.add(leftAddBtn, BorderLayout.NORTH);
          leftPanel.add(leftRemoveBtn, BorderLayout.SOUTH);
JPanel rightPanel = new JPanel(new BorderLayout());
          rightPanel.add(rightAddBtn, BorderLayout.NORTH);
          rightPanel.add(rightRemoveBtn, BorderLayout.SOUTH);
frame.getContentPane().add(leftPanel, BorderLayout.WEST);
          frame.getContentPane().add(lb,BorderLayout.CENTER);
frame.getContentPane().add(rightPanel, BorderLayout.EAST);
          frame.pack();
          frame.setVisible(true);
     class ListBoxRenderer extends JPanel implements ListCellRenderer
          private JLabel left;
          private JLabel arrow;
          private JLabel right;
          private Color clrForeground = UIManager.getColor("List.foreground");
private Color clrBackground = UIManager.getColor("List.background");
private Color clrSelectionForeground = UIManager.getColor("List.selectionForeground");
private Color clrSelectionBackground = UIManager.getColor("List.selection.Background");
          public ListBoxRenderer()
               setLayout(new GridLayout(1, 2, 10, 0));
               //setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
               left = new JLabel("");
               left.setForeground(clrForeground);               
               arrow = new JLabel("");
               arrow.setHorizontalAlignment(SwingConstants.CENTER);
               arrow.setForeground(clrForeground);
               right = new JLabel("");
               right.setHorizontalAlignment(SwingConstants.RIGHT);
               right.setForeground(clrForeground);
               add(left);
               add(arrow);
               add(right);
          public Component getListCellRendererComponent(JList list, Object value,
                    int index, boolean isSelected, boolean cellHasFocus)
               if (isSelected)
                    setBackground(list.getSelectionBackground());
                    setForeground(list.getSelectionForeground());
                    left.setForeground(clrSelectionForeground);
                    arrow.setForeground(clrSelectionForeground);
                    right.setForeground(clrSelectionForeground);
               else
                    setBackground(list.getBackground());
                    setForeground(list.getForeground());
               left.setForeground(clrForeground);
                    arrow.setForeground(clrForeground);
                    right.setForeground(clrForeground);               
               // draw focus rectangle if control has focus. Problem with focus
// and cut off text!!
               if (cellHasFocus)
               // FIXME: for Windows LAF I'm not getting the correct thing here for some reason.
               // Looks OK on Metal though.
               setBorder(BorderFactory.createLineBorder(UIManager.getColor("focusCellHighlightBorder")));
               else
               setBorder(BorderFactory.createEmptyBorder());               
DataMap map = (DataMap) value;
               String displaySource = map.getSource();
               String displayDest = map.getDestination();
               left.setText(displaySource);
               arrow.setText("=>to<=");
               right.setText(displayDest);
               return this;
/** Interface for macro editor UI
* @version 1.0
class DataMappings
private Collection mappings;
public DataMappings()
setMappings(new Vector(0));
public DataMappings(Collection maps)
setMappings(maps);
/** gets mapping value of a specified source object
* @param src -- the "key" or source object, what is mapped.
* @return what the source object is mapped to
* @version 1.0
public Object getValue(String src)
if (src != null)
Iterator it = mappings.iterator();
while (it.hasNext());
DataMap thisMap = (DataMap) it.next();
if (thisMap.getSource().equals(src))
return thisMap.getDestination();
return null;
/** sets mapping value of a specified source object
* @param src -- the "key" or source object, what is mapped.
* @param what the source object is to be mapped to
* @version 1.0
public void setValue(String src, String dest)
if (src != null)
// see if the value is in there first.
Iterator it = mappings.iterator();
while (it.hasNext())
DataMap thisMap = (DataMap) it.next();
if (thisMap.getSource().equals(src))
thisMap.setDestination(dest);
return;
// not in the collection, add it
mappings.add(new DataMap(src, dest));
/** gets collection of mappings
* @return a collection of all mappings in this object.
* @version 1.0
public Collection getMappings()
return mappings;
/** sets collection of mappings
* @param maps a collection of src to destination mappings.
* @version 1.0
public void setMappings(Collection maps)
mappings = maps;
/** adds a DataMap
* @param map a DataMap to add to the mappings
* @version 1.0
public void add(DataMap map)
if (map != null)
mappings.add(map);
class DataMap
public DataMap() {}
public DataMap(String source, String destination)
m_source = source;
m_destination = destination;
public String getSource()
return m_source;
public void setSource(String s)
m_source = s;
public String getDestination()
return m_destination;
public void setDestination(String s)
m_destination = s;
protected String m_source = null;
protected String m_destination = null;
/** list model for datamaps that provides ways
* to determine whether a source is already mapped or
* a destination is already mapped.
class DataMapListModel extends DefaultListModel
public DataMapListModel()
super();          
/** determines whether a source is already mapped
* @param src -- the source property of a datamapping
* @return true if the source is in the list, false if not
public boolean containsSource(Object src)
Enumeration enum = elements();
while (enum.hasMoreElements())
DataMap dm = (DataMap) enum.nextElement();
if (dm.getSource().equals(src))
return true;
return false;
/** determines whether a destination is already mapped
* @param dest -- the destination property of a datamapping
* @return true if the destination is in the list, false if not
public boolean containsDest(Object dest)
Enumeration enum = elements();
while (enum.hasMoreElements())
DataMap dm = (DataMap) enum.nextElement();
if (dm.getDestination().equals(dest))
return true;
return false;
public DataMappings getDataMaps()
DataMappings maps = new DataMappings();
// add all the datamaps in the model
Enumeration enum = elements();
while (enum.hasMoreElements())
DataMap dm = (DataMap) enum.nextElement();
maps.add(dm);
return maps;
//======================================================================
// End of Source Listing
//======================================================================

I did not read the program, but the chopping looks like a layout problem.
I think it's heavy to use a panel + 3 components in a gridlayout for each cell. look at this sample where i draw the Cell myself,
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.util.*;
public class Jlist3 extends JFrame 
     Vector      v  = new Vector();
     JList       jc = new JList(v);
     JScrollPane js = new JScrollPane(jc);
public Jlist3()
     addWindowListener(new WindowAdapter()
    {     public void windowClosing(WindowEvent ev)
          {     dispose();
               System.exit(0);}});
     for (int j=0; j < 70; j++)     v.add(""+j*1000+"a  d"+j);
       setBounds(1,1,400,310);
     getContentPane().add(js);
     js.setPreferredSize(new Dimension(230,259));
     jc.setSelectedIndex(1);
     jc.setCellRenderer(new MyCellRenderer());
     getContentPane().setLayout(new FlowLayout());
     setVisible(true);
public class MyCellRenderer extends JLabel implements ListCellRenderer
     String  txt;
     int     idx;
     boolean sel;
public Component getListCellRendererComponent(JList list,
                         Object  value,           // value to display
                         int     index,           // cell index
                         boolean isSelected,      // is the cell selected
                         boolean cellHasFocus)    // the list and the cell have the focus
     idx = index;
     txt = value.toString();
     sel = isSelected;
     setText(txt);
     return(this);
public void paintComponent(Graphics g)
     if (idx%2 == 1) g.setColor(Color.white);
          else        g.setColor(Color.lightGray);
     if (sel)        g.setColor(Color.blue);
     g.fillRect(0,0,getWidth(),getHeight());
     StringTokenizer st = new StringTokenizer(txt.trim()," ");
     g.setColor(Color.black);
     if (st.hasMoreTokens())     g.drawString(st.nextToken(),1,14);
     g.setColor(Color.red);
     g.drawString("===>",70,14);
     g.setColor(Color.black);
     if (st.hasMoreTokens())     g.drawString(st.nextToken(),110,14);
public static void main (String[] args) 
     new Jlist3();
Noah
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.util.*;
public class Jlist3 extends JFrame
     Vector v = new Vector();
     JList jc = new JList(v);
     JScrollPane js = new JScrollPane(jc);
public Jlist3()
     addWindowListener(new WindowAdapter()
{     public void windowClosing(WindowEvent ev)
          {     dispose();
               System.exit(0);}});
     for (int j=0; j < 70; j++)     v.add(""+j*1000+"a d"+j);
     setBounds(1,1,400,310);
     getContentPane().add(js);
     js.setPreferredSize(new Dimension(230,259));
     jc.setSelectedIndex(1);
     jc.setCellRenderer(new MyCellRenderer());
     getContentPane().setLayout(new FlowLayout());
     setVisible(true);
public class MyCellRenderer extends JLabel implements ListCellRenderer
     String txt;
     int idx;
     boolean sel;
public Component getListCellRendererComponent(JList list,
                         Object value, // value to display
                         int index, // cell index
                         boolean isSelected, // is the cell selected
                         boolean cellHasFocus) // the list and the cell have the focus
     idx = index;
     txt = value.toString();
     sel = isSelected;
     setText(txt);
     return(this);
public void paintComponent(Graphics g)
     if (idx%2 == 1) g.setColor(Color.white);
          else g.setColor(Color.lightGray);
     if (sel) g.setColor(Color.blue);
     g.fillRect(0,0,getWidth(),getHeight());
     StringTokenizer st = new StringTokenizer(txt.trim()," ");
     g.setColor(Color.black);
     if (st.hasMoreTokens())     g.drawString(st.nextToken(),1,14);
     g.setColor(Color.red);
     g.drawString("===>",70,14);
     g.setColor(Color.black);
     if (st.hasMoreTokens())     g.drawString(st.nextToken(),110,14);
public static void main (String[] args)
     new Jlist3();
}

Similar Messages

  • Problem with Season Passes and lack of customer service.

    I haven't received emails from Apple stating that episodes were available to download for 2 shows that I subscribe to. I have emailed them and received the usual, customary and "automated" response. I received a free video credit to manually purchase one of the episode's that had not downloaded automatically. After using the credit for another show, I was unable to purchase videos for a few minutes due to error messages and other issues. After logging off and logging back into my account, I was able to purchase videos again.
    In Manage Passes under Current Passes, I have multiple shows that show "## episodes awaiting download". I have the same the same message under Completed Passes. I have successfully downloaded the majority of these episodes.
    Has anyone experienced these same problems? If so, how long did it take to get the problem resolved? Were attorneys involved?
      Mac OS X (10.4.8)  

    Hi rmpagejr3,
    I'm so sorry you've had to spend so much time and effort on your price match request; it is certainly not intended to be such a chore for our customers. I was glad to see that Heidi from our Facebook team reached out to you last week. Please let her know if you require any further assistance.
    Regards,
    Elizabeth|Social Media Supervisor|Best Buy® Corporate
     Private Message

  • E-Recruiting: Problems with search profile and serach templates

    Hi Recruiting-Experts,
    I´m facing problems with "Search Profiles" and "Search Templates"
    (Customizing SPRO --> SAP-E-Recruiting --> Recruitment --> Talent Warehouse --> Candidate --> Candidate Search )
    Out customers wants me to add a new search criterion to the talent search. It's a customer-field (type 'd' --> Date)  belonging to infotype 5106.
    Unfortunately, it doesn't work. The hit list is always empty.
    What I did:
    Customizing (see above)
    Updated search profile (report RCF_RECREATE_SEARCH_PROFILES)
    The result:
    I can see and choose the new search criterion on talent warehouse search site (recruiters startpage)
    I can find the data (internal format yyyymmdd) via transaction SKPR07 (see XML below, ZZEARLIEST_ENTRY 20090901)
    By the way, the hit list is also empty when adding and searching for birthdate.
    Has it got to do with the date stored in internal format?
    Thanks for any comments / help.
    Regards
    CHRIS
    =========================================================================

    Hi Sebastian,
    thanks for your quick answer.
    That's why I didn't get it done for hours yesterday.
    Thanks again,
    Regards
    CHRIS

  • I think pesimo customer service three days, I'm looking for someone I can ayudr activation problem with my CC and can not find anyone who can help me.

    I think pesimo customer service three days, I'm looking for someone I can ayudr activation problem with my CC and can not find anyone who can help me.

    Online Chat Now button near the bottom for Activation and Deactivation problems may help
    http://helpx.adobe.com/x-productkb/policy-pricing/activation-deactivation-products.html

  • Problem with focus on applet  - jvm1.6

    Hi,
    I have a problem with focus on applet in html page with tag object using jvm 1.6.
    focus on applet work fine when moving with tab in a IEbrowser page with applet executed with jvm 1.5_10 or sup, but the same don't work with jvm1.6 or jvm 1.5 with plugin1.6.
    with jvm 1.5 it's possible to move focus on elements of IEbrowser page and enter and exit to applet.
    i execut the same applet with the same jvm, but after installation of plugin 1.6, when applet gain focus don't release it.
    instead if i execute the same applet with jvm 1.6, applet can't gain focus and manage keyevent, all keyevent are intercepted from browser page.
    (you can find an example on: http://www.vista.it/ita_vista_0311_video_streaming_accessibile_demo.php)
    Any idea?
    Thanks

    Hi piotrek1130sw,
    From what you have described, I think the best approach would be to restore the original IDT driver, restart the computer, test that driver, then install the driver update, and test the outcome of installing the newest driver.
    Use the following link for instructions to recovery the ITD driver using Recovery Manager. Restoring applications and drivers.
    Once the driver is restored, restart the computer and test the audio. If the audio is good you can continue to use this driver, or you can reinstall the update and see what happens. IDT High-Definition (HD) Audio Driver.
    If installing the newest driver causes the issue to occur but the recovered driver worked, I suggest recovering again.
    If neither driver works I will gladly follow up and provide any assistance I can.
    Please let me know the outcome.
    Please click the Thumbs up icon below to thank me for responding.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Sunshyn2005 - I work on behalf of HP

  • Problems with HP printer and PSE 11 (was bill v)

    When using my HP 7020e photosmart printer and Adobe photoshop elements 11, I get a very small white border on the prints. I have set for borderless printing. Adobe says the print size is 4.2 x 6.18 instead of 4 x 6. Any suggestions?

    I had already set it to borderless but it still prints a very small white 
    border. HP had no solution. I am ready to send the printer back to them.
    In a message dated 1/14/2014 5:47:22 A.M. Eastern Standard Time, 
    [email protected] writes:
    Re:  Problems with HP printer and PSE 11 (was bill v)
    created by hyadav (http://forums.adobe.com/people/hyadav)  in Photoshop 
    Elements - View the full  discussion
    (http://forums.adobe.com/message/6010537#6010537)

  • Problem with Nokia Camera and Smart Sequence

    Hi,
    I'm having a problem with Nokia Camera and the Smart Sequence mode.
    Basically, if you take a picture using nokia camera, and view it in your camera roll, it usually says, underneath the pic "open in nokia camera".
    Well, if I take a pic using the Smart Sequence mode, it just doesn't say "open in nokia camera" so, to use the functions of smart sequence (best shot, motion focus, etc), I have to open nokia camera, go to settings and tap the "Find photos and videos shot with nokia camera" option.
    Does anyone has the same problem? Anybody solved it?
    I already tried reinstalling nokia camera, but that didn't help.
    I'm running Nokia Black on my 925.
    Thanks everyone!

    Hi,
    I had the same problem with my 1020. It did get fixed with the last update to Nokia camera.
    However, IIRC, it didn't just happen right away. When browsing the camera roll I'm pretty sure that the "open with Nokia camera" text wasn't there.
    Slightly disappointed I opened the (Nokia) camera anyway and was going to test the smart sequence again. I noticed the only precious pic I'd taken using this actually appeared top left of the screen.
    I opened it and I had all the smart sequence editing options again - that we're missing previous. Made a new picture and saved it.
    Now when in camera roll the text shows below the image and all is good.
    This probably doesn't help much except that it didn't seem to fix automatically.
    I work @Nokia so I can ask around a bit to see if this is a known / common issue (not that I know any developers)

  • I bought my iphone unlocked from carephone warehouse, I had a problem with the phone and apple swapped it over but they locked it to tmobile!!! what can i do?? I have changed contracts and can not use my phone!

    I bought my iphone from carephone warehouse, sim free and with no contract. 5 months down the line I had a problem with the phone and I booked a genius appointment, they swapped my phone and gave me a new phone but they locked my phone to tmobile!!! I now do not use tmobile and I have an iphone which is locked to tmobile!!! I bought an unlocked phone and apple have locked it!!! what can i do?

    In response to this, Carphone Warehouse (and Phones4U) sell what is commonly referred to as "sim free" handsets - these are not the same as unlocked. Sim free handsets will automatically lock to the first network sim card that the phone is activated with, and that will be permanently. The only way to unlock the handset would be to go through the network (T-Mobile I understand) and request they unlock it for you. More than likely, there will be a charge as you are no longer a T-Mobile customer.
    If you ever want to purchase a new unlocked iPhone, the only place you can buy one is from Apple directly. Any other place will most likely sell sim free handsets.

  • Hello I have a problem with security questions and i cant reset to my email  The error was   Exceeded Maximum Attempts  We apologize, but we were unable to verify your account information with the answers you provided to our security questions. You have

    Hello
    I have a problem with security questions and i cant reset to my email
    The error was
    Exceeded Maximum Attempts
    We apologize, but we were unable to verify your account information with the answers you provided to our security questions.
    You have made too many attempts to answer these questions. So, for security reasons, you will not be able to reset password for the next eight hours.
    Click here      for assistance.
    i waited more than eight hours. and back to my account but it is the same ( no change ) i cant find forgot your answers
    http://www.traidnt.net/vb/attachment...134863-333.jpg
    can you help me please

    Alternatives for Help Resetting Security Questions and Rescue Mail
         1. Apple ID- All about Apple ID security questions.
         2. Rescue email address and how to reset Apple ID security questions
         3. Apple ID- Contacting Apple for help with Apple ID account security.
         4. Fill out and submit this form. Select the topic, Account Security.
         5.  Call Apple Customer Service: Contacting Apple for support in your
              country and ask to speak to Account Security.
    How to Manage your Apple ID: Manage My Apple ID

  • Browser compatibility problem with t:selectOneMenu and JavaScript calendar

    I'm having problem with <t:selectOneMenu> and JavaScript calendar on IE. It works fine on Firefox but doesn't work on IE.
    The JSF code is as follows:
    <tr>
                                       <td align="right">
                                            Archive Date
                                       </td>
                                       <td align="left" colspan="3">
                                       <table cellpadding="0" cellspacing="0" border="0">
                                       <tr>
                                       <td>
                                       <span class="tuny_text">After&#160;(Ex. Oct 18, 2007)</span>
                                            <h:outputLabel for="txtArchiveDateAfter" value="Archive Date After" rendered="false"/>
                                            <br/>
                                            <t:inputText required="false" value="#{nonItemImageSearchPage.stringArchiveDateAfter}" name="txtArchiveDateAfter" id="txtArchiveDateAfter" forceId="true"  styleClass="inp" style="width: 128px">
                                       </t:inputText>
                                            <t:graphicImage value="/images/calendar.png" id="dtpArchiveDateAfter" name="dtpArchiveDateAfter" forceId="true" style="border: 2px solid #EEE; cursor: pointer"></t:graphicImage>
                                            <br/>
                                            <t:message for="txtArchiveDateAfter" styleClass="form_error" replaceIdWithLabel="true"></t:message>
                                       </td>
                                       <td>
                                       <span class="tuny_text">Before&#160;(Ex. Oct 18, 2007)</span>
                                            <h:outputLabel for="txtArchiveDateBefore" value="Archive Date Before" rendered="false"/>
                                            <br/>
                                            <t:inputText value="#{nonItemImageSearchPage.stringArchiveDateBefore}" name="txtArchiveDateBefore" id="txtArchiveDateBefore" forceId="true" style="width:128px" styleClass="inp">
                                       </t:inputText>
                                            <t:graphicImage value="/images/calendar.png" id="dtpArchiveDateBefore" name="dtpArchiveDateBefore" forceId="true" style="border: 2px solid #EEE; cursor: pointer"></t:graphicImage>
                                            <br/>
                                            <t:message for="txtArchiveDateBefore" styleClass="form_error" replaceIdWithLabel="true"></t:message>
                                       </td>
                                       </tr>
                                       </table>
                                       </td>
                                  </tr>
                                  <tr>
                                       <td align="right" >
                                            <h:outputLabel for="drpBackground" value="Background"/>
                                       </td>
                                       <td align="left" class="right_separator">
                                            <t:selectOneMenu id="drpBackground" forceId="true" value="#{nonItemImageSearchPage.nonItemImageSearchModel.backgroundId}" styleClass="inp" style="width: 150px">
                                            <f:selectItem itemLabel="--------" itemValue="-1"/>
                                            <s:selectItems value="#{nonItemImageSearchPage.backgroundPrefsList}"
                                                      var="backgroundPrefs" itemValue="#{backgroundPrefs.id}" itemLabel="#{backgroundPrefs.description}" />
                                            </t:selectOneMenu>
                                       </td>
                                       <td  align="right" class="left_separator">
                                            <h:outputLabel for="drpTheme" value="Theme"/>
                                       </td>
                                       <td align="left" >
                                            <t:selectOneMenu id="drpTheme" forceId="true" value="#{nonItemImageSearchPage.nonItemImageSearchModel.themeId}" styleClass="inp WCHhider" style="width:150px;">
                                            <f:selectItem itemLabel="--------" itemValue="-1"/>
                                                 <s:selectItems value="#{nonItemImageSearchPage.themePrefsList}"
                                                      var="themePrefs" itemValue="#{themePrefs.id}" itemLabel="#{themePrefs.description}" />
                                            </t:selectOneMenu>
                                       </td>
                                  </tr>
                                  <tr>
                                       <td align="right" >
                                            <h:outputLabel for="drpSeason" value="Season"/>
                                       </td>
                                       <td align="left" class="right_separator">
                                            <t:selectOneMenu id="drpSeason" forceId="true" value="#{nonItemImageSearchPage.nonItemImageSearchModel.seasonId}" styleClass="inp" style="width:150px">
                                            <f:selectItem itemLabel="--------" itemValue="-1"/>
                                                 <s:selectItems value="#{nonItemImageSearchPage.seasonPrefsList}"
                                                      var="seasonPrefs" itemValue="#{seasonPrefs.id}" itemLabel="#{seasonPrefs.description}" />
                                            </t:selectOneMenu>
                                       </td>
                                       <td align="right" class="left_separator">
                                            <h:outputLabel for="drpClothing" value="Clothing"/>
                                       </td>
                                       <td align="left"  >
                                            <t:selectOneMenu id="drpClothing" forceId="true" value="#{nonItemImageSearchPage.nonItemImageSearchModel.clothingId}" styleClass="inp" style="width:150px">
                                            <f:selectItem itemLabel="--------" itemValue="-1"/>
                                                 <s:selectItems value="#{nonItemImageSearchPage.clothingPrefsList}"
                                                      var="clothingPrefs" itemValue="#{clothingPrefs.id}" itemLabel="#{clothingPrefs.description}" />
                                            </t:selectOneMenu>
                                       </td>
                                  </tr>
                                  <tr>
                                       <td align="right" >
                                            <h:outputLabel for="drpToy" value="Toy"/>
                                       </td>
                                       <td align="left" class="right_separator">
                                            <t:selectOneMenu id="drpToy" forceId="true" value="#{nonItemImageSearchPage.nonItemImageSearchModel.toyId}" styleClass="inp" style="width:150px">
                                            <f:selectItem itemLabel="--------" itemValue="-1"/>
                                                 <s:selectItems value="#{nonItemImageSearchPage.toyPrefsList}"
                                                      var="toyPrefs" itemValue="#{toyPrefs.id}" itemLabel="#{toyPrefs.description}" />
                                            </t:selectOneMenu>
                                       </td>
                                       <td align="right" class="left_separator">
                                            <h:outputLabel for="drpJuvenile" value="Juvenile"/>
                                       </td>
                                       <td align="left" >
                                            <t:selectOneMenu id="drpJuvenile" forceId="true" value="#{nonItemImageSearchPage.nonItemImageSearchModel.juvenileId}" styleClass="inp" style="width:150px">
                                            <f:selectItem itemLabel="--------" itemValue="-1"/>
                                                 <s:selectItems value="#{nonItemImageSearchPage.juvenilePrefsList}"
                                                      var="juvenilePrefs" itemValue="#{juvenilePrefs.id}" itemLabel="#{juvenilePrefs.description}" />
                                            </t:selectOneMenu>
                                       </td>
                                  </tr>
                                  <tr>
                                       <td align="right">
                                            <h:outputLabel for="drpGroup" value="Grouping"/>
                                       </td>
                                       <td align="left"  class="right_separator">
                                            <t:selectOneMenu id="drpGroup" forceId="true" value="#{nonItemImageSearchPage.nonItemImageSearchModel.modelGroupingId}" styleClass="inp" style="width:150px;">
                                            <f:selectItem itemLabel="--------" itemValue="-1"/>
                                                 <s:selectItems value="#{nonItemImageSearchPage.groupPrefsList}"
                                                      var="groupPrefs" itemValue="#{groupPrefs.id}" itemLabel="#{groupPrefs.description}" />
                                            </t:selectOneMenu>
                                       </td>
                                       <td class="left_separator">&#160;</td>
                                       <td>&#160;</td>
                                  </tr>
    The JavaScript code is as follows:
    <script type="text/javascript" language="javascript">
         var dtpArchiveDateBefore = new MooCal("txtArchiveDateBefore");
         var dtpArchiveDateAfter = new MooCal("txtArchiveDateAfter");
         window.addEvent("domready", function(){
           $("dtpArchiveDateBefore").addEvent("click", function(e){
                    var event = new Event(e).stop();
                      var x = (event.client.x)-150;
                      var y = event.client.y;
                      dtpArchiveDateBefore.show(x,y);  // Display the calendar at the position of the mouse cursor
                      dtpArchiveDateBefore.minYear = 1800;
                        dtpArchiveDateBefore.maxYear = 2017;
         /*$("txtArchiveDateBefore").addEvent("click", function(e){
                 e.target.blur();
                    var event = new Event(e).stop();
                      var x = (event.client.x)-150;
                      var y = event.client.y;
                      dtpArchiveDateBefore.show(x,y);  // Display the calendar at the position of the mouse cursor
                      dtpArchiveDateBefore.minYear = 1800;
                        dtpArchiveDateBefore.maxYear = 2017;
        $("dtpArchiveDateAfter").addEvent("click", function(e){
                    var event = new Event(e).stop();
                      var x = (event.client.x)-150;
                      var y = event.client.y;
                      dtpArchiveDateAfter.show(x,y);  // Display the calendar at the position of the mouse cursor
                      dtpArchiveDateAfter.minYear = 1800;
                        dtpArchiveDateAfter.maxYear = 2017;
       /* $("txtArchiveDateAfter").addEvent("click", function(e){
                 e.target.blur();
                    var event = new Event(e).stop();
                      var x = (event.client.x)-150;
                      var y = event.client.y;
                      dtpArchiveDateAfter.show(x,y);  // Display the calendar at the position of the mouse cursor
                      dtpArchiveDateAfter.minYear = 1800;
                        dtpArchiveDateAfter.maxYear = 2017;
         </script>When the calendar is above t:selectOneMenu, it doesn't show up on t:selectOneMenu area. Could anyone help me solve the issue?
    Thanks
    Rashed

    There are dozens of CSS attributes that can (and have to) be handwritten. Trouble with them is that, like text shadows, they don't appear in all browsers. I have nine different browsers installed and test pages in ALL of them before I "finish" building site or page for a template.
    I try to build for Firefox, out of personal preference for it, but I have to do things that work with IE because it still holds the market share (46%IE to 42%FF), and I will only go with designs that work in IE, FF, NS, Opera, Safari, and Chrome.
    As to your questions.
    1. The compatibility check is most likely current with the time of the build. I don't know if that component updates as browsers do, but I'd tend to think it doesn't. I'm using CS4  and there haven't been any updates for it in nearly a year. Firefox has released 4.0, Opera released 11, and Safari released 5 since then. The updater would have found and downloaded something if it was available.
    2. I could only guess. Text shadows DON'T show up in design view (or in IE) but they do in browser preview. It's just a UI quirk, and it means "trial and error" is the onyl way to get what you want.
    3. The quick-selects which are in DW dropdowns or popouts are the ones most  common to CSS designs and have been proven to work with all browsers at the time of release of your particular build of DW.
    Hope that helps..

  • Problems with ListViews Drag and Drop

    I'm surprised that there isn't an Active X control that can do this more
    easily? Would
    be curious to find out if there is - although we aren't really embracing the
    use of
    them within Forte because it locks you into the Microsoft arena.
    ---------------------- Forwarded by Peggy Lynn Adrian/AM/LLY on 02/03/98 01:33
    PM ---------------------------
    "Stokesbary, Michael" <[email protected]> on 02/03/98 12:19:52 PM
    Please respond to "Stokesbary, Michael" <[email protected]>
    To: "'[email protected]'" <[email protected]>
    cc:
    Subject: Problems with ListViews Drag and Drop
    I am just curious as to other people's experiences with the ListView
    widget when elements in it are set to be draggable. In particular, I am
    currently trying to design an interface that looks a lot like Windows
    Explorer where a TreeView resides on the left side of the window and a
    ListView resides on the right side. Upon double clicking on the
    ListView, if the current node that was clicked on was a folder, then the
    TreeView expands this folder and the contents are then displayed in the
    ListView, otherwise, it was a file and it is brought up in Microsoft
    Word. All this works great if I don't have the elements in the ListView
    widget set to be draggable. If they are set to be draggable, then I am
    finding that the DoubleClick event seems to get registered twice along
    with the ObjectDrop event. This is not good because if I double click
    and the current node is a folder, then it will expand this folder in the
    TreeView, display the contents in the ListView, grab the node that is
    now displayed where that node used to be displayed and run the events
    for that as well. What this means, is that if this is a file, then Word
    is just launched and no big deal. Unfortunately, if this happens to be
    another directory, then the previous directory is dropped into this
    current directory and a recursive copy gets performed, giving me one
    heck of a deep directory tree for that folder.
    Has anybody else seen this, or am I the only lucky one to experience.
    If need be, I do have this exported in a .pex file if anybody needs to
    look at it more closely.
    Thanks in advance.
    Michael Stokesbary
    Software Engineer
    GTE Government Systems Corporation
    tel: (650) 966-2975
    e-mail: [email protected]

    here is the required code....
    private static class TreeDragGestureListener implements DragGestureListener {
         public void dragGestureRecognized(DragGestureEvent dragGestureEvent) {
         // Can only drag leafs
         JTree tree = (JTree) dragGestureEvent.getComponent();
         TreePath path = tree.getSelectionPath();
         if (path == null) {
              // Nothing selected, nothing to drag
              System.out.println("Nothing selected - beep");
              tree.getToolkit().beep();
         } else {
              DefaultMutableTreeNode selection = (DefaultMutableTreeNode) path
                   .getLastPathComponent();
              if (selection.isLeaf()) {
              TransferableTreeNode node = new TransferableTreeNode(
                   selection);
              dragGestureEvent.startDrag(DragSource.DefaultCopyDrop,
                   node, new MyDragSourceListener());
              } else {
              System.out.println("Not a leaf - beep");
              tree.getToolkit().beep();
    }

  • Problems with dropped calls and no reception on Samsung Continuum

    My mother and I both purchased a Samsung Continuum in late March 2011, and have experienced the same problems with the phone.  The device drops at least 2-3 calls per day, often on the same conversation; we have not found that location or time of day makes a difference.  The phone freezes up frequently, even if no apps are running in the background.  We lose our 3G network reception frequently, and cannot access our texts, emails, or the internet.  The screen saver kicks in even when we are actively dialing a number, or typing in a text message.  The overall performance of the phone is also poor, and it is quite slow much of the time.
    We have raised this issue several times with a representative at one of the Verizon stores, but he states that he can find no problem with the phone, and that these issues may not be covered under our insurance plan.  None of my friends with non-Samsung phones are having the same problems with phone reception and performance.  I am aggravated enough with these issues that I am considering reactivating my old Blackberry, which worked like a charm.
    I am not upset that my phone has not been updated to Android 2.2.  I just want the phone to perform as stated, and not fail at its primary function:  making and receiving phone calls.  I am not certain if these problems originate with the phone, Verizon, or Samsung, nor do I care.  I just want to resolve these issues as soon as possible, or I will have to look at other alternatives.
    Thank you.

    If this doesn't work...now what??? I have a useless $400 plus piece of unreliable junk. My Motorola Razor was ions more reliable than this phone...very, very sad but true.
    What carrier were you using with the Razor? AT&T? Same area?
    Dave M.
    MacOSG Founder/Ambassador  An Apple User Group  iTunes: MacOSG Podcast
    Creator of 'Mac611 - Mobile Mac Support' (designed exclusively for an iPhone/iPod touch)

  • Problems with Mail, Safari and iTunes after updating to 10.5.6

    Hi all,
    after installing 10.5.6 I have problems with Mail, Safari and iTunes.
    The time to open mails, websides and iTunes store is increasing dramatically since the update. If I open a webside parallel with Safari and Firefox, Safari needs minimum 15 times longer to open the complete side. Mails containing HTML-code also needs a long time to be opened. Tha same Problem with iTunes store. Connecting to the Store costs at least 30 - 40 seconds. And unfortunately for every iTunes store side I open. Its terrible
    Any idea or workaroung to solve that problem?
    Regards
    Michael

    First, run Disk Utility and repair permissions and then restart.
    I installed the 10.5.6 Combo update. Sometimes things get "lost in the translation" when you use Software Update depending on your installation. Perhaps you can download 10.5.6 Combo from the website and install it from your desktop.

  • Problems with the richTextEditor and quotes

    Hello
    I'm having problems with quote chars and the richText
    control's htmlText. When users enter quotes into the richTextEditor
    control. The quotes breaks the HTML text, meaning it's no longer
    well formatted. Is there an escape char that I need to use. Or do I
    need to force some kind of refresh on the control prior to using
    the htmlText string?

    I have been using RTE in a content management system and
    found a need to replace non-standard quote characters with proper
    UTF-8 character counterparts. Curly quotes in particular are
    problematic. Use a replace function to substitute non-standard for
    standard characters.

  • Problems with .ARW files and auto toning

    problems with .ARW files and auto toning
    let me try to explain this because this has happened in past and never found a way to resolve but i lived with it
    now that I have a Sony A7R the problem is more serious
    Firstly i take pride it making the picture happen all in camera, i use DRO lvl 5 to get enough light, like when i'm shooting at dusk. DRO its like doing HDR but in a single file, it lightens the darks. in my camera i'm happy with results
    but when I upload them to lightroom, they come out near black.
    allow me to explain
    lets say I import 100 images
    i double check my preferences and everything is UNCHECKED when it comes to importing options, there is no auto toning, nothing.
    as the images import i see a preview in the thumbnail which looks fine.
    i double click on one to enlarge it, hence leave grid view.
    for a brief 1 or 2 seconds, i see the full image in all its glory but than lightroom does something funny, it darkens the image
    one by one as it inspects each image, if it was a DRO image it makes it too dark.
    to make this clear, the image is perfect as it was in the beginning but after a few seconds lightroom for some reason thinks it needs to correct it.
    how to prevent lightroom from doing this, i want the image exactly as it is, why must lightroom apply a correction>?
    i think it has to do something with interpreting the raw file and lightroom applies its own algorithm.
    but here is what i dont get.....before lightroom makes the change i'm able to witness the picture exactly as it was taken and want it unchanged..
    now i have to tweak each file or find a profile for it which is added work.
    any ideas how to prevent lightroom from ruining my images and just leave them as they were when first detected...
    there are 2 phases...one is when it originally imports and they look fine
    second is scanning each image and applying some kind of toning which darkens it too much.
    thanks for the help

    sorry thats the auto reply message from yahoo email.
    i've disabled it now
    thing is, there is no DRO jpg to download from the camera
    its only ARW. so my understanding is when i use DRO setting, the camera makes changes to the ARW than lightroom somehow reads this from the ARW.
    but then sadly reverts it to no DRO settings.
    because i notice if i take normal picture in raw mode its dark but if i apply dro to it, it comes out brighter, yet when i d/l the image from camera to lightroom, which is an ARW - there are no jpgs. lightroom decides to mess it up
    so in reality there is no point in using DRO because when i upload it lightroom removes it.
    is there a way to tell lightroom to preserve the jpg preview as it first sees it.
    its just lame, picture appears perfect...than lightroom does something, than bam, its ruined,.
    what do i need to do to prevent lightroom from ruining the image? if it was good in the first place.

Maybe you are looking for