Setting colors for item labels in JFreeChart (WaferMapRenderer)

Hi,
first of all, sorry for posting a JFreeChart related posting on this forum, but I didn't get a solution right now (I even didn't find anything useful on the JFreeChart website/forum). Here's my question...
I'm trying to set the color for item labels in the legend but with no success.
Here's a code example:
final JFreeChart chart = ChartFactory.createWaferMapChart(
    "Wafer Map Demo",         // title
    dataset,                  // wafermapdataset
    PlotOrientation.VERTICAL, // vertical = notchdown
    true,                     // legend          
    true,                    // tooltips
    false
WaferMapPlot plot = (WaferMapPlot) chart.getPlot();
WaferMapRenderer renderer = new WaferMapRenderer();
renderer.setSeriesItemLabelPaint(0, Color.red);
renderer.setSeriesItemLabelPaint(1, Color.blue);
plot.setRenderer(renderer);The default behavior of the WaferMapRenderer is also strange because the item label as well as the item marker is painted black so you cannot distinguish different fields of the wafer map. Is this a bug or am I doing something wrong (or missing somehting)?
Any help would be greatly appreciated.
Thanks and best regards,
- Stephan

Your folder action script doesn't work because of one simple error:
set label index of every item of entire contents of processFolder to 7
Nowhere in your script is 'processFolder' defined, so AppleScript has no idea what you're trying to do.
Given that you (correctly) iterate through added_items, the correct format would be:
on adding folder items to this_folder after receiving added_items
  repeat with item_ in added_items
    tell application "Finder"
      set label index of item_ to 7
    end tell
  end repeat
end adding folder items to
In other words, this changes the label index of each item just added.
That should work provided you're dropping files into this folder. If you're dropping folders then this would set the label index of the folder itself, but not necessarily the items within that folder. For that you'd need to add a check to see if item_ was a folder and add code to handle folders.
Also note that this kind of folder action will only work on the folder itself - that is, if you have folder A that contains subfolder B, then dropping a file into subfolder B won't trigger the script and won't change that item's label. To do that you'd have to attach your folder action to subfolder B.

Similar Messages

  • To set color for barchart having datetime column

    Hi,
       I have a datetime column in the XSD,
    I was trying to set colors for the barchart through,  chart expert --> colorhighlight  ,here in  colorhighlight when i click on new I am getting a dialogue box asking to enter datetime in M:D:YYYY H:MM:SS TT format. why is this dialogue displayed ? How to overcome this.
    Regards,
    Deepa V

    Hi Deepa
    Please inform us with the following information:
    1: What is the version of Crysatl Reports that you are using?
    2: What is the Chart Type that you are uisng?
    3: Where are you placing this chart in the report?
    Regards
    Ashwini Yadav

  • Problem with setting tooltips for items of a JCombobox

    hi guys,
    I want to set tooltips for items of JComboBox & the code that i have written is given below , but the tooltip text is set for all the items of Nonitindustrycombo but the tooltips remain the same even for Nonitdesgcombo's items.
    Is that we need to refresh the ComboboxRenderer every time ?
    I am not able to trace out the exact reason for this,please if anyone can suggest me something regarding this would be of great use to me.
    class Searchpanel extends JPanel {
    String[] str = null;
    public SearchPanel(){
    Nonitindustrycombo.addItem("--Select--");
    ArrayList NonITindus = ERPModel.getAllNonitIndustry(); //gets all the items(strings) for Nonitindustrycombo
    for (Iterator iter = NonITindus.iterator(); iter.hasNext();) {
    String str = iter.next().toString();
    Nonitindustrycombo.addItem(str);
    SetTooltip(Nonitindustrycombo,NonITindus);
    Nonitdesgcombo.addItem("--Select---");
    ArrayList desg = ERPModel.getAllNonitDesg(); //gets all the items(strings) for Nonitdesgcombo
    for (Iterator iter = desg.iterator(); iter.hasNext();) {
    Nonitdesgcombo.addItem(iter.next());
    SetTooltip(Nonitdesgcombo,desg);
    class MyComboBoxRenderer extends BasicComboBoxRenderer
    public Component getListCellRendererComponent(JList list, Object value,
    int index, boolean isSelected,
    boolean cellHasFocus)
    if (isSelected)
    setBackground(list.getSelectionBackground());
    setForeground(list.getSelectionForeground());
    if (0 < (index))
    list.setToolTipText(str[index - 1]);
    else
    setBackground(list.getBackground());
    setForeground(list.getForeground());
    setFont(list.getFont());
    setText((value == null) ? "" : value.toString());
    return this;
    private void SetTooltip(JComboBox combo,ArrayList arr){
    str = (String []) arr.toArray (new String [arr.size ()]);
    combo.setRenderer(new MyComboBoxRenderer());
    public static void main(String[] args){
    new SearchPanel();
    Thanks ,
    vishal

    1) You where given a working example in your last posting on this topic. Compare your code with the working code to see whats different and fix it.
    2) The code you posted doesn't compile.
    3) You didn't use the "Code Formatting Tags" when you posted your code so it not readable.

  • How to set color for a tabstrip in BSP

    Hello all,
    Can anyone please let me know how to set color for a tabstripn in BSP?
    I am using the below syntax but it still gives me the default color.
    <htmlb:content design="design2003" >
      <htmlb:page title="test " >
        <htmlb:form>
    <htmlb:tabStrip id         = "TabStrip"
                          bodyHeight = "200"
                          bodyColor  = "red"
                          width      = "700" >
    </htmlb:tabStrip>
    </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    Thanks,
    Sandeep

    Hi...
    The below code is working fine for me...
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page title="stg " >
        <htmlb:form>
          <htmlb:tabStrip width      = "430"
                          bodyColor  = "rgb(88,5,64)"
                          id         = "t1"
                          bodyHeight = "112" >
            <htmlb:tabStripItem id      = "t1"
                                index   = "1"
                                title   = "Sales"
                                tooltip = "My Tooltip for Tab 1" >
              <htmlb:textView text="Tab N 1" />
              <htmlb:tree id        = "treeReports"
                          showTitle = "true"
                          table2    = "<%= mt_nodes %>"
                          title     = "Menu"
                          width     = "100%" />
            </htmlb:tabStripItem>
            <htmlb:tabStripItem id      = "t2"
                                index   = "2"
                                title   = "Production"
                                tooltip = "My Tooltip for Tab 2" >
              <htmlb:textView text="Tab N 2" />
            </htmlb:tabStripItem>
          </htmlb:tabStrip>
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>

  • Setting Color for Records in forms6i

    Dear All
    How can I set color for particular records on a form. i.e. Set the color of all employees whose salary is greater than 2000 to Red and All the rest to Green
    Solomon

    Hello,
    6i is an old version and I don't remember if there is a Set_Item_Instance_Property() built-in. If yes, you can use it with a Visual Attribute that held the colors.
    Francois

  • How set color for a ValidationTextField's hint?

    I want to set color for a ValidationTextField's hint, to
    implement watermark effect, how do it?

    Hi...
    The below code is working fine for me...
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page title="stg " >
        <htmlb:form>
          <htmlb:tabStrip width      = "430"
                          bodyColor  = "rgb(88,5,64)"
                          id         = "t1"
                          bodyHeight = "112" >
            <htmlb:tabStripItem id      = "t1"
                                index   = "1"
                                title   = "Sales"
                                tooltip = "My Tooltip for Tab 1" >
              <htmlb:textView text="Tab N 1" />
              <htmlb:tree id        = "treeReports"
                          showTitle = "true"
                          table2    = "<%= mt_nodes %>"
                          title     = "Menu"
                          width     = "100%" />
            </htmlb:tabStripItem>
            <htmlb:tabStripItem id      = "t2"
                                index   = "2"
                                title   = "Production"
                                tooltip = "My Tooltip for Tab 2" >
              <htmlb:textView text="Tab N 2" />
            </htmlb:tabStripItem>
          </htmlb:tabStrip>
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>

  • How to set different color for items in selectManyCheckbox

    hi,
    I would like to change item text background color for each item on selectManyCheckbox (different for each item).
    It is only 5 items so that could be static reference or select.
    I know only how to change background for all items
    af|selectManyCheckbox::item-text {
        background:orange;
    How to select concrete item text and change color for only them?
    I found similar problem:
    css - Set background color of every individual checkbox of p:selectManyCheckbox - Stack Overflow
    but this dont work for me because I dont have in adf tr structure
    I need somethink like this:
    af|selectManyCheckbox::item-text XXXX - select here one of the item by number on list or id  {
        background:orange;

    hi,
    thanks Alejandro and Federico for answers.
    I use JDev 11.1.1.6. I dont write it in previously post because I think that is a more css then adf problem.
    I have 5 selectItem based on simple List<String> {"text1", "text2", "text3", "text4". "text5"}:
    <af:selectManyCheckbox label="List" id="smc2"
                                               layout="horizontal"
                                               value="#{bean.listInBean}"
                                               autoSubmit="true">
                          <af:selectItem label="text1" value="text1" id="si47"/>
                          <af:selectItem label="text2" value="text2" id="si43"/>
                          <af:selectItem label="text3" value="text3" id="si46"/>
                          <af:selectItem label="text4" value="text4" id="si45"/>
                          <af:selectItem label="text5" value="text5" id="si44"/>
                        </af:selectManyCheckbox>
    and I would like to color first selectItem text to orange, second to red.. etc, The list is a static list. Not would be changed.
    After Alejandro answer I build simple for each element (anyCollection contains item with two fields: textValue and label {(text1,text1), (text2,text2)...}
      <af:forEach items="#{bean.anyCollection}"
                                      var="item">
                            <af:selectItem id="si48" value="#{item.textValue}"  styleClass="yourClassName#{var.index}"
                                           label="#{item.label}"/>
                          </af:forEach>
    And now if I have my var called "item" I can write 5 css style classe yourClassName#{var.index} with different color, but there is a problem:
    Attribute styleClass is not defined for af:selectItem
    If it will be so simple I will just add 5 style classes for each selectItem
    <af:selectItem label="text1" value="text1" id="si47" styleClass="yourClassName0"/>
    <af:selectItem label="text2" value="text2" id="si43" styleClass="yourClassName1"/>
    Should I use other component then adf facer rich?

  • Setting color for labels

    I've just been reading the look-and-feel guidelines, and they suggest using Primary 1 (#666699) for labels for components in the GUI. However, they don't suggest how to get this programatically. The examples use resource bundles to get strings (i.e. resources.getString(componentName.labelString) but they don't explain how to set up and best use a resource bundle.
    What is the easiest way to set the color of a label to "Primary 1" for the current look-and-feel.
    Our apps are currently not at all internationalised, so we don't have any existing resource bundles.
    Cheers,
    -T

    Hi,
    this is a tutorial about resource bundles:
    http://java.sun.com/docs/books/tutorial/i18n/resbundle/index.html

  • Setting the font style and color for FileChooser labels

    Hi Friends,
    I have a certain standard Font style and color set for my application GUI. Now, I want to set the style and color for Swing components like FileChooser. Is it possible ?
    Also is it possible to localize JOptionPane ?
    Please advise.
    Best regards,
    Harilal.

    Does anybody knows how to do that?

  • How can I create an alt background color for items in a jlistbox or jtree

    What I'm looking to do is have a white background for say items 1,3,5, etc. and a light yellow background for items 2,4,6, etc. I was wondering how can I set an alternative background color on items in a JTree or a JList

    Use a cell renderer:
    import java.awt.*;
    import javax.swing.*;
    public class ListAlternating extends JFrame
         public ListAlternating()
              String[] items = {"one", "two", "three", "four", "five", "six", "seven"};
              JList list = new JList( items );
              list.setVisibleRowCount(5);
              list.setCellRenderer( new MyCellRenderer() );
              JScrollPane scrollPane = new JScrollPane( list );
              getContentPane().add( scrollPane );
         public static void main(String[] args)
              ListAlternating frame = new ListAlternating();
              frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
              frame.pack();
              frame.setLocationRelativeTo( null );
              frame.setVisible( true );
         class MyCellRenderer extends DefaultListCellRenderer
              public Component getListCellRendererComponent(
                   JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
                   super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
                   if (!isSelected)
                        setBackground(index % 2 == 0 ? list.getBackground() : Color.LIGHT_GRAY);
                   return this;
    }

  • Set color for TableCellDesign for a table in readmode.

    My Requirement is dynamic assiging the Tabcelldesgin color for table column, but Table in readonly = false.
    is there any possiblity of assigining the values dunamically.
    Thanks in  advance

    Yes, i have assigned to Table column to set color dynamically for  different conditions.
    But color is visible, when table in read mode.
    My requirement is need to set color, when table in readonly = false.
    Please can any one have the solution for this>

  • Setting Margins for Mailing Labels in Reports 6i

    I would like to know how to configure the margins (vertical/horizontal properties) for different mailing label formats. I am unable to correctly set them to use for Avery labels. MS Access has a great label wizard that brings up a variety of mailing label formats and allows you to choose from the list. I have found nothing similar in Oracle Reports. Have been a DBA/developer of Oracle Applications for 20+ years. Help!

    Where you set the measurement ?
    Did you follow this ?
    @ Report Object Navigator
    1. Select Layout Model >> Main Section then properties
    set Width, Height and Orientation under Section
    Adjust your layout and
    Try...
    Hope this works..

  • Unable to set tooltip for item (sap.ui.core.Item)

    sap.ui.core.Item does not have the property 'tooltip'. But it borrows 'tooltip' property and setTooltip( ), getTooltip( ) methods from sap.ui.core.Element.
    Still, if I set the tooltip for item, it is not reflected. What might be wrong?
    Consider the following piece of code for example:
    var item = new sap.ui.core.Item({text:'Item'});
      item.setTooltip('tooltip');
      var oCollection = new sap.ui.ux3.Collection({ items: item
      var oCollectionInspector = new sap.ui.ux3.CollectionInspector({
      'fitParent' : false,
      'collections' : [
      new sap.ui.ux3.Collection({
      'title' : 'My Accounts',
      'items' : [ item]
      oCollectionInspector.placeAt('content');

    Tooltip is applied on the Item, but it seems Collection Inspector set its own tooltip for the Item. You can do something like this to set your own tooltip,
    var item = new sap.ui.core.Item("myItem",{text:'Item'});
    var oCollectionInspector = new sap.ui.ux3.CollectionInspector({
      'fitParent' : false,
      'collections' : [
      new sap.ui.ux3.Collection({
      'title' : 'My Accounts',
      'items' : [ item]
      oCollectionInspector.placeAt('content');
      oCollectionInspector.onAfterRendering = function(){
           sap.ui.ux3.CollectionInspector.prototype.onAfterRendering.apply(this,arguments);
           $('#myItem').attr('title','My Tooltip');

  • JEditorPane set color for desired chars

    How can I set color and other parameters for desired chars in JEditorPane or it's better to use some other class.
    Thanks.

    Read this section from the Swing tutorial on "Using Text Components" and then decide which is best for you:
    http://java.sun.com/docs/books/tutorial/uiswing/components/text.html

  • How to set color inputText's label

    hi,
    i have a problem with displaying labels in wrapped with PanelBox
    it's all white , unless one highlights the panel so it changed backgound color is becomes visible.
    how can i fix it or set label's color?
    <af:panelBox text="Main" id="pb1" showDisclosure="false" inlineStyle="height:566px;">
    <f:facet name="toolbar"/>
    <af:panelFormLayout id="pfl1">
    <af:inputText value="#{bindings.Id.inputValue}" label="Id" disabled="true"
    required="#{bindings.Id.hints.mandatory}" columns="#{bindings.Id.hints.displayWidth}"
    maximumLength="#{bindings.Id.hints.precision}" shortDesc="#{bindings.Id.hints.tooltip}" id="it1">
    <f:validator binding="#{bindings.Id.validator}"/>
    <af:convertNumber groupingUsed="false" pattern="#{bindings.Id.format}"/>
    </af:inputText>
    ...

    grodno wrote:
    hi,
    i have a problem with displaying labels in a form.
    it's all white , unless one highlights the panel so it changed backgound color is becomes visible.
    how can i fix it or set label's color?
    <af:panelBox text="Main" id="pb1" showDisclosure="false" inlineStyle="height:566px;">
    <f:facet name="toolbar"/>
    <af:panelFormLayout id="pfl1">
    <af:inputText value="#{bindings.Id.inputValue}" label="Id" disabled="true"
    required="#{bindings.Id.hints.mandatory}" columns="#{bindings.Id.hints.displayWidth}"
    maximumLength="#{bindings.Id.hints.precision}" shortDesc="#{bindings.Id.hints.tooltip}" id="it1">
    <f:validator binding="#{bindings.Id.validator}"/>
    <af:convertNumber groupingUsed="false" pattern="#{bindings.Id.format}"/>
    </af:inputText>
    Edited by: grodno on Dec 21, 2012 1:38 AM
    Edited by: grodno on Dec 21, 2012 1:39 AMHave you tried to set the color of the label by using css?

Maybe you are looking for