Different font weight for certain table rows in a tableView

Dear all,
I Need to add a summary row in a TableView to calculate the sum of all values above this row. For every row I have an object, called KostenDTO.
class SummCurrencyTableCellFactory implements Callback, TableCell> {
     private NumberFormat numFormat = null;
     public SummCurrencyTableCellFactory(NumberFormat numFormat) {
          this.numFormat = numFormat;
     @Override public TableCell call(TableColumn param) {
          TableCell cell = new TableCell() {
               @Override public void updateItem(final Float item, boolean empty) {
               if (item != null) {
                    setText(numFormat.format(item));
                    setStyle("  -fx-alignment: CENTER-RIGHT;");
                    if (item < 0.0) {
                         this.setTextFill(Color.RED);
                    } else {
                         this.setTextFill(Color.BLACK);
              } else {
                    setText("");
     return cell;
how can I Change the font weight of the sum-row to bold?
Thank you and regards Tim

You can do
  String fontWeight ;
  if (getIndex() == getTableColumn().getTableView().getItems().size()-1) {
  fontWeight = "-fx-font-weight: bold;";
  } else {
  fontWeight = "-fx-font-weight: normal;";
  setStyle("-fx-alignment: CENTER-RIGHT;\n" + fontWeight);
in the updateItem(...) method, assuming the sum row is the last row in the table.

Similar Messages

  • Why Adobe CC software can only show regular font weight for some fonts?

    Why Adobe CC software can only show regular font weight for some fonts?
    I can use those fonts in different font weights in the CS3 in the same computer; however it doesn't work on CC.
    Anyone can help~

    And have you applied the patch at Crash | Launch, selecting Type tool?

  • Changing the font color for the complete row based on the Keyfigure Values

    Hi Experts,
    Can any one help me to find a solution for this?.
    I have a requirement, in which the Font color for the complete Row needs to be set to RED in Bex Report, when the corresponding Row Keyfigure is more than a particular value.
    Ex: Notification-Material-Customer-Def Qty-delivered Qty
          1000000 - XXXXX- AAAAAA-10-1000
    in the above example, when the Defect qty increses more than 10, then the complete Row Including the characterstics, Notification, Material, and customer Should be Highlighted in Red. This has to happen automatically once the Query is refreshed.
    Please let me know if you have any suggestion here?.
    Regard,
    Muruganand.K

    Hi,
    Step 1: Click the Format Menu in Excel(BEX Analyzer)
    Step 2: Click the Style submenu
    Step 3: there will be number of SAPBEX formats available. Each of these relates to another cell of BEx (Header, Cell Data,
                Result  Row, Hierarchies, etc.). Also, they depend on data types.
    Step 4: Select SAPBEXchatext
    Step 5: Click Modify. This displays all the standard formatting option as shown below.
    Step 6: Select Font, Color (Background/ Font).
    Step 7: Click OK on both the screens. The entire BEx output result row Font and color is modified.
    Hope it helps........
    Regards,
    Suman

  • How can i set the alternating colors for a table rows

    Dear All,
    Please any one help me how can i set the Alternating colors for Table Rows.
    i created a theam there i set the background alternating color to brown and i set the table design properity to alternating. but it is not reflecting.

    Hi,
    The design property in Table properties should work for your requirement. Select "alternating" value for design.
    Please see the API below:
    design
    Determines the appearance of the table. The property design can take the following values and is represented by enumeration type WDTableDesign.
    alternating - The table rows are displayed alternately in a different color.
    standard - The table background has one color. The individual table rows are displayed with grid net lines.
    transparent - The table background is transparent. The individual table rows are displayed without grid net lines.
    Check whether you have changed the right property or not? Also table should contain more than one rows to test this scenario.
    Regards,
    Jaya.
    Edited by: VJR on Jun 17, 2009 6:43 PM

  • Check for empty table row before adding date

    On the form below, when I click the green + button (far right), a new table row is created with today's date. the user can then enter more text to the right of the date. Problem is when the form is saved and reopened, the text the user enters is deleted and new today's date added because it is in the intialize event. How do I script to check and make sure each dated row is empty before adding today's date?
    https://acrobat.com/#d=qTINfyoXA-U6cDxOGgcSEw
    Thanks,
    ~Don

    Hi Don,
    One option would be to use the caption area of the textfield for the date and leave the value portion free for the user to input their data:
    if (xfa.resolveNode("this.caption.value.#text").value === "") {
              this.caption.value.text = util.printd("[mm/dd/yy] ", new Date() );
    See here: https://acrobat.com/#d=VjJ-YsXLKmV6QU84JrAAIw.
    Hope that helps,
    Niall

  • How to change font size for certain domains in Safari

    I want to increase the font size for a few websites that have font's sizes I can't read. I already use a CSS file that changes my link colors so I can modify that files if that helps.
    Here's a website I need to change http://www.boxofficeguru.com/weekend.htm. Whenever I go to this page I have to increase the font size and when I go to a different site I have to make the font size smaller. Any ideas?

    If there are really only a few sites that you have problems with, just go to the site, and click the Command key along with the plus key.    This will temporarily increase the size of the type. 
    Command and the minus(-)  key makes type smaller.  These commands will work on a per site basis.
    You might also want to check out the "Posts Like This" list to the left. >>>>>>>>>>>

  • Applying table scroll bar for only table rows with table columns fixed.

    hi oa gurus,
    i had implemented table scroll bars using oarawtextbean , there is no problem in vertical and horizontal scroll bar working its working fine. but the requirement is i need to scroll only the table rows with table columns fixed. so , how to achieve the table scroll for only table datas neglecting table headers.
    the code for vertical and horizontal bars scroll is like this,
    OARawTextBean ors = (OARawTextBean)webBean.findChildRecursive("raw1");
    ors.setText(div id=tabledivid style=height:500px;width:100%; overflow:auto>);
    OARawTextBean ore = (OARawTextBean)webBean.findChildRecursive("raw2");
    ore.setText("</div>");
    where raw1 and raw2 are rawtextbean created above and below of the table . but i dont know hoow to apply this only for table rows neglecting table columns , can anybody give any ideas.
    pelase this is very urgent , can u help me in this regards
    thanks
    Edited by: user630121 on Sep 29, 2008 5:17 AM
    Edited by: user630121 on Sep 29, 2008 5:18 AM

    hi,
    I have a similar task to do... Only to apply scrollbar at the table level.
    I tried using the above mentioned but I am facing Null Pointer Exception..
    Please explain about raw1 and raw2
    Rahul

  • Are italicized, block lettering, different fonts available for download ?

    I don't have any problems with Firefox, but I'd like to know:
    Is there a download available that will permit me to use block, italicized or different fonts when posting comments on blog sites that I frequent?

    I'm truly grateful for your prompt response.
    I hope you noticed my name: bigdummy (extreme computer novice). Unfortunately, I'm unable to use the info you provided, as I don't know how to apply it . I'm afraid I require a lengthy, how-to explanation. I know it's a lot to ask but, I would be even more grateful if you would be willing to help me. If that's too much to ask, I understand. Thank you.
    I just upgraded to Firefox 3.6.

  • Different Cost values for full table scans

    I have a very simple query that I run in two environments (Prod (20 CPU) and Dev (12 CPU)). Both environemtns are HPUX, oracle 9i.
    The query looks like this:
    SELECT prd70.jde_item_n
    FROM gdw.vjda_gdwprd68_bom_cmpnt prd68
    ,gdw.vjda_gdwprd70_gallo_item prd70
    WHERE prd70.jde_item_n = prd68.parnt_jde_item_n
    AND prd68.last_eff_t+nvl(to_number(prd70.auto_hld_dy_n),0)>= trunc(sysdate)
    GROUP BY prd70.jde_item_n
    When I look at the explain plans, there is a significant difference in cost and I can't figure out why they would be different. Both queries do full table scans, both instances have about the same number of rows, statistics on both are fresh.
    Production Plan:
    0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=18398 Card=14657 B
    ytes=249169)
    1 0 SORT (GROUP BY) (Cost=18398 Card=14657 Bytes=249169)
    2 1 HASH JOIN (Cost=18304 Card=14657 Bytes=249169)
    3 2 TABLE ACCESS (FULL) OF 'GDWPRD70_GALLO_ITEM' (Cost=949
    4 Card=194733 Bytes=1168398)
    4 2 TABLE ACCESS (FULL) OF 'GDWPRD68_BOM_CMPNT' (Cost=5887
    Card=293149 Bytes=3224639)
    Development plan:
    0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=3566 Card=14754 B
    ytes=259214)
    1 0 HASH GROUP BY (GROUP BY) (Cost=3566 Card=14754 Bytes=259214)
    2 1 HASH JOIN (Cost=3558 Card=14754 Bytes=259214)
    3 2 TABLE ACCESS (FULL) OF 'GDWPRD70_GALLO_ITEM' (Cost=1914
    4 Card=193655 Bytes=1323598)
    4 2 TABLE ACCESS (FULL) OF 'GDWPRD68_BOM_CMPNT' (Cost=1076
    Card=295075 Bytes=3169542)
    There seems to be no reason for the costs to be so different, but I'm hoping that someone will be able to lead me in the right direction.
    Thanks,
    Jdelao

    This link may help:
    http://jaffardba.blogspot.com/2007/07/change-behavior-of-group-by-clause-in.html
    But looking at the explain plans one of them uses a SORT (GROUP BY) (higher cost query) and the other uses a HASH GROUP BY (GROUP BY) (lower cost query). From my searches on the `Net the HASH GROUP BY is a more efficient algorithm than the SORT (GROUP BY) which would lead me to believe that this is one of the reasons why the cost values are so different. I can't find which version HASH GROUP BY came in but quick searches indicate 10g for some reason.
    Are your optimizer features parameter set to the same value? In general you could compare relevant parameters to see if there is a difference.
    Hope this helps!

  • Data allocation for internal table rows Dynamically

    Hi Friends
    I have requirement like below:
    I have one internal table with 400 amounts columns, I will get the value from another program
    that indicates to which column I have to add the values. I dont want to write the case statement
    because I need to write 400 WHEN statements.
    Is there any alternative way dynamically I can choose the internal table column and assign the value which
    I am getting from external program.
    Please help on this as soon as possible.
    Points will be rewarded
    Thanks
    Praveen

    Hi Praveen,
    you may use the ASSIGN COMPONENT ... OF STRUCTURE ... statement.
    It allows to assign the field by name or by sequence.
    Assume you columns have names like amount_001 to amount_999 and are fields of structure ls_amounts. The do as decribed here roughly:
    data:
      lv_fieldseq type NUMC_3,
      lv_fieldname type fieldname,
      lv_amount type (???).
    fieldsymbols:
      <amount> type any.
    * fetch amount and field sequence from external data into  lv_amount and lv_fieldseq
    concatenate 'AMOUNT_' lv_fieldseq into lv_fieldname.
    * <amount> is something like a pointer
    assign component (lv_fieldname) of structure ls_amounts to <amount>.
    add lv_amount  to <amount>. 
    if you are sure you have the correct position of the amount field in the structure stored in variable lv_position, you may use
    assign component lv_position of structure ls_amounts to <amount>.
    I prefer the ASSIGN (fieldname) for reasons of more transparency and less danger in case of structural changes.
    Regards,
    Clemens
    Regards,
    Clemens

  • Is it possible to have different font sizes for different apps in ios 8?

    I would like to have a large font for text messages, but when I change the font size, it changes pretty much across all of the standard ios apps. There are some of these apps that the large font just doesn't really work well for, and I would prefer a smaller font for those. Is this possible?

    No sorry, What about using Zoom instead? Settings > General > Accessibility
    Be sure to read how to use it or you'll be back asking how to get out of it :-)
    https://www.apple.com/accessibility/ios/#vision

  • DATAPUMP EXPORT FAILS (for certain table names)

    I have a table name (G$_EXP$) defined in a user foo.
    When I try to export the table using expdp (datapump export command like utility):-
    expdp foo/foo TABLES=G$_EXP$ DIRECTORY=USERDIR EXCLUDE=TRIGGER
    I get the following error messages:-
    _EXP: Undefined variable.
    So can expdp not handle this kind of table names.
    Will appreciate any comments/responses.

    It's not expdp can't handle the tablename, it's your OS interprete $xxx as variables.
    Try to use " to quote the tablename, or use parameter file PARFILE

  • How to set different font for a particular row in jtables?

    How to set different font size and font type for a particular row in jtable?

    More than enough sample code here:
    [http://java.sun.com/docs/books/tutorial/uiswing/components/table.html]
    db

  • Scripting for different numbers of table rows in cs3

    As always thank you for the help.
    My question: is there a simple newbie way to script for stroke placements when the numbers of rows in the category between the stroke will vary. I have not even attempted to script this style, as frankly I don't know where to start, but here is an explanation of what I need:
    The table foodstuff contains:
    animal, vegetable, fruit
    Under animal there is:
    beef, lamb, pork, poultry
    Under vegetable there is:
    potato, pepper, onion
    Under fruit there is:
    orange
    If wanted a line under each category, ie after poultry, after onion, and after orange how would I go about it.
    Thank you to all who have helped me so far, either by reading answers to other people's queries, or by responding directly to my own

    Interesting ... I don't think there is a newbie-level answer to this challenge. It comes down to finding the first (left-to-right) cell that contains text, and adding a line on top of it all the way to the last cell in that row.
    Here's a first attempt:
    table = app.selection[0];
    if (table.hasOwnProperty("baseline"))
    table = table.parent;
    if (table instanceof Cell)
    table = table.parent;
    if (table instanceof Column)
    table = table.parent;
    if (table instanceof Row)
    table = table.parent;
    if (table instanceof Table)
    table.cells.everyItem().properties = {topEdgeStrokeWeight:0, bottomEdgeStrokeWeight:0, leftEdgeStrokeWeight:0, rightEdgeStrokeWeight:0};
    table.rows.lastItem().bottomEdgeStrokeWeight = 1;
    for (r=0; r<table.rows.length; r++)
      for (c=0; c<table.rows[r].cells.length; c++)
       if (table.rows[r].cells[c].contents)
        for (; c<table.rows[r].cells.length; c++)
         table.rows[r].cells[c].topEdgeStrokeWeight = 1;
        break;
    } else
    alert ("You were supposed to be somewhere inside a Table");

  • Change Font Size for Table Column

    Hi,
    How can we set different font sizes for table columns?
    Thanks,
    Uma.A

    Hi
    Set Design property of table column
    Aslo check this link
    http://help.sap.com/erp2005_ehp_03/helpdata/EN/66/18b44145143831e10000000a155106/frameset.htm
    Thanks

Maybe you are looking for

  • Backup, restoring, formatting info

    Some starting out information I created this post to inform others of the various and essential ways to restore your machine, data, create backups and so forth. 10.6 and 10.7 are mostly covered with information current as of Oct 4, 2011 and subject t

  • Has anyone seen this iTunes Match message before?

    iTunes crashed during upload to iTunes match (one week and 3,500 tracks in to a 7,500 track upload) and on restarting it wants me to 'add this computer' as it's forgotten that the library is already in the process of uploading to iTunes Match. On cli

  • Displaying Last Items in HorizontalList

    I have a HorizontalList with a columnCount of 5 and I am trying to set horizontalScrollPosition so the last five items are displayed in the list. The following should wor, but it does not: imagesTL.horizontalScrollPosition =    imagesTL.dataProvider.

  • How to delete datafiles in oracle 10gR2

    Hi, we have tablespace with 70 datafiles. we have truncate some large files. Now the problem is that all 70 files have less data then 15G, while every datafile size is 60 G. I want to move all the data in to some data files, so that i can remove all

  • On document to go can you merge cells

    i have bougth number and pages (apple) and can seem to merge cell on there even if i send a document. i want to buy another app so i can do this i was thinking Documents to go but any suggetion. i am a very heavy user of microsoft excel. so similar t