Skip to main content

Issue 11 - Patch

3 replies [Last post]
Anonymous

I was trying to add a coment with this on the issue, but i didn't see were.
Do i have to sign some JCA or something like that?

This is a patch that solves the problem on issue 11. It makes the
ScrollPane vertical scrollbar visible when the columnControl is true.
The solution is only 3 lines added, 1 on the import section and 2 on the
setHasColumnControl function.
Here is the code:

// Add to imports section
*import javax.swing.ScrollPaneConstants;*

public void setHasColumnControl(boolean hasControl) {
boolean old = this.hasColumnControl;
if (hasControl) {
if (columnControlButton == null) {
// Create cloak button
columnControlButton = new ColumnControlButton(new
ColumnControlIcon());
}
columnControlButton.bind((JTable)this.getTable());
// Put button in scrollpane corner
scrollPane.setCorner(JScrollPane.UPPER_RIGHT_CORNER,
columnControlButton);
// ADDED LINE TO FIX ISSUE 11

*scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);*
}
else {
// ADDED LINE TO FIX ISSUE 11

*scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);*

try {
scrollPane.setCorner(JScrollPane.UPPER_RIGHT_CORNER, null);
}
catch (Exception ex) {
// Ignore spurious exception thrown by JScrollPane. This
is a Swing bug!
}
}
hasColumnControl = hasControl;
firePropertyChange("hasColumnControl", old, hasControl);
}

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

Reply viewing options

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

Hi Ricardo,

I committed your patch - thanks!.

A little comment, though: it looked like you could and did change the
status of the issue to "resolved" when adding the patch - my
understanding is that this should be done only when the patch actually
made it to the code basis. Better not touch the status, we might forget
to commit it, because it disappears from our todo list :-)

Jeanette

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

Ricardo Lopes

Sorry, my fault. I was tinking to put the status on "Works for me", but
i choose resolved.
Wont happend again.**

Kleopatra wrote:

>
> Hi Ricardo,
>
> I committed your patch - thanks!.
>
> A little comment, though: it looked like you could and did change the
> status of the issue to "resolved" when adding the patch - my
> understanding is that this should be done only when the patch actually
> made it to the code basis. Better not touch the status, we might
> forget to commit it, because it disappears from our todo list :-)
>
> Jeanette
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
> For additional commands, e-mail: jdnc-help@jdnc.dev.java.net
>
>
>

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

Kleopatra

Ricardo Lopes wrote:

> I was trying to add a coment with this on the issue,
> but i didn't see were.
> Do i have to sign some JCA or something like that?
>

no need to sign anything - but you have to be registered as user at
javadesktop, logged in, join the jdnc project (and maybe requested an
oberver role there, not sure about that, though). After that, you should
have write access to the issues. If that does not work out, please tell
me, so we can find out what's wrong.

[.. snipped patch ...]

looks good :-) I would love you to add it to the issues section, then we
can take it from there. Just a little hint: for easier reading here in
the forum you can format the code by putting the section into

[ code ]

// here's the code

[ /code ]

tags (without the spaces inside the tags, they are only there to keep
them visible in this case :-)

Jeanette

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