Flipping Tables

I have a table that has many rows, and I need to flip it
upside down. What I mean by that, is that I want to take a table
like this: (the one I really need to switch is much longer)
http://upload3.postimage.org/342361/photo_hosting.html
and make it go from bottom to top, like 10,9,8,7,6,5,4,3,2,1.
Is there a way I can do this without cutting and pasting each row
manually?

There is no way to do something like this within Dreamweaver.
Perhaps you
could invert the table by taking it into Excel, and then
exporting it as a
CSV file back into DW.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"AFJ786" <[email protected]> wrote in
message
news:fdo2fv$ckn$[email protected]..
>I have a table that has many rows, and I need to switch
it upside down.
>What I
> mean by that, is that I want to take a table like this:
(the one I really
> need
> to switch is much longer)
>
http://upload3.postimage.org/342361/photo_hosting.html
>
> and make it go from bottom to top, like
10,9,8,7,6,5,4,3,2,1. Is there a
> way I
> can do this without cutting and pasting each row
manually?
>

Similar Messages

  • DECODE - flipping Table axes

    Hi,
    To obtain this unique row:
    CUSTOMER   SUBSCRIPTION_A   SUBSCRIPTION_B    SUBSCRIPTION_C
    J. Smith                       01-JUN-2002       01-JUN-2002from this set of multiple rows:
    CUSTOMER   SUBSCRIPTION_TYPE   BEGIN_DATE
    J.Smith                    B   01-JUN-2002 
    J.Smith                    C   01-JUN-2002I'm using this artefact:
    SELECT
    customer,
    MAX(DECODE(subscription_type, 'A', begin_date)),
    MAX(DECODE(subscription_type, 'B', begin_date)),
    MAX(DECODE(subscription_type, 'C', begin_date))
    FROM customer, subscriptions
    WHERE customer.customer = subscriptions.customer
    GROUP BY customerThe solely purpose of the MAX function here (one might be puzzled to see it here)is its side effect: flattening the otherwise multiple rows returned set, into a unique, has-it-all row by customer.
    This is often described as "flipping table axes" (vertical to horizontal), though the Oracle 8 Reference book covers only half of the way: provides no information as how to obtain this single row.
    My questions:
    - is there another syntax for the same functional result?
    - if so how does it compare in terms of performances?
    Thank You!
    JRoch

    One little change in your SQL above,
    When you DECODE the subscription_type(type), IF the type is 'A' then do some thing, else do NOTHING(NULL) to get the expected results. So a small tweak to your code,
    SELECT
    cust.customer,
    MAX(DECODE(sub.type, 'A', sub.begin_date, NULL)),
    MAX(DECODE(sub.type, 'B', sub.begin_date, NULL)),
    MAX(DECODE(sub.type, 'C', sub.begin_date, NULL))
    FROM customer cust, subscriptions sub
    WHERE cust.customer = sub.customer
    GROUP BY cust.customer;Now, the alternative for this logic would be PL/SQL. If you do not know the number of rows ahead of time, PL/SQL would be the only option in fact. In this query, we are assuming that we can get a maximun of three rows, one for each TYPE. In that case, performance is SQL versus PL/SQL, my personal choice is SQL as it is advised by many Oracle experts.
    Also, you could use SUM() versus MAX() if the decode is on the amounts, that should slightly improve the performance. Basic thing here is, we need to use an aggregate function in order to group the rows and flip them into columns.
    I will be interested to see any other SQL logic for this spec. Thanks,
    SriDHAR

  • Available or Unavailable

    Hello
    Here are the message which may be delivered when Numbers import from XL or export to XL.
    So, you will be aware of a lot of plus and minus.
    "All Drawings from the Sheet"
    A chart whose data couldn’t be found was converted to an image.
    A chart whose data couldn’t be read was converted to an image.
    A chart with too many data points (%d) was converted to an image.
    A column too large for Excel was resized. Shapes and charts might look different.
    A row too large for Excel was resized. Shapes and charts might look different.
    A scatter chart was plotted by column. The chart was imported, but can’t be edited.
    A shape was removed because it wasn’t within the worksheet’s bounds.
    A shape was repositioned so that it is within the worksheet’s bounds.
    A worksheet’s background was removed.
    Accounting number formatting was converted to Excel accounting format.
    An unsupported number format wasn’t imported.
    An unsupported worksheet wasn’t imported
    Area charts will appear different because the series order was reversed.
    Bar charts will appear different because the series order was reversed.
    Bubble charts aren’t supported and were converted to images.
    Bubble charts aren’t supported and were removed.
    Bullets were removed from bulleted text.
    Can’t import more than 255 columns. Additional columns were removed.
    Can’t import more than 65,533 rows. Additional rows were removed.
    Cells in a hidden column or row were unhidden to show merged cells.
    Change tracking isn’t supported. All changes were accepted.
    Chart axes were moved to cross at chart corners. Chart “%@” will look different.
    Chart axes were moved to cross at chart corners. Your charts might look different.
    Chart references to external data aren’t supported and the last values were imported.
    Chart references to external data aren’t supported. The last data values weren’t available, so the chart was removed.
    Chart titles longer than 100 characters aren’t supported and were truncated.
    Charts with error bars or trendlines were converted to charts without error bars or trendlines.
    Charts with no data aren’t supported and were removed.
    Checkboxes aren’t supported in Excel. Selected checkboxes were replaced with True, and unselected checkboxes were replaced with False.
    Choosing to exclude objects from printing isn’t supported.
    Color gradients in tables might look different.
    Comment print settings aren’t supported and were removed. Visible comments will print.
    Content in %1$i cells in table “%2$@” was truncated because it’s too long for Excel.
    Couldn’t export a cell’s conditional formatting because it exceeded Excel’s three-rule maximum.
    Couldn’t export category axis labels.
    Couldn’t export date and time formatting in headers and footers.
    Couldn’t export date/time, page number, and page count fields inside cells because Excel doesn’t support them; the cell values were converted to text.
    Couldn’t export gradient fills because they’re not supported in Excel. The first color was used instead
    Couldn’t export hyperlinks outside table cells.
    Couldn’t export image fills because Excel doesn’t support them.
    Couldn’t export pop-up menus because they aren’t supported in Excel; the cell values were exported.
    Couldn’t export shadow on text in charts.
    Couldn’t export sliders because they aren’t supported in Excel; the cell values were exported.
    Couldn’t export stepper controls because they aren’t supported. The cell value was retained.
    Custom worksheet views aren’t supported and were removed.
    Data in hidden cells will be used in charts.
    Data in hidden cells won’t be used in charts.
    Data tables aren’t supported and were imported as regular table cells.
    Data validation isn’t supported and was removed. The last cell values were imported.
    Date and time values can’t be used in charts. Charts containing dates and times were removed.
    Dates before 1904 were converted to text because Excel doesn’t support them.
    Diagonal borders aren’t supported and were removed.
    Filename fields aren’t supported in headers or footers and were removed.
    Fill opacities were set to 100%.
    Filtered cells might have been imported as hidden. To show them, choose Table > Unhide All Rows and Unhide All Columns.
    Filtered table cells were exported hidden.
    Fit to Page isn’t supported and the setting was removed.
    Fonts with shadows might look different because Excel doesn’t support font shadow options.
    Form controls such as checkboxes and scroll bars were removed.
    Formulas in %1$i cells were removed from “%2$@” because they aren’t supported.
    Graphics aren’t supported in headers or footers and were removed.
    Header and footer cells were exported as body cells but will look the same.
    Header/footer content was truncated because it’s too long for Excel.
    Hidden worksheets were made visible.
    Hyperlinks in cells that don’t contain text weren’t imported.
    Hyperlinks on shapes aren’t supported and were removed.
    Hyperlinks within workbooks and hyperlinks to other files aren’t supported and were removed.
    Indents in table cells were imported but aren’t editable.
    Invalid charts were removed.
    Line charts with data points connected by smooth lines aren’t supported. The smoothed line setting was removed.
    Major and minor axis range units were recalculated and your charts might look different.
    Minimum and maximum axis values were recalculated and your charts might look different.
    Mixed-type charts aren’t supported. Chart “%1$@” was imported as %2$@ chart.
    More than one hyperlink was found in a cell. Only the first one was exported.
    Multicolumn text was exported as one column.
    Non-linear gradient table cell fills aren’t supported and were imported as regular gradient fills.
    None of the types of worksheets in the document are supported.
    Part of a header or footer corrupt. The readable portion was imported.
    Password protection was removed from a worksheet.
    Pathname fields aren’t supported in headers or footers and were removed.
    Pivot tables aren’t supported and were converted to regular tables.
    Pop-up lists in cells weren’t imported. The last value of the cell was used.
    Pop-up lists were removed. The last value was used.
    Print area isn’t supported and the setting was removed.
    Print settings for row and column titles aren’t supported and were removed.
    Radar charts aren’t supported and were converted to images.
    Radar charts aren’t supported and were removed.
    References to external data aren’t supported and were removed. The last calculated value was used.
    Reports aren’t supported and were removed.
    Rotated or flipped tables were returned to their original orientation because Excel doesn’t support rotating or flipping tables.
    Row or column outlines aren’t supported and were removed.
    Scatter charts plotted by column were imported but chart data can’t be edited.
    Scatter plot charts with data points connected by lines were converted to ones without connecting lines.
    Scenarios aren’t supported and were removed.
    Secondary chart axes aren’t supported and were removed.
    Some cells weren’t imported because the worksheet was too large.
    Some chart data might not have imported correctly.
    Sorting criteria were removed.
    Stock high-low-close charts aren’t supported and were converted to line charts.
    Stock open-high-low-close charts aren’t supported and were converted to line charts.
    Stock volume-high-low-close charts aren’t supported and were converted to column charts.
    Stock volume-open-high-low-close charts aren’t supported and were converted to column charts.
    Surface charts aren’t supported and were converted to images.
    Surface charts aren’t supported and were removed.
    Tab stops in table cells were replaced using four spaces.
    Table names were hidden because Excel doesn’t support displaying them on the canvas.
    The document can’t be opened because it’s not a valid Excel file.
    The document contains more colors than Excel supports; some colors may look different.
    The document is encrypted and can’t be opened.
    The document was created with an unsupported version of Excel.
    The formula could not be exported.
    The setting to reverse category order on the axis isn’t supported and was removed.
    The setting to view formulas isn’t supported and was removed.
    This document was exported from Numbers '08. Each table was converted to an Excel worksheet.
    Unsupported border styles were mapped to solid borders.
    Unsupported conditional formatting on %1$i cells was removed from %2$@ on “%3$@.”
    Unsupported conditional formatting was removed.
    Unsupported error values in %1$i cells were removed from %2$@ on “%3$@.”
    Unsupported formulas in %1$i cells were removed from %2$@ on “%3$@.” The last calculated value was used.
    Unsupported number formatting on %1$i cells was removed from %2$@ on “%3$@.”
    Unsupported orthographic camera view was converted to perspective.>
    Yvan KOENIG (from FRANCE mercredi 13 février 2008 12:48:37)

    1. No, but you might be able to upgrade to Lion. Choose About this Mac from the Apple menu, check that the computer has at least a Core 2 Duo(not Core Duo) CPU, and if so, click here.
    2. Check the RAM from the About this Mac window, choose Computer from the Finder's Go menu, control-click the internal drive, and choose Get Info. If the computer has a 32-bit EFI, it can't be upgraded to Mountain Lion or above regardless of the RAM and free drive space.
    (111990)

  • How to do flipping of columns of table

    Hi all,
    i have created a script which should display the columns of table in seperate line ie, say there are three columns c1,c2 and c3. then the output should come as
    c1
    c2
    c3
    but in my case it is coming as
    c1 c2 c3
    how to solve this problem . i think flipping of tables will be helpful. can anybody write the syntax for me.
    kindly help me out .
    thanks

    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:766825833740

  • Is it possible to flip text and tables 90º on a page?

    Hi, I am working on a blank template word processing document that I imported from Word. It is in a US letter page layout. I am working with tables and text, and would like a few of the pages to be rotated into a horizontal format, so that the tables and text are formatted in a vertical direction.
    I can do this in Word via the text direction option, I was wondering if and how I can do this in Pages. Sorry if I'm unclear, I am not sure what to call the format. If you imagine a standard table flipped 90º on a page, and with the text flipped 90º as well, that is what I am wishing to achieve.
    Thanks,
    Walt

    Page orientation is set on a per-document basis & you cannot have both in the same document. However, you can create the same effect using text boxes & other floating objects rotated 90 or 270 degrees.

  • How can we tell if SQL*Loader is working on a TABLE?

    We have a process that requires comparing batches with LDAP information. Instead of using an LDAP lookup tool, we get a nightly directory file, and import the two COLUMNs we want via SQL*Loader (REPLACE) into an IOT. Out of three cases, two just check the first COLUMN, and the third needs the second COLUMN as well.
    We did not think of using External TABLEs, because we cannot store files on the DB server itself.
    The question arises, what to do while the file is being imported. The file is just under 300M, so it takes a minute or so to replace all the data. We found SQL*Loader waits until a transaction is finished before starting, but a query against the TABLE only waits while it is actually importing the data. At the beginning of SQL*Loader's process, however, a query against the TABLE returns no rows.
    The solution we are trying right now is, to have the process that starts SQL*Loader flip a flag in another TABLE denoting that it is unavailable. When it is done, it flips it back, and notes the date. Then, the process that queries the information, exits if the flag is currently 'N'.
    The problem, is, what if SQL*Loader starts inbetween the check of the flag, and the query against the TABLE. How do we guarantee that it is still not being imported.
    I can think of three solutions:
    1) LOCK the ldap information TABLE before checking the flag.
    2) LOCK the record that the process starting SQL*Loader flips.
    3) Add a clause to the query against the TABLE checks that there are records in the TABLE (AND EXISTS(SELECT * FROM ldap_information).
    The problem with 3) is that the process has already tagged the batches (via a COLUMN). It could, technically reset them afterwards, but that seems a bit backwards.

    Just out of curiosity, are you aware that Oracle supplies a DBMS_LDAP package for pulling information from LDAP sources? It would obviously be relatively easy to have a single transaction that deletes the existing data, loads the new data via DBMS_LDAP, and commits, which would get around the problem you're having with SQL*Loader truncating the table.
    You could also have SQL*Loader load the data into a staging table and then have a second process either MERGE the changes from the staging table into the real table (again in a transactionally consistent manner) or just delete and insert the data.
    Justin

  • Looking for a simple flip book template for Flash CS5

    Hi, I'm looking for a simple flip book template for Flash CS5 for a 20 page brochure/ booklet. Or a tutorial. Does anyone know of one?
    Thanks!

    Hi Mark,
    No need to restrict your choice to the preset Pages Templates. Do a web search and choose a Word template. Pages will open Word documents and templates. Or design your own:
    This is a Table I inserted into a blank Pages Word Processing document. Format the date column in Inspector > Table > Format > Cell Format. Select the first Date cell,then drag the fill handle down to increment the dates.
    Regards,
    Ian.

  • EPMA 11.1.2.1 (Interface Tables) Working with Shared Upper Level Members

    Hi Everyone,
    I am building a hierarchy with interface tables in which I specify a shared member. In the interface table, I assign a null datastorage and a 0 for the ISPrimary to designate the shared member. The stored member has a datastorage of storedata and an ISPrimary of 1. The sort order for the shared member is set at 999999 and the sort order for the stored member is 6.
    We have an org hierarchy that goes Division->Business Group->Department. Please reference the member that is highlighted for the two questions I have below.
    I just made up some hierarchy names and placed in parenthesis what the member name would look like in our real hierarchy.
    Example Hierarchy:
    Organization
    |--Main_Hierarchy
    |--|--Division1 (DV_XYZ)
    |--|--|--BusinessGroup1 (BG_ABCD)
    |--|--|--|--Department1 (DP_1234)
    |-Alternate Rollup
    *|--|--Division2 (DV_ABC) [stored]*
    |--|--|--BG_123
    |--|--|--|--DP_9999
    |--|--|--|--DP_9876
    |--|--Research Division (DV_ZZZ)
    *|--|--|--Division2(DV_ABC) [shared]*
    I have 2 issues with this setup.
    1) When I run an import into the shared library, I see the shared member with children underneath it (the same children that are under the stored member) Is this supposed to look like that, or is there an additional configuration that I need to make? When I look in the application library, I see it correctly with the shared members having no children, but the shared library shows the shared members with children.
    2) When I run a deploy to the application, the application library shows the hierarchy correctly, but Planning and the Essbase Outline reversed the members (The stored member comes in as shared and the shared member comes in as stored in essbase and planning, but the application library shows it the correct way). Just wondering if someone could suggest a starting point for me to try and troubleshoot this issue.

    Is this an essbase only application? It seems like the property is defaulting to stored and then flipping the initial stored member to shared because Essbase isn't interpreting the deployment correctly. I would try using ShareData as the datastorage property (I think that is the correct spelling). Also, I believe the correct way to set IsPrimary is Y/N and not 0/1.
    If that did not work I would try the following in this order:
    1 - I would first extract the dimension in question using the file generator and confirm that the properties are indeed correct.
    2 - If they were correct. I would toggle the dimension from shared->local->shared. EPMA is still a little nutty and this will fix a fair amount of issues as it will 'refresh' the application's version of the dimension. I would then deploy
    3 - deploy from EPMA->Planning only (no essbase creation), then deploy to essbase separately after ensuring the property represents itself in planning. If it is essbase only - create the outlnie instead of refresh.
    4 - create a duplicate app in EPMA and deploy the copy of the app - and see if it has the same problem
    Try that and see how it goes.

  • JDBC and creation of external tables with positions

    Hello,
    this might be a trick question or I am probably running around in circles with this one. I know that it is not possible to call pl/sql command ("set define off") using a jdbc connection. Correct me on this one if I am wrong ;)
    So the point why I want to that is because I want to execute the following stmt using a CallableStatement:
    prompt
    prompt: CREATE TABLE "TEST_IN"."TEST_RECEIPT_EXTERNAL" ...
    prompt
    CREATE TABLE "TEST"."TEST_RECEIPT_EXTERNAL"
    ("APPLE" VARCHAR2(8 CHAR)
    ,"PIE" VARCHAR2(1 CHAR)
    ,"RECEIPT" VARCHAR2(58 CHAR)
    ORGANIZATION EXTERNAL
    (TYPE ORACLE_LOADER
    DEFAULT DIRECTORY "TEST_IN"
    ACCESS PARAMETERS
    (records delimited by newline
    fields (
    APPLE position(1: 8) CHAR(8),
    PIE position(9: 9) CHAR(1),
    RECEIPT position(10: 67) CHAR(58), )
    LOCATION
    ("TEST_IN":'FLIP.FLOP.19760104170600'))
    REJECT LIMIT UNLIMITED
    PARALLEL 1
    which gives me back the expected error:
    Missing IN or OUT parameter at index:: 1
    Any thoughts on this one would be very helpful - thanks in advance,
    Sascha

    Perfect - did not thought that the behavior of Statement, CallableStatement and PreparedStatement is different. In retrospect and thinking about the use cases of the implementations I probably should have thought about that my self.
    Thanks a lot - problem solved :)

  • Sum of same fields in two different tables

    Hi ,
    I am facing a problem, hope anyone would help
    I have two tables.. here is the sample data..
    create table t1
    (item_ID NUMBER(2),
    book_ID NUMBER(2),
    price NUMBER(2))
    insert into t1 (item_ID, book_ID, price) values (1,1,60);
    insert into t1 (item_ID, book_ID, price) values (1,2,70);
    insert into t1 (item_ID, book_ID, price) values (1,3,80);
    insert into t1 (item_ID, book_ID, price) values (2,1,10);
    insert into t1 (item_ID, book_ID, price) values (2,1,20);
    insert into t1 (item_ID, book_ID, price) values (1,3,40);
    create table t2
    (item_ID NUMBER(2),
    book_ID NUMBER(2),
    price NUMBER(2))
    insert into t2 (item_ID, book_ID, price) values (1,1,89);
    insert into t2 (item_ID, book_ID, price) values (1,2,29);
    insert into t2 (item_ID, book_ID, price) values (1,3,99);
    insert into t2 (item_ID, book_ID, price) values (2,1,55);
    insert into t2 (item_ID, book_ID, price) values (2,1,90);
    insert into t2 (item_ID, book_ID, price) values (1,3,10);
    as you can see, both tables have the same column names with different data. what
    I require is that i need to calculate the SUM of price grouped by book_id from
    both the tables in a single SQL statement output.
    so my required output is this:
    BOOK_ID SUM(PRICE)
    1 323
    2 99
    3 229
    where the SUM(price) for each book_id is for all the books in both the tables
    where book_id = 1 and then 2 in the second row and then 3 in the third row.
    Would anyone please help, as I am unable to write the query for this.?
    Thanks,
    Sonali.

    <quote>I was just curious if we can do that by some other SQl query and using UNION ALL operator...</quote>
    Of course there are other ways to do it ... but not necessarily better ... just to satisfy your curiosity:
    flip@FLOP> select book_id,sum(price) from t1 group by book_id;
       BOOK_ID SUM(PRICE)
             1    5898240
             2    4587520
             3    7864320
             4    2621440
    Elapsed: 00:00:01.02
    flip@FLOP> select book_id,sum(price) from t2 group by book_id;
       BOOK_ID SUM(PRICE)
             1   30670848
             2    3801088
             3   15597568
             5    1310720
    Elapsed: 00:00:02.06
    flip@FLOP> SELECT book_id, sum(price)
      2  FROM ( select * from t1
      3         union all
      4         select * from t2
      5       )
      6  GROUP BY book_id;
     
       BOOK_ID SUM(PRICE)
             1   36569088
             2    8388608
             3   23461888
             4    2621440
             5    1310720
     
    Elapsed: 00:00:04.01
    flip@FLOP>
    flip@FLOP> with a1 as
      2       (
      3         select book_id, sum(price) p
      4         from   t1
      5         group by book_id
      6       )
      7      ,a2 as
      8       (
      9         select book_id, sum(price) p
    10         from   t2
    11         group by book_id
    12       )
    13  select nvl(a1.book_id,a2.book_id), nvl(a1.p,0)+nvl(a2.p,0)  p
    14  from  a1 full outer join a2 on (a1.book_id = a2.book_id)
    15  ;
     
    NVL(A1.BOOK_ID,A2.BOOK_ID)          P
                             1   36569088
                             2    8388608
                             3   23461888
                             4    2621440
                             5    1310720
     
    Elapsed: 00:00:04.02

  • How do I turn off auto flip on my pictures when I use the front face camera? I dont want it to flip the picture after I take it, I have a 4S

    When I take pictures using the front face camera on my phone it flips them, it didn't use to do that thats why I know there has to be a way to turn it how, but how?

    It's here (in Numbers > Preferences):
    Uncheck 'Show suggestions when editing table cells'.
    SG

  • Background and table.

    Hi, I have a really easy question. How do I get a solid
    background with a table inside that has a set width and centered
    that my content would go in.
    Like this:
    http://www.leica-camera.com/
    Thanks

    >>What should I do here if I'm not a coder
    At the risk of sounding flip... Learn to code. Seriously, you
    really have
    only 2 choices:
    1. Learn to code
    2. Be willing to settle for a very simple, basic site. IOW
    forget things
    like drop-shadow effects.
    Walt
    "L0WRIDE" <[email protected]> wrote in
    message
    news:fv8s5k$6q6$[email protected]..
    > So I'm pretty new at this whole website thing, but I
    really want to become
    > good, and not only that, but correct. My problem is that
    since I'm just
    > learning basic html I'm really limited to what I can do?
    if you look at my
    > site
    > "mykkah.com" I want to put everything on a page effect
    from photoshop...
    > you
    > know just the look of a drop shadow on each side. so my
    question is, since
    > I'm
    > using tables to keep everything straight, I was
    wondering if I can put a
    > background image in a table and then put my content
    table inside of it?
    > does
    > that make sense? I tried to just use a small background
    image and repeat
    > it
    > through page properties, but anytime I resize the page
    or open it up in a
    > different browser it doesn't line up? the background is
    fixed, but my
    > content
    > isn't? What should I do here if I'm not a coder and
    don't have a lot of
    > experience?
    >

  • Vertical Text in Tables

    I wonder how I can flip text in a single cell of a table to vertical orientation? Thanks for any support.

    Question asked and answered quite once a week !
    Feature unavailable !
    Using the forum's Search feature you would get described workarounds.
    Yvan KOENIG (VALLAURIS, France) lundi 22 août 2011 15:37:33
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0
    My iDisk is : <http://public.me.com/koenigyvan>
    Please :
    Search for questions similar to your own
    before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • Set text in table cell to bold

    I am trying to get the text in a table cell to alternate between plain and bold on a ctrl-click.
    The setFont() statements seeming have no effect.
    Can anyone help?
    Self Contained thing here:
    package boldTableCell;
    import java.awt.BorderLayout;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.Font;
    import java.awt.Point;
    import java.awt.event.ActionEvent;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JTable;
    import javax.swing.UIManager;
    import javax.swing.table.DefaultTableModel;
    public class MyTable extends JTable implements MouseListener {
         private boolean isBold = false;
         private String[] columnNames = {"First Name", "Last Name", "Sport", "# of Years", "Vegetarian"};
         private Object[][] data = {
                   {"Mary", "Campione", "Snowboarding", new Integer(5), new Boolean(false)},
                   {"Alison", "Huml", "Rowing", new Integer(3), new Boolean(true)},
                   {"Kathy", "Walrath", "Knitting", new Integer(2), new Boolean(false)},
                   {"Sharon", "Zakhour", "Speed reading", new Integer(20), new Boolean(true)},
                   {"Philip", "Milne", "Pool", new Integer(10), new Boolean(false)},
          * constructor
         public MyTable() {
              super();
              DefaultTableModel defaultTableModel = new DefaultTableModel(data, columnNames);
              this.setModel(defaultTableModel);
              this.setName("My Table");
              setListeners();
          * set listeners
         private void setListeners() {
              addMouseListener(this);
         // on ctrl-click in variable column, flip bold/not bold
         @Override
         public void mouseClicked(MouseEvent event) {
              System.out.println ("mouseClicked(): # of clicks: " + event.getClickCount());
              // ctrl -click
              if ((event.getModifiers() & ActionEvent.CTRL_MASK) > 0) {
                   System.out.println("ctrl-click");
                   Point point = event.getPoint();
                   int row = rowAtPoint(point);
                   int column = columnAtPoint(point);
                   // if not valid then return
                   if ( row < 0 || column < 0) {
                        return;
                   // if this click was on the variable column
                   if (column == 0) {
                        System.out.println("ctrl-click on column 0 ");
                        Component component = super.prepareRenderer(this.getCellRenderer(row, column), row, column);
                        // now get the current font used for this cell
                        Font font = component.getFont();
                        isBold = ! isBold; // flip boolean
                        if (isBold) {
                             System.out.println ("ctrl-click: bold: " + isBold);
                             component.setFont(font.deriveFont(Font.BOLD));
                             component.setForeground(getForeground()); // otherwise text disappears
                             //     (JLabel)t.getHeaderRenderer()).setFont(new Font(("Courier", Font.BOLD, 12));
                        else { // not bold
                             System.out.println ("ctrl-click: not bold: " + isBold);
                             component.setFont(font.deriveFont(Font.PLAIN));
                             component.setForeground(getForeground()); // otherwise text disappears
                        component.invalidate();
                        component.repaint();
                        this.invalidate();
                        this.repaint();
                   } // end if click on definition column
         } // end mouseClicked
         @Override
         public void mouseEntered(MouseEvent arg0) {
         @Override
         public void mouseExited(MouseEvent arg0) {
         @Override
         public void mousePressed(MouseEvent arg0) {
         @Override
         public void mouseReleased(MouseEvent arg0) {
          * @param args
         public static void main(String[] args) {
              try {
                   UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
              catch (Exception e){
                   e.printStackTrace();
              final JPanel jPanel = new JPanel();
              final MyTable myTable = new MyTable();
              jPanel.add(myTable);
              final JFrame frame = new JFrame();
              frame.add(jPanel, BorderLayout.CENTER);
              frame.setTitle("My Panel");
              frame.setPreferredSize(new Dimension(400, 150));
              frame.addWindowListener(new WindowAdapter(){
                   @Override
                   public void windowClosing(WindowEvent e) {
              frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
              frame.setLocation(300, 200);
              frame.pack();
              frame.setVisible(true);
    }Edited by: allelopath on Jul 8, 2010 11:06 AM
    Edited by: allelopath on Jul 8, 2010 11:07 AM

    got it
    package boldTableCell;
    import java.awt.BorderLayout;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.Font;
    import java.awt.Point;
    import java.awt.event.ActionEvent;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.util.ArrayList;
    import java.util.List;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JTable;
    import javax.swing.UIManager;
    import javax.swing.table.DefaultTableModel;
    import javax.swing.table.TableCellRenderer;
    public class MyTableWithCustomRenderer extends JTable implements MouseListener {
         private boolean isBold = false;
        private List<Boolean> isBoldList;
         private String[] columnNames = {"First Name", "Last Name", "Sport", "# of Years", "Vegetarian"};
         private Object[][] data = {
                   {"Mary", "Campione", "Snowboarding", new Integer(5), new Boolean(false)},
                   {"Alison", "Huml", "Rowing", new Integer(3), new Boolean(true)},
                   {"Kathy", "Walrath", "Knitting", new Integer(2), new Boolean(false)},
                   {"Sharon", "Zakhour", "Speed reading", new Integer(20), new Boolean(true)},
                   {"Philip", "Milne", "Pool", new Integer(10), new Boolean(false)},
          * constructor
         public MyTableWithCustomRenderer() {
              super();
              // initialize bold for each row to false
              isBoldList = new ArrayList<Boolean>(5);
              for (int row = 0; row < 5; row++) {
                   isBoldList.add(row, false);     
              DefaultTableModel defaultTableModel = new DefaultTableModel(data, columnNames);
              this.setModel(defaultTableModel);
              this.setName("My Table");
              setListeners();
          * set listeners
         private void setListeners() {
              addMouseListener(this);
         // on ctrl-click in column 0 , flip bold/not bold
         @Override
         public void mouseClicked(MouseEvent event) {
              // ctrl -click
              if ((event.getModifiers() & ActionEvent.CTRL_MASK) > 0) {
                   System.out.println("mouseClicked(): ctrl-click");
                   Point point = event.getPoint();
                   int row = rowAtPoint(point);
                   int column = columnAtPoint(point);
                   // if not valid then return
                   if ( row < 0 || column < 0) {
                        return;
                   // if this click was on column 0
                   if (column == 0) {
                        isBoldList.set(row, ! isBoldList.get(row)); // flip boolean for this row
                        this.invalidate();
                        this.repaint();
         } // end mouseClicked
         @Override
         public void mouseEntered(MouseEvent arg0) {
         @Override
         public void mouseExited(MouseEvent arg0) {
         @Override
         public void mousePressed(MouseEvent arg0) {
         @Override
         public void mouseReleased(MouseEvent arg0) {
        @Override
        public Component prepareRenderer (TableCellRenderer renderer,int row, int column) {
            Component component = super.prepareRenderer(renderer, row, column);
            // now get the current font used for this cell
            Font font = component.getFont();
            if (column == 0) {
                 if (isBoldList.get(row)) {
                      System.out.println ("prepareRenderer(): ctrl-click: bold: " + isBold);
                      component.setFont(font.deriveFont(Font.BOLD));
                      component.setForeground(getForeground()); // otherwise text disappears
                 else { // not bold
                      System.out.println ("prepareRenderer(): ctrl-click: not bold: " + isBold);
                      component.setFont(font.deriveFont(Font.PLAIN));
                      component.setForeground(getForeground()); // otherwise text disappears
              return component;
          * @param args
         public static void main(String[] args) {
              try {
                   UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
              catch (Exception e){
                   e.printStackTrace();
              final JPanel jPanel = new JPanel();
              final MyTableWithCustomRenderer myTable = new MyTableWithCustomRenderer();
              jPanel.add(myTable);
              final JFrame frame = new JFrame();
              frame.add(jPanel, BorderLayout.CENTER);
              frame.setTitle("My Panel - Custom Renderer");
              frame.setPreferredSize(new Dimension(400, 150));
              frame.addWindowListener(new WindowAdapter(){
                   @Override
                   public void windowClosing(WindowEvent e) {
              frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
              frame.setLocation(300, 200);
              frame.pack();
              frame.setVisible(true);
    }Edited by: allelopath on Jul 8, 2010 2:07 PM

  • Interface tables bug?? Hyp 11.1.1.2 with EPMA patched

    HI,
    I am facing one issue. When loading metadata from interface tables to dimension library, not all my member properties make their way into dimension library.
    This happens when i am performing load of all dimensions in one profile:
    E.g. Account dimension. In interface tables i set up 'account type' as Expense and 'Variance reporting' as Expense. After I import dimensions i still see for a member these properties as 'Revenue' and 'NonExpense'. So it does not take into account my changes.
    But when I load dimension account alone, these changes are being transformed to dimension library. Problem arises when i have e.g. 1 associated table with account dimension (mostly Alias dimension). Without selecting this dimension the log gives me an error (alias must be also selected) but changes will go through. When i add alias or more dimensions I will get no error which is right but changes will not go through.
    Can you please help with this issue?

    Is this an essbase only application? It seems like the property is defaulting to stored and then flipping the initial stored member to shared because Essbase isn't interpreting the deployment correctly. I would try using ShareData as the datastorage property (I think that is the correct spelling). Also, I believe the correct way to set IsPrimary is Y/N and not 0/1.
    If that did not work I would try the following in this order:
    1 - I would first extract the dimension in question using the file generator and confirm that the properties are indeed correct.
    2 - If they were correct. I would toggle the dimension from shared->local->shared. EPMA is still a little nutty and this will fix a fair amount of issues as it will 'refresh' the application's version of the dimension. I would then deploy
    3 - deploy from EPMA->Planning only (no essbase creation), then deploy to essbase separately after ensuring the property represents itself in planning. If it is essbase only - create the outlnie instead of refresh.
    4 - create a duplicate app in EPMA and deploy the copy of the app - and see if it has the same problem
    Try that and see how it goes.

Maybe you are looking for

  • My iphone will not sync with Windows 8 can anyone help ?

    I've tried numerous times to add my iphone to itunes, but it does not recognize my device.  I've even deleted itunes and reinstalled it, but it still won't work.  Can anyone help me figure this out ???

  • How do I tell if the option key is down?

    I want to detect whether the option key is being held down while the gui is setting up (the option key, only appearing on macs, is roughly equivalent to the 'alt' key). I am not having any particular events fired at this time, that I know of. How can

  • How to handle this Rework Scenario.

    Hello friends, Following is the rework scenario that is in Pharma. My client produces finish product quantity extra than required. Suppose i have order of 1,00,000 tablets. Production order is created and production is completed. Suppose for this ord

  • Locate a photo in projects

    Hello, I'm trying to locate a few photos in my Aperture library. I was able to find the images by doing a search with EXIF data but now I need to know in wich projects they are stored. Browsing the different menus didn't help me. thank you S. Dufort

  • Stock more than 48 month

    Dear Master Anybody can help me how to get the report for all stock having ageing stock more than 48 month? What is the T Code I can use? Thank you paritz, the newbie in SAP