JScrollPane: lock views size in one direction

Hi,
I have a JScrollPane that should use only the vertical scrollbar and a fixed size in horizontal direction. That means when an element inside the scroll panes view is broader as allowed it has to be shrinked down according to the behaviour of its LayoutManager.
I tried to set the preferred size for the JScrollPane itself and its view port but nothing helped. So how can I lock a JScrollPane in one direction so that it shows its standard behaviour only for the other direction?
Oxy
Edited by: Oxy on Oct 23, 2008 2:01 AM

This response is probably way too late to solve your problem but I was looking for an answer to the same question and found this post, so I figure if I answer it here, the next person won't need to search further.
Basically you use Scrollable to do this.
Assuming you're working with a custom panel:
public class MyCustomPanel implements Scrollable {
    public boolean getScrollableTracksViewportWidth() {
        return true;
}If you're not using a custom panel then often it will already implement this method, but you can still override it to force the desired behaviour.
FWIW this can also be used in the direction you do want it to scroll, if you have a background you need to fill the entire scrollable area:
public class MyCustomPanel implements Scrollable {
    public boolean getScrollableTracksViewportHeight() {
        return getParent() instanceof JViewport && getParent().getHeight() > getPreferredSize().height;
}i.e. if the viewport is bigger than what you need to paint, the viewport will stretch your component to fill the rest of the space.

Similar Messages

  • View only works in one direction,will not change when I turn the phone

    view only works in one direction,will not change when I turn the phone

    Is the rotate lock on?
    http://appletoolbox.com/2013/03/iphone-ipad-or-ipod-screen-will-not-rotate-fix/

  • How do create one directional html selects in jsp

    i am trying to create a one directional multi select in jsp that is when select the option from the multi- select the first time is not appear again that is for instance if i have a status option of
    NEW
    Fix
    Closed
    they should come from the database from and if they have been selected once and save in another table they should not appear again... that is is you selec Fix you cannot go back to New... how can I accomplish that in jsp
    my default is coming from on table and the rest from another reference table with for all the drop downs.

    I haven't tested this but this might help get you started.
    Your problem is that you are differentiating one "password" value from another. While iterating through your 'curLocks'(currentLocks?) simply create a new form to differentiate the various password values. Send the validate_clear() function the index number, when the button is clicked, to find the correct password.
    JavaScript:
    function validate_clear(index)
         alert(document.forms[index].password.value);
    JSP :
    <%
    for(int i = 0; (curLocks != null) && i <
    curLocks.size(); i++)
       ArrayList row = (ArrayList) curLocks.get(i);
       sSite =((java.math.BigDecimal)row.get(0)).toString();
       sAu = (String)row.get(1);
    %>
       <form>
          <br /><br />
          <INPUT TYPE="hidden" name="LockType" Value="Past">
          <INPUT TYPE="hidden" name="SiteNbr" Value=<%out.print(sSite);%>>
          <INPUT TYPE="hidden" name="AU" Value="<%out.print(sAu);%>">
          Current<%out.print(sSite);%><%out.print(sAu);%>
          <INPUT TYPE="password" name="password" size="18">
          <INPUT TYPE="button" Value="Clear Lock" OnClick="javascript:validate_clear(<%= i %>);">
       </form>
    <% } %>

  • HT4759 outlook viewing size

    hi
    Not sure i am putting question at right platform as i tried a lot however was unable to contact apple via e-mail. I have recently purchased macbook pro retina and use Microsoft outlook 2011 and Thunderbird email client, for my office and personal mails respectively.
    I have been a windows user in past and one problem i see with both clients is viewing size of email fonts. If font size is increased may be it helps but then the recipient will also get large fonts. On other hand Command + also works but not to all windows of the interface.
    Thus i am left with option of viewing mails with such a small font size. I am also planning to use 21 inch Samsung LED in office with my macbook. As being 6"3 in height it helps me to have good posteur in office. However on that screen i am sure the mail size will be very very small.
    I request apple to look at this critical issue in their next OS launch and anybody who can give me a solution will be highly appreciated.
    best regards
    NABAIG

