Can I Make Font SIze Respond to Container Resize?

I have a JDialog.
I added a JPanel as the content pane.
I use a GridBagLayout for all JPanels.
The content pane also has a ComponentListener, and I use its componentResize () method to sense when user drags the Dialog to a new size.
There are two sub JPanels, and one of them uses a CardLayout to conrol a set of other JPanels.
All the JPanels have a collection of JTextFields and JComboBoxes that is determined at run time.
My goal is to permit resizing to any size and keeping all components visible and fonts readable.
That means controlling the font size.
Getting a ratio from the requested size change and applying it to change the font size of all components almost works. Its good for all increases up to full screen. However I lose it on the way down. The panels shrink more than the font shrinks the fields and boxes.
The Title and other insets prevent it from being perfect. There is also some slippage from JComboBox having an independent JTextField editor component. Their heights often are inconsistent, i.e. the JComboBox height ends less than the preferred size of its editor component.
And, if not careful the componentResize ()degenerates into an infinite loop, i.e. I change the font and then pack () which triggers another call to resize.
Anyway, does anyone know of a model for this problem.
My goal is for it to stay consistent no matter how small it is shrunk.
glb

Hi Mike,
That's right, MultiTouch and Gestures can not be used at the same time, but you should always be able to receive mouse events for 1st touch point.
Could you try changing your code as below.
function mouseDownHandler(event:MouseEvent):void {
TweenLite.to(mainMenu.menuPres, .2, {alpha:.5});
function mouseUpHandler(event:MouseEvent):void {
TweenLite.to(mainMenu.menuPres, .2, {alpha:1});
please sprinkle some trace statements in event handler to see if they get triggered.
Also, did you try just adding event listener for MouseEvent.CLICK, instead of MOUSE_DOWN and MOUSE_UP.
-Thanks
Pahup

Similar Messages

  • Ctrl+= "make font size larger" keyboard shortcut is not working, maybe related to Windows 7?

    I changed recently from Windows XP to Windows 7 64bit, and since then the keyboard shortcut Ctrl+= to make "font size larger" is not working anymore. Ctrl+- to make "font size smaller" is working like always. I tried this with LV8.5 and LV2011 and the missing functionality is on both LV-versions. So I wonder if this is related to Windows 7... Or am I missing something?
    Any ideas?
    I tried to switch keyboard input language without success. Then searched for menu shortcuts in the LV options, where Ctrl+= is not listed as it is only a keyboard shortcut and not in the menu. I wonder also why the whole font setting is so nestled in LV, why not just having a toolbar...
    Looking forward for any help.

    It works for me. I'm using Windows 7 64-bit, but I'm running LabVIEW 8.2, so I can't test this on other versions. Are you sure you don't have some extension installed that's using that keyboard shortcut?
    I tried to switch keyboard input language without success. Then searched for menu shortcuts in the LV options, where Ctrl+= is not listed as it is only a keyboard shortcut and not in the menu. I wonder also why the whole font setting is so nestled in LV, why not just having a toolbar...
    http://forums.ni.com/t5/LabVIEW-Idea-Exchange/A-text-toolbar/idi-p/953534

  • How can I change font size in iCal 3.0.8?

    How can I change font size in iCal 3.0.8?

    Julian,
    There is no user option to change the font size in iCal.
    For other posts regarding this topic, read some of the links in "More Like This." box just to the right of your first post in this thread.

  • I have loaded windows 8.1 via bootcamp on my macbook air 11 inch how can i adjust font size etc

    I have loaded windows 8.1 via bootcamp on my macbook air 11 inch how can i adjust font size. I have to do a lot of work in office 2013 and it is very very difficult to see the screen.
    Thank you

    Microsoft store will provide a download manager (.exe) using your Product Key, which needs to be run on a PC. This manager will then let you download an ISO image to a USB and/or DVD.

  • Can we change font size and font type in reports

    Hi All Technical/Functional Masters,
    We are developing some transactional reports in ISU. this report has 20 columns to be printed. On screen, display is not a problem but client has a requirement to download this report in PDF format and wants to print on A4-paper in Landscape. Although we have managed to accommodate all the columns on A4 paper but have to compromise with font size that are very small and not visible. If we download the report in excel format we are able to maintain the font size 8 and accommodate all columns after little format but same in PDF is a problem.
    Can anyone tell whether we can increase the font size and change font type(from SAP standard to 'Arial') before sending the output in PDF ? Is there any property or utility that can be changed or used for this purpose.

    Function Module : CONVERT_ABAPSPOOLJOB_2_PDF
    Include : THSTXWFPL
      for modify font size
    decrease fontsze foncharacter will increase
    fontsize = 120.     <-- Change
    fontsize = 100.  or fontsize = 80
    Depend on your logon lang. My case logon 'TH' or 2.  I modified font ZCORDIA (refer CordiaNEW thai font)
    if is_cascading is initial.
      case language.
      when '0'. "Serbian
        font = 'COURCYR'.  devtype = 'SAPWIN'.
      when '1'. "simpl.Chinese
        font = 'CNHEI'.    devtype = 'CNSAPWIN'. cjklang = 'X'.
      when '2'. "Thai
      font = 'THDRAFT'.  devtype = 'THPDF'.
       font = 'ZCORDIA'.  devtype = 'ZMTHSWNU'.
        font = 'THANGSAN'.  devtype = 'ZPDFUC'.
      when '3'. "Korean
        font = 'KPSAMMUL'. devtype = 'KPSAPWIN'. cjklang = 'X'.
      when '4'. "Romanian
        font = 'COURIER'.  devtype = 'I2SWIN'.
      when '5'. "Slovenian
        font = 'COURIER'.  devtype = 'I2SWIN'.
      when '6'. "Croatian
        font = 'COURIER'.  devtype = 'I2SWIN'.
      when '8'. "Ukranian
        font = 'COURCYR'.  devtype = 'SAPWIN'.
    Add font Cordia Thai
    SE73 --> Fon familia --> ZCORDIA
    Load Font Cordia thai to system
    SE38 --> RSTXPDF2UC
    load CORDIA.TTF
    SE73 --> printer font --> 'ZMTHSWNU'
    Add ZCORDIA font and copy AFM Metric from = 'THDRAFT'.  devtype = 'THPDF'.
    Modify AFM
    example
    *----- OLD--
    StartFontMetrics 2.0
    sapFamily ZCORDIA
    sapHeight 000
    sapBold false
    sapItalic false
    StartCharMetrics 0183
    WX 0500 ; N space                          ;
    WX 0500 ; N exclam                         ;
    WX 0500 ; N quotedbl                       ;
    WX 0500 ; N numbersign                     ;
    WX 0500 ; N dollar                         ;
    WX 0500 ; N percent                        ;
    WX 0500 ; N ampersand                      ;
    *--NEW--
    StartFontMetrics 2.0
    sapFamily ZCORDIA
    sapHeight 000
    sapBold false
    sapItalic false
    StartCharMetrics 0183
    WX 0375 ; N space                          ;
    WX 0375 ; N exclam                         ;
    WX 0375 ; N quotedbl                       ;
    WX 0375 ; N numbersign                     ;
    WX 0375 ; N dollar                         ;
    WX 0375 ; N percent                        ;
    WX 0375 ; N ampersand                      ;
    Result : decrease space between character.   Then Your PDF will have BIGGER FONT.
    Rdgs,
    Suwatchai

  • Can i  change font  size  in  jasper  exported  Html  report

    how can i change font size in jasper exported Html report.
    i also want table in that html report.

    So when is it going to be possible, I ask, as this is a question I and many others ask after each update!

  • Can we specify Font size in the Inspector window?

    I am a whiz at MS Word. I'm totally lost in Pages. My current dilemma is how to specify the size of my text in the inspector window. Is it possible?
    Currently, the only way I can change the font size is by clicking Format > Font > Show Fonts > and making the change in the new window. Is that the only way?
    Sigh. Here's hoping I can figure out Pages soon or I'll be stuck in limbo, juggling both a PC and a Mac.

    You might want to explore the keyboard shortcuts.
    ⌘ +T will show your fonts. (Lot easier than using the menu.)
    I also changed the increase font size shortcut from ⌘ + and - to ⌘ + > or <, just like Appleworks. You can change the shortcuts using the keyboard system preference.
    <ol type=>
    Choose Apple menu > System Preferences and click Keyboard & Mouse.
    Click Keyboard Shortcuts.
    To disable a shortcut, deselect the checkbox next to its description in the list.
    To change the key combination for a shortcut, select the character in the Shortcut list. Type a new shortcut by holding down the key combination that you want to use instead.
    Tip: You cannot use each type of key (for example, a letter key) more than once in a key combination.
    Quit and restart any applications you are using for the new keyboard shortcut to take effect.
    Kurt

  • Can we change font size in ALV output?

    Hi,
    I would like to know if can change the font size of the output in ALV reports. 
    We did suggest the client to download into excel & change it but they would like to see the fontsize as 10 in ALV output itself. This allows them to fit more columns in a screen.
    I appreciate your response.
    Thanks,
    Ritu

    Hi Ritu,
    In structure of type “LVC_S_LAYO”, there is a field called SMALLTITLE..
    If this field is set, the title size in the grid control is set to the font size of the column header.
    This s the only way i know you can have a control on the font size..
    FORM prepare_layout CHANGING ps_layout TYPE lvc_s_layo.
    ps_layout-zebra = 'X' .
    ps_layout-grid_title = 'Flights' .
    ps_layout-smalltitle = 'X' .
    ENDFORM. " prepare_layout
    hope this helps you..
    regards
    satesh

  • How can i get font sizes my eyesare bad ?

    how can i get font sizes my eyes are bad ?

    You need to update to Firefox 9.0.1. - http://www.mozilla.com/en-US/firefox/
    The Firefox [https://support.mozilla.com/en-US/kb/Page+Zoom Page Zoom] feature does a domain by domain level of saving the users preferred zoom level settings, there is no default Page Zoom level setting in Firefox, as with some other browsers.
    Try the Default FullZoom Level extension and set a default zoom level: <br />
    https://addons.mozilla.org/en-US/firefox/addon/6965
    Or the NoSquint extension: <br />
    https://addons.mozilla.org/en-US/firefox/addon/2592/

  • How can I increase font size on LR windows?

    I would estimate the font size in my LR (and all Adobe windows) is a five. It's the same on all three of my computers, all of which are operating on Windows 8.
    The last time I raised this issue, I was told to change the screen resolution -- pretty poor workaround considering all my other apps operate at the recommended screen resolution for the three computer and one additional monitors I use.
    How can I increase the font size to make Adobe applications  usable on my computers?

    Hi,
    I also use Win 8.1 and I have a high DPI 13" screen that is at 1920x1080 resolution and it is satisfactory although small.
    LR (5.7 current) will not support screens with greater resolution unless you have razor sharp eyes.
    We just need to hope that the next release (6) whenever it comes has native support for high DPI screens.

  • Can I specify font size=1 when printing HTML?

    I want print my HTML report in font size = 1. I don't know how to do it?
    When using report builder, there seems no special control for printing HTML?
    Hope experts here broaden my mind
    Richard

    This is possible
    1) In Builder paper layout select the object for which you want to change the font size
    2) In menu
    Format --> Font
    You can change the font and its size
    Then generate to html/htmlcss . I have verified this
    Thanks
    The Oracle Reports Team

  • How can I make a row of cells containing 3-digit decimals, who's values resulted from calculations within the spreadsheet, appear as durations of minutes and seconds?

    Row 6 in this spreadsheet is the result of Row 2/Row 3 as evidenced by the formula listed while Cell Y6 selected. How can I make the values in this row appear as durations of minutes and seconds rather than 3-digit decimals? For example, rather than appearing as 9.84 I would like the value of Cell Y6 to appear as 9:50 or 9min 50sec. (obviously .84x60seconds 50 seconds). I tried changing the cell formats from "number" to "duration," but no change is made. Using the "duration" format does however work if I am manually entering the decimal value into the cell rather than allowing it to result from another caluclation within the spreadsheet. Is there a solution to this within Numbers '09? You can see why I would want the "pace" displayed in minutes and seconds. Thanks in advance!
    Ryan

    Hi Ryan,
    You wrote:
    "The problem is that my "Distance" is a row of automatically generated values resulting from ((Row1/60)*Row 6). Changing the format of Row 1 to minutes causes row two to be expressed as a duration, which obviously it shouldn't because it is a distance. The spreadsheet has to be designed so that all I have to manually input on each entry are Row 1 Values (Time) and Row 6 Values (Average Pace). The rest of the cells must be automatically poulated as a result of formulas."
    I'm assuming that where you say "Row 1" in this you mean "Row 2", which is labeled "Time" in the example in the OP.
    In the original post, you presented a formula from cell Y6. Replacing the Header labels in that formula's cell reference with the Addresses of the referenced cells, the formula was:
    Y6: =Y2/Y3
    In this post, you are saying that Y6 contains entered data: "...all I have to manually input on each entry are Row 1 Values (Time) and Row 6 Values (Average Pace).
    Which is correct?
    Regards,
    Barry

  • How can I set font size of a column of Multicolumn Listbox at one time in edit mode?

    HI,
    I want to creat a Multicolumn Listbox with different font size in diffrent columns.
    But  I can only modify all cells or one cell font size at one time!
    How can I do?
    THANKS!

    My labview version is 7.1.
    I can't open the .vi you deliver.
    And in LV7.1, I can't  find  fontsize setting in property node.
    thank you all the same!
    Attachments:
    1111.JPG ‏27 KB

  • I can't change font size. It goes only from 1 to 9 and can't enter an especific number.

    I use Mac and for the first time I face this problem... I used to be able to enter the font size lik 32, 48, 96... any number in flash CC I can't. Is there any way I can change this? I looked in preferences and found nothing!

    Hi Agda,
    This is a truncation issue which we are investigating, however the functionality should work as expected as the size filed still has the information that you have entered say if you enter 12 you might see only 1 in properties panel whereas it has the value of 12 and your text on stage should get applied with 12 pt size.
    Hope this helps.
    Thanks!
    Mohan 

  • How can I modify font size in selected text, using CS6 of Dreamweaver please?

    For some unknown reason, I see that coding on some of my pages has the unwelcome <SMALL> or </SMALL> tags present in some places.   Here's an example of what I'm talking about:
    </SMALL></B></FONT><B><SMALL>para nuestros foros</SMALL></B></FONT></TD>
    I sometimes manually delete each such presence that I see, but it's tedious to do so.   Nevertheless I don't see a feature on Dreamweaver CS6 that enables me to change selections', as opposed to entire pages', fonts and their corresponding sizes.    Perhaps Dreamweaver's Modify feature has the desired option tucked away in there somewhere, but I haven't seen it.   Any thoughts, please?

    The code you are showing is all old deprecated stuff. DWCS6 would not write that. Is this old code that you are trying to update?
    </SMALL></B></FONT><B><SMALL>para nuestros foros</SMALL></B></FONT></TD>
    The <font></font>, <small></small> tags have been replaced by styling with css.
    So your code might look like:
    <td>para nuestros foros</td>
    and the css (which goes in the <head></head> section of your page OR a linked css stylesheet) looks like:
    <style>
    td {
    font-size: 12px;
    font-weight: bold;
    color: #ccc;
    </style>
    If you just want to target a specific piece of text in a <td> table cell you can do this:
    <td><span>para nuestros foros</span></td>
    <style>
    td span {
    font-size: 16px;
    font-weight: bold;
    color: #000;
    </style>
    Sounds to me like you need to read up on styling elements with css.

Maybe you are looking for

  • WEBUTIL_HOST Function not works with Batchfiles

    Hi I try to call the WEBUTIL_HOST.host('c:\test.bat') Function from Forms9i. she's don't work. The DosBox hanging on without error can help me somewhere? Thanks Alfred

  • To store value

    SO PLEASE RUN THIS CODE AND TRY TO RECTIFY THE ERROR AND SOLVE THIS PROBLEMS. I WILL PLACE THESE TYPE TEXT NEAR BUYME BUTTON WHEN RUN THIS CODE FIRST IT WILL COME SCREEN LIKE "WELCOME TO SHOPPING CART" SELECT BOOKS AND CLICK ON SHOP YOU WILL COME "BO

  • KT4V crc errors

    hi there! i have crc errors in my system,i read that a bios update will fix the problem my system usually reboots when i ripping a dvd or moving files or i watch a dvd movie! suddenly the screen becomes blue and the system rebooting... i would like t

  • Count(*) in select statement having group by clause

    Hi I would like to use count(*) in select statement having group by clause. say for example there is a state with a number of cities listed. I would like to get the count of cities for each state. the sql stement is grouped by city and it is joined w

  • Problem exporting 1080p/59.94 CS6.0.3 ...

    I have a Sony consumer camcorder where I am recording 1080p/59.94 footage which gets stored in .mts files.  I put in a screen shot from MediaInfo below if that helps.   My target is a Sony PS3.   I can play the native .mts file off the camera directl