Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #5322

Re: How to clip child from layout manager

From Roedy Green <see_website@mindprod.com.invalid>
Newsgroups comp.lang.java.gui
Subject Re: How to clip child from layout manager
Organization Canadian Mind Products
Message-ID <2k6vl811ilsfinflma3vkfeehojbon5mm1@4ax.com> (permalink)
References <7a07006d-a3a8-4e09-b3a3-1cd9ee01328f@googlegroups.com>
Date 2013-04-05 20:51 -0700

Show all headers | View raw


On Fri, 5 Apr 2013 10:03:34 -0700 (PDT), FredK
<fred.l.kleinschmidt@gmail.com> wrote, quoted or indirectly quoted
someone who said :

>If the Swing container that uses this manager is too small to layout
>the children at preferred sizes, I want to clip one or more of them.

This is an idea I have wanted to implement for a long time.  You might
use some of the ideas.

Let us say I had a Demographics panel to display name, international
address and international phone numbers.

Given lots of space it would display name, address, country, postal
phone numbers.

If you prune back the space, the labels for fields disappear.

If you prune the space back further,  it would use smaller fonts, and
shorter fields (that scroll),

If you prune space back further , the second address line disappears,
then the first.  All but the first phone would disappear.  

If you expand the space, bit by bit the material reappears.

The component is aware of how much space it has and renders
appropriately.

It would look at the particular data and adjust the layout., so it
would not waste a lot of space with trailing spaces in fields.
-- 
Roedy Green Canadian Mind Products http://mindprod.com
Motors make noise, and that tells you about the feelings and attitudes 
that went into it. Something was more important than sensory pleasure -- 
nobody would invent a chair or dish that smelled bad or that made horrible 
noises -- why were motors invented noisy? How could they possibly be 
considered complete or successful inventions with this glaring defect?
Unless, of course, the aggressive, hostile, assaultive sound actually served
to express some impulse of the owner. 
~ Philip Slater (born: 1927 age: 85)
The Wayward Gate: Science and the Supernatural

Back to comp.lang.java.gui | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

How to clip child from layout manager FredK <fred.l.kleinschmidt@gmail.com> - 2013-04-05 10:03 -0700
  Re: How to clip child from layout manager markspace <markspace@nospam.nospam> - 2013-04-05 16:28 -0700
    Re: How to clip child from layout manager FredK <fred.l.kleinschmidt@gmail.com> - 2013-04-08 07:38 -0700
      Re: How to clip child from layout manager markspace <markspace@nospam.nospam> - 2013-04-08 10:00 -0700
  Re: How to clip child from layout manager Roedy Green <see_website@mindprod.com.invalid> - 2013-04-05 20:51 -0700
  Re: How to clip child from layout manager Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2013-04-08 14:08 -0700

csiph-web