    Apple don't make either Microsoft Outlook or Thunderbird. If those two applications do not have preferences to set the font size of emails (I'm sure Outlook does - its predecessor Entourage did) then the makers of those applications would need to add it. Apple cannot add features to other companies applications.
    Mac OS X already has options for increasing font size, and making text easier to read for people with eyesight problems.

  • Max "viewing" size for photos?

    I did some searches here but didn't seem to find what I needed.
    Question: When a viewer clicks on a thumbnail to see the larger pic, can I change the "viewing size" (not the download size) to a larger dimension?....say..850 wide for landscape.
    Thanks in advance for any help
    Craig
    www.pbase.com/crs

    If you want to show off your images in a bigger size you could forget about the Photo template and load your thumbs onto a blank page. Make each one a link to a new page where you can put the enlargement as big as you want. You could probably increase the page width to at least 1200 px without it running off the average screen.
    To stop your navigation menu getting out of hand you would exclude all these "enlargement" pages from the navigation in the "page" inspector and provide a "back" button to return to the thumbs.

  • Default Viewing Size

    Since upgrading from CS5 to CC images open with a default viewing size that is very small, like 3 - 5 %.  Can this be changed to "Fit to View"  I know that it is just a case of COmmand-0 to make it that size, but one less thing to do would be nice.
    Thanks
    Craig

    Here's what I think is happening:
    1.  You didn't realize that the Application Frame is just an option, so you dragged the bottom up so that Photoshop is a very short window.
    2.  You later turned off the Application Frame while it was very short.
    3.  Under some conditions, now Photohshop still thinks it wants to open documents and make them fit in the (now hidden) short application frame.
    Try this:
    Re-enable the Application Frame.
    Stretch the bottom of the Photoshop window down so that it (nearly) fills your screen.
    Disable the Application Frame again.
    -Noel

  • Hotsync only works in one direction

    I recently shifted from a PC on XP to an Imac on OSX 10.5.
    I have a Tungsten E and have Palm Desktop 4.2.1 installed on the Imac, with Open at Login activated.
    Hotsync seems to run well, with no error messages in the log, but on looking at the result, sync'ing of the calendar has only gone in one direction. A new entry in my handheld has transferred to the Imac, but a new entry on the Imac has not appeared on the handheld. This never happened with the PC, in that any new entry was sync'ed, irrespective of where it was entered.
    Any suggestions to make this work in both directions will be gratefully received! Thanks, JohnP 
    Post relates to: Tungsten E
    This question was solved.
    View Solution.

    Thanks for the response.
    I went to the Hotsync manager and then to Conduit manager as suggested.
    Interestingly, while it is set at a default of "Synchronize the files", the "Last Hot Sync" entry was "never" - for all entries, not just calendar.
    This despite the fact that when I have connected the handheld and Imac via the USB cable, I get the messages on both that sync'ing is proceeding. And there are no error messages.
    It seems that something else is preventing me from sync'ing. 
    Any further suggestions?  John
    Post relates to: Tungsten E

  • MySQL lock table size Exception

    Hi,
    Our users get random error pages from vibe/tomcat (Error 500).
    If the user tries it again, it works without an error.
    here are some errors from catalina.out:
    Code:
    2013-07-31 06:23:12,225 WARN [http-8080-8] [org.hibernate.util.JDBCExceptionReporter] - SQL Error: 1206, SQLState: HY000
    2013-07-31 06:23:12,225 ERROR [http-8080-8] [org.hibernate.util.JDBCExceptionReporter] - The total number of locks exceeds the lock table size
    2013-07-31 06:23:12,242 WARN [http-8080-8] [org.kablink.teaming.web.portlet.handler.LogContextInfoInterceptor] - Action request URL [http://vibe.*******.ch/ssf/a/do?p_name=ss_forum&p_action=1&entryType=4028828f3f0ed66d013f0f3ff208013d&binderId=2333&action=add_folder_entry&vibeonprem_url=1] for user [kablink,ro]
    2013-07-31 06:23:12,245 WARN [http-8080-8] [org.kablink.teaming.spring.web.portlet.DispatcherPortlet] - Handler execution resulted in exception - forwarding to resolved error view
    org.springframework.dao.InvalidDataAccessApiUsageException: object references an unsaved transient instance - save the transient instance before flushing: org.kablink.teaming.domain.FolderEntry; nested exception is org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: org.kablink.teaming.domain.FolderEntry
    at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:654)
    at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
    at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
    2013-07-31 06:23:36,474 ERROR [Sitescape_QuartzSchedulerThread] [org.quartz.core.ErrorLogger] - An error occured while scanning for the next trigger to fire.
    org.quartz.JobPersistenceException: Couldn't acquire next trigger: The total number of locks exceeds the lock table size [See nested exception: java.sql.SQLException: The total number of locks exceeds the lock table size]
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2794)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport$36.execute(JobStoreSupport.java:2737)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3768)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2733)
    at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:264)
    Caused by: java.sql.SQLException: The total number of locks exceeds the lock table size
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
    at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1169)
    2013-07-31 06:27:12,463 WARN [Sitescape_Worker-8] [org.hibernate.util.JDBCExceptionReporter] - SQL Error: 1206, SQLState: HY000
    2013-07-31 06:27:12,463 ERROR [Sitescape_Worker-8] [org.hibernate.util.JDBCExceptionReporter] - The total number of locks exceeds the lock table size
    2013-07-31 06:27:12,463 ERROR [Sitescape_Worker-8] [org.jbpm.graph.def.GraphElement] - action threw exception: Hibernate operation: could not execute update query; uncategorized SQLException for SQL [update SS_ChangeLogs set owningBinderKey=?, owningBinderId=? where (entityId in (? , ?)) and entityType=?]; SQL state [HY000]; error code [1206]; The total number of locks exceeds the lock table size; nested exception is java.sql.SQLException: The total number of locks exceeds the lock table size
    org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute update query; uncategorized SQLException for SQL [update SS_ChangeLogs set owningBinderKey=?, owningBinderId=? where (entityId in (? , ?)) and entityType=?]; SQL state [HY000]; error code [1206]; The total number of locks exceeds the lock table size; nested exception is java.sql.SQLException: The total number of locks exceeds the lock table size
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
    at org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:424)
    2013-07-31 06:27:22,393 INFO [CT-kablink] [org.kablink.teaming.lucene.LuceneProvider] - (kablink) Committed, firstOpTimeSinceLastCommit=1375251142310, numberOfOpsSinceLastCommit=12. It took 82.62174 milliseconds
    2013-07-31 06:28:22,686 INFO [Sitescape_Worker-9] [org.kablink.teaming.jobs.CleanupJobListener] - Removing job send-email.sendMail-1375252102500
    2013-07-31 06:29:51,309 INFO [Sitescape_Worker-10] [org.kablink.teaming.jobs.CleanupJobListener] - Removing job send-email.sendMail-1375252191099
    2013-07-31 06:32:08,820 WARN [http-8080-2] [org.hibernate.util.JDBCExceptionReporter] - SQL Error: 1206, SQLState: HY000
    2013-07-31 06:32:08,820 ERROR [http-8080-2] [org.hibernate.util.JDBCExceptionReporter] - The total number of locks exceeds the lock table size
    2013-07-31 06:32:10,775 WARN [http-8080-1] [org.hibernate.util.JDBCExceptionReporter] - SQL Error: 1206, SQLState: HY000
    2013-07-31 06:32:10,775 ERROR [http-8080-1] [org.hibernate.util.JDBCExceptionReporter] - The total number of locks exceeds the lock table size
    2013-07-31 06:32:12,305 WARN [http-8080-1] [org.hibernate.util.JDBCExceptionReporter] - SQL Error: 1206, SQLState: HY000
    2013-07-31 06:32:12,305 ERROR [http-8080-1] [org.hibernate.util.JDBCExceptionReporter] - The total number of locks exceeds the lock table size
    2013-07-31 06:32:14,605 WARN [http-8080-3] [org.hibernate.util.JDBCExceptionReporter] - SQL Error: 1206, SQLState: HY000
    2013-07-31 06:32:14,606 ERROR [http-8080-3] [org.hibernate.util.JDBCExceptionReporter] - The total number of locks exceeds the lock table size
    2013-07-31 06:32:16,056 WARN [http-8080-3] [org.hibernate.util.JDBCExceptionReporter] - SQL Error: 1206, SQLState: HY000
    2013-07-31 06:32:16,056 ERROR [http-8080-3] [org.hibernate.util.JDBCExceptionReporter] - The total number of locks exceeds the lock table size
    2013-07-31 06:32:24,166 WARN [http-8080-1] [org.hibernate.util.JDBCExceptionReporter] - SQL Error: 1206, SQLState: HY000
    2013-07-31 06:32:24,166 ERROR [http-8080-1] [org.hibernate.util.JDBCExceptionReporter] - The total number of locks exceeds the lock table size
    2013-07-31 06:32:24,167 WARN [http-8080-1] [org.kablink.teaming.spring.web.portlet.DispatcherPortlet] - Handler execution resulted in exception - forwarding to resolved error view
    org.springframework.jdbc.UncategorizedSQLException: Hibernate flushing: could not insert: [org.kablink.teaming.domain.AuditTrail]; uncategorized SQLException for SQL [insert into SS_AuditTrail (zoneId, startDate, startBy, endBy, endDate, entityType, entityId, owningBinderId, owningBinderKey, description, transactionType, fileId, applicationId, deletedFolderEntryFamily, type, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'A', ?)]; SQL state [HY000]; error code [1206]; The total number of locks exceeds the lock table size; nested exception is java.sql.SQLException: The total number of locks exceeds the lock table size
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
    at org.springframework.orm.hibernate3.HibernateTransactionManager.convertJdbcAccessException(HibernateTransactionManager.java:805)
    at org.springframework.orm.hibernate3.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:791)
    at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:664)
    It always logs the Mysql error code 1206:
    MySQL :: MySQL 5.4 Reference Manual :: 13.6.12.1 InnoDB Error Codes
    1206 (ER_LOCK_TABLE_FULL)
    The total number of locks exceeds the lock table size. To avoid this error, increase the value of innodb_buffer_pool_size.
    The value of innodb_buffer_pool_size is set to 8388608 (8MB) on my server.
    In the documentation (MySQL :: MySQL 5.4 Reference Manual :: 13.6.3 InnoDB Startup Options and System Variables) it says that the default is 128MB.
    Can i set the value to 134217728 (128MB) or will this cause other problems? Will this setting solve my problem?
    Thanks for your help.

    I already found an entry from Kablink:
    https://kablink.org/ssf/a/c/p_name/s...beonprem_url/1
    But i think this can't be a permanent solution...
    Our MySQL Server version is 5.0.95 running on sles11

  • [svn:bz-trunk] 21048: moving the locking of MessageService. subscribeLock one level up in the for loop.

    Revision: 21048
    Revision: 21048
    Author:   [email protected]
    Date:     2011-04-08 06:47:21 -0700 (Fri, 08 Apr 2011)
    Log Message:
    moving the locking of MessageService.subscribeLock one level up in the for loop.
    in case of multiple subscribers, we only lock once
    checkintests pass
    Modified Paths:
        blazeds/trunk/modules/core/src/flex/messaging/services/MessageService.java

    I have finally been able to replicate the behavior that you are seeing on another computer once the image was large enough.  Here are a few notes about this behavior:
    First. The UI only slows down when the images are large, 16 bit images.  The reason why this is unique to 16 bit images is that they can only be displayed on the front panel as 8 bit images.  The workaround that Weiyuan suggested to change the 16 bit display mapping hints towards the root of the problem...that any time a mouse runs over the indicator, Windows asks the entire image to re-draw (having a separate indicator overlapping the image will create the same behavior).  With a 16 bit image, not only does the image have to re-draw on the screen but the 16 bit pixels need to be mapped to 8 bits.  When setting the 16 bit display mapping to Full Dynamic, this requires mor computation/pixel than 90% dynamic or one of the other mapping schemes.
    This is expected behavior if your program is running and you're trying to display a large 16 bit image.  To fix this behavior there are a couple options:
    Change the 16 bit display mapping to something other than full dynamic.  You can choose which 8 bits to display or if you want to map the bits. 
    Resize the image just for viewing purposes on your front panel (since you aren't going to view every single pixel of you image on the screen). You can use the IMAQ Resample.vi to do this.  This will allow you to take your 1500x1500 pixel image and only display a 500x500 pixel version.
    If you are interested in viewing small details of the large image, consider just displaying a smaller region of interest at a time.
    Let me know if any of these solutions work for you.  Good luck on your application.
    Zach C.
    Field Engineer
    Greater Los Angeles

  • Regarding View Size Inside Tab Strip

    Hi All,
    I'm having a Tabstrip with 2 tabs. Inside which i'm having ViewContainerElememt on each tab. On Each View I'm having one dropdown & a table .
    In the first Tab i'm also having a Text View.If there is no values in the dropdown then that text view ll be displayed and not the Table . If there is values in the drop down then the table ll dispaly & not the Text view.
    Wat happens is,if there is value in the Dropdown then the table is getting displayed & the view is displaying in Full screen. If there is no value then the Textview is displaying.At that time the View Size is Reducing to Half.
    How to fix the ViewContainer Element inside that Tab ?
    I tried with giving Width as 100%  but still it is not coming.
    Helpful Answers ll be Rewarded.
    Regards,
    Padmam.

    Hi Padman
    Set the height property of tabstrip control to some fixed value.i.e 800px or whatever you want. it will fix the height of each tab.
    Regards
    Naresh

  • Network slow in one direction

    Hi,
    I have a strange problem. The network is slow in one direction, between a Solaris 10 box and a few Linux/Windows boxes.
    Here is test result with iperf:
    bash-3.00# ndd -set /dev/tcp tcp_cwnd_max 1048576
    bash-3.00# /Desktop/iperf-2.0.3/src/iperf -c slave014 -d
    Server listening on TCP port 5001
    TCP window size: 48.0 KByte (default)
    Client connecting to slave014, TCP port 5001
    TCP window size: 48.0 KByte (default)
    [  5] local 192.168.128.175 port 40811 connected with 192.168.128.214 port 5001
    [  6] local 192.168.128.175 port 5001 connected with 192.168.128.214 port 37143
    [  6] 0.0-10.1 sec 900 MBytes 751 Mbits/sec
    [  5] 0.0-10.2 sec 4.66 MBytes 3.85 Mbits/sec
    The speed between the linux/window hosts are OK. They are all connected to a unmanaged GB switch.
    It does not look like duplex problem:
    bash-3.00# dladm show-link
    e1000g0 type: non-vlan mtu: 1500 device: e1000g0
    e1000g1 type: non-vlan mtu: 1500 device: e1000g1
    aggr1 type: non-vlan mtu: 1500 aggregation: key 1
    bash-3.00# dladm show-dev
    e1000g0 link: up speed: 1000 Mbps duplex: full
    e1000g1 link: up speed: 1000 Mbps duplex: full
    I've tried different tcp_xmit_hiwat tcp_recv_hiwat tcp_max_buf tcp_cwnd_max settings but it does not appear to help.
    Any recommendations will be greatly appreciated.

    I'm talking about either basic ethernet or a wifi connection. Basic ethernet has the same speed in either direction ie 'downstream' or 'upstream'. I don't know the specifics of wifi but I'm pretty sure it too has identical speeds in either direction.
    I only have an ssh server on my linux machine so I'm always running the copy from the mac. To summarize:
    $ scp file1 linux:/tmp -> 2.2Mb/s
    $ scp linux:/tmp/file1 . -> 100Kb/s
    I know that apple wifi cards sometimes have problems with linksys routers, but even with a normal ethernet connection the speeds are the same.
    ibook G4 Mac OS X (10.3.9)

  • Locking the size of flash player?

    is there a way to lock the size of flash player so that the
    user cannot resize the window?

    Online or for Offline (Projector) ?
    For Offline Projector you can use Jugglor
    http://www.jugglor.com
    Setup Settings -> Windows Options
    Regards
    FlashJester Support Team
    e. - [email protected]
    w. - www.flashjester.com
    "This has been one of the most impressive and thoroughly
    pleasant
    experiences of customer support I have ever come across -
    astounding!"
    Director - hedgeapple

  • So I have purchased every song on the Up All Night album by One Direction but it isn't showing up as Purchased in the iTunes store and it isn't saying that I can download the iTunes LP...help!

    I bought every single song on the Up All Night album by One Direction, but iTunes is not showing the album as purchased when I'm in the iTunes store. It doesn't even have the complete my album option. It's showing as full price and I don't want to pay $12.99 just so that I can have the iTunes LP. However, I do really want the iTunes LP. What do I do?

    Then you need to click the link below and fill out the email form to the itunes store about the issue
    http://www.apple.com/support/itunes/store/games/

  • ADF - Multple View Objects in one ADF table - Jdeveloper 11g

    Hi,
    I'm using Jdeveloper 11g, is there a way to use multiple view objects in one ADF table? And if so, do you have an example?
    In my case the view objects are not based on a database table they were created based on an ESB wsdl, one is for person and one is for address.
    Any information or pointers you could provide would be appreciated.
    Thanks!

    Hi,
    That would be a good solution, however, I'm supposed to see if there is a way to use the VOs that were created for person and address. Even better if the solution requires little coding.
    Is it possible to combine these two VOs into a single VO to use with an ADF table or to use both of them in a single table? Or is there some other solution that would enable me to use the person and address VOs in a similar manner?
    Thanks!

  • How do I view more than one image at the same time in CS6?

    How do I view more than one image at the same time in CS6?

    Hi there
    If you go to Window > Arrange you can choose from several view options. Below I have selected Two-Up Horizontal since I have two images, but you can select other options if you have more than one image.

Maybe you are looking for