Skip to main content

Link

3 replies [Last post]
rbair
Offline
Joined: 2003-07-08
Points: 0

Hey guys, I'm wondering about this Link class, and associated classes. In the JGui framework we have an object that extends JLabel called the JHyperLink. It can be constructed based on an Action, or by passing in an ActionListener. The idea is that a hyperlink is basically a label that takes some generic action when clicked on.

The Link class, in contrast, seems to be built on the concept of URL linking only.

I'm thinking that a component more liberal in its intentions such as JHyperLink could be a base class from which JURLHyperLink or some such thing could extend, as opposed to the more restrictive Link class.

Currently I use JHyperLinks for things such as Cell renderers in tables, links on scroll up controls (ala xp), etc. Often these links are opening another JInternalFrame window as opposed to opening a URL.

Rich

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Mark Davidson

Hi Richard,

The link class represents a hyperlink (URL, display text and target)
type that can be rendered in a rich component context and will display
the contents of the url in a browser, editor pane, html renderer, etc...
when clicked.

On 07/20/2004 03:04 PM, jdnc-interest@javadesktop.org wrote:
> I'm thinking that a component more liberal in its intentions such as
> JHyperLink could be a base class from which JURLHyperLink or some
> such thing could extend, as opposed to the more restrictive Link
> class.

I think this would be a great idea to generalize this. The curren't Link
class. Link cell renderer was developed in the context of a demo which
would bridge the Java Desktop Client world with the sheer number of html
apps out there representing data entries. The concept was that you could
use a rich client app like a JDNC master/detail to narrow/filter a
search and clicking on the link type column would present more details
within a browser.

Could you please file an "Enhancement" Issue with a proposal so we can
track this?

https://jdnc.dev.java.net/servlets/ProjectIssues

Thanks,

--Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
For additional commands, e-mail: jdnc-help@jdnc.dev.java.net

rameshgupta
Offline
Joined: 2004-06-04
Points: 0

> Hey guys, I'm wondering about this Link class, and
> associated classes. In the JGui framework we have an
> object that extends JLabel called the JHyperLink. It
> can be constructed based on an Action, or by passing
> in an ActionListener. The idea is that a hyperlink is
> basically a label that takes some generic action when
> clicked on.
>
> The Link class, in contrast, seems to be built on the
> concept of URL linking only.
>
> I'm thinking that a component more liberal in its
> intentions such as JHyperLink could be a base class
> from which JURLHyperLink or some such thing could
> extend, as opposed to the more restrictive Link
> class.
>
> Currently I use JHyperLinks for things such as Cell
> renderers in tables, links on scroll up controls (ala
> xp), etc. Often these links are opening another
> JInternalFrame window as opposed to opening a URL.
>
> Rich

I implemented Hyperlink in the eNode framework as an Action. That allows me to put it in a menu (as a bookmark), or in a toolbar (as a navigation button) for free.

Such a link, when attached to a button, can be made to look like a label simply by setting button.setBorderPainted(false);

Ramesh

rbair
Offline
Joined: 2003-07-08
Points: 0

I'm just thinking aloud. While perusing the sources the Link just kind of looked out of place -- as if it had been placed in the project as part of a demo and not because it really belonged in the core part of the framework. I'm just curious as to what the thought is behind it. How would I use this thing? If its going to be core, then hopefully its robust enough to do more than just link to websites/urls. Anyway, that's the thought I had when I came across it.