Line resizing

I want to draw lines which can have their line thickness resized by either the X or Y plane rather than both.
For example I have some lines drawn on the page and the page size changes say it gets wider. How would I then make the x thickness of each of the lines increase rather than increasing the width of the whole thing?
I am able to change the co-ordinates its just the line thickness I cannot quite work out without having to write my own version of BasicStroke.
Chris.

This is what I did.
I had a JComponent class that wrapped a created line object.
I had a collection of line objects and in the parent panels paintComponent() I would iterate through all my line objects and ask the JComponent line wrapper object to draw object into the parent panels graphic context.
Here is the method...
* Draw THIS shape into the graphics region of the Network Panel.
public void drawShape(Graphics2D g2, ShapesPanel panel)
// set the line color
g2.setColor(_strokeColorForLine);
// set the line width
Stroke lineStroke = new BasicStroke(panel.LINE_STROKE_WIDTH);
g2.setStroke(lineStroke);
// remove the jaggies
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
// draw the lines to connect the nodes with
g2.draw(_line);
I passed in the panel in case I need more info or if I'm doing animation after I change the stroke I can do panel.repaint().
Hope this helps.
Ed

Similar Messages

  • Attempting to resize my root partition on LVM

    My root partition is currently full, so I want to resize it.  I'm using LVM and the filesystem is ext4, so I assumed it should be easy enough. My plan was to reduce my /home to make space.  However, when following the instructions in the wiki get the following error:
    # resize2fs /dev/vg/syshome 450G
    resize2fs 1.42.4 (12-June-2012)
    Filesystem at /dev/vg/syshome is mounted on /home; on-line resizing required
    resize2fs: On-line shrinking not supported
    According to https://ext4.wiki.kernel.org/index.php/ … esystem.3F however, online resizing should be possible.
    What am I missing?
    Last edited by phunni (2012-08-03 20:37:26)

    First, install and use ncdu to check what's eating up all the space.
    $ ncdu / --exclude /home --exclude /media
    Maybe it's easily fixed, like a log file or something. Speaking of which, learn2logrotate. Here's my /etc/logrotate.conf.
    Then if you still want to grow the root partition, try this: https://wiki.archlinux.org/index.php/LV … cal_volume
    Next time please specify in the title that it's about LVM.

  • Oracle 11g unreasonable large data file that can't be shrunk

    I got this Oracle 11g installed on my win7 just for running my local application. In the Enterprise Manager the "USERS" tablespaces shows over 12g for allocated size, about 1g for Space Used(also see the table snippet below), only about 8% of space is used. However, when I tried to shrink the data file/space even to half of its current size, both from command line(resize) and Enterprise Manager, i got the error that says "Failed to commit: ORA-03297: file contains used data beyond requested RESIZE value ". I was able to resize my TEMP tablespace successfully with the same command.
    Any insight on this? thanks a lot. I'm about to run out my hard drive space.
    Name / Allocated Size(MB) /Space Used(MB) /Allocated Space Used(%) /Auto Extend /Allocated Free Space(MB) /Status Datafiles /Type /Extent Management /Segment Management
    USERS / 12,288.0 /1,026.7 /8.4 /YES /11,261.3 / /1 /PERMANENT /LOCAL /AUTO

    Jonathan Lewis wrote:
    user1340127 wrote:
    However, when I tried to shrink the data file/space even to half of its current size, both from command line(resize) and Enterprise Manager, i got the error that says "Failed to commit: ORA-03297: file contains used data beyond requested RESIZE value ". I was able to resize my TEMP tablespace successfully with the same command.
    Any insight on this? thanks a lot. I'm about to run out my hard drive space.
    You have an object stored at the end of the datafile, you will need to move it down the file (or to another tablespace) before you can shrink the file. I though OEM had a "tablespace map" feature to help you see what objects were located where but if not, see:In EM (or 10g dbconsole, at any rate), you select a tablespace, drop down menu Show Tablespace Contents, then there is a tablespace map icon to expand the map. It can be slow. Then you can scroll down to the bottom, scroll up and look for where the last non-green extents are. Also, you can find the beginning of datafiles (if you have multiple data files in the tablespace) by watching for purple header blocks. Hovering over the segments gives information, and clicking on them (or selecting segments in the contents list up above) shows where all the extents are in yellow. I haven't tried the reorganize link...

  • How do I get AS to print everything?

    This is about the second method I'm trying to get a data grid to print.  In this attempt, I'm dynamically creating things and then printing them.  All items are printed, but the format sucks.
    1) the user clicks a button below the data grid
    2) in code I create a PrintAdvancedDataGrid, but I don't know how to adjust individual columns
    3) all columns are one width and no wordwrapping happens
                private function printCaseNotesAS1():void
                    var flexPrint:FlexPrintJob = new FlexPrintJob();
                    var myGridPrint:PrintAdvancedDataGrid = new PrintAdvancedDataGrid();
                    var numNotes:int = model.dpCASENOTES.length;
                    if (numNotes > 0)
                        var dataSource:ArrayCollection = new ArrayCollection();
                        for (var i:int = 0; i < numNotes; i++)
                            var descHolder:Object = new Object();
                            descHolder.Description = (model.dpCASENOTES[i] as CaseNotesVO).shortDescription.toString();
                            descHolder.Description += "\r\n\tprinted from AS1";
                            descHolder.NoteNum = "";
                            descHolder.Notes = "";
                            descHolder.UpdatedBy = "";
                            descHolder.PostedDate = "";
                            dataSource.addItem(descHolder);
                            var dataHolder:Object = new Object();
                            dataHolder.Description = "";
                            dataHolder.NoteNum = (i+1).toString();
                            dataHolder.Notes = (model.dpCASENOTES[i] as CaseNotesVO).notes.toString();
                            dataHolder.UpdatedBy = "";
                            dataHolder.PostedDate = "";
                            dataSource.addItem(dataHolder);
                            var footHolder:Object = new Object();
                            footHolder.Description = "";
                            footHolder.NoteNum = "";
                            footHolder.Notes = "";
                            footHolder.UpdatedBy = (model.dpCASENOTES[i] as CaseNotesVO).updatedBy.toString();
                            footHolder.PostedDate = (model.dpCASENOTES[i] as CaseNotesVO).postTs.toString();
                            dataSource.addItem(footHolder);
                        if (flexPrint.start())
                            FlexGlobals.topLevelApplication.addElement(myGridPrint);
                            myGridPrint.dataProvider = dataSource;
                            myGridPrint.width = flexPrint.pageWidth;
                            myGridPrint.height = flexPrint.pageHeight;
                            myGridPrint.variableRowHeight = true;
                            flexPrint.addObject(myGridPrint);
                            while (myGridPrint.validNextPage)
                                myGridPrint.nextPage();
                                flexPrint.addObject(myGridPrint);
                            flexPrint.send();
                            FlexGlobals.topLevelApplication.removeElement(myGridPrint);
                    else
                        Alert.show("Nothing to print","Warning");
    How do I address the properties of columns?  The results looks like this
    a) all columns the same width
    b) no wordwrapping for long text
    I did a print to file to get it here, but it came out in a non-text format.  Any ideas on how to 1) print it or 2) view it?

    I couldn't figure out using code assist how to do that.  I didn't have any examples to work from.
    The goal would be to eliminate the grid lines, resize the columns to logical sizes, and allow "Notes" to wordwrap.
    I'm going to start a new thread on the coding solution found at:
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/printing/FlexPrintJo b.html
    This adds some features that would be nice (headers and footers), but I don't understand it

  • Scrolling bug ?

    import javax.swing.*;
    import java.awt.BorderLayout;
    public class Scroll extends JDialog {
         Box box = Box.createVerticalBox();
         public void kuku() {
              setTitle("Test scrolling");
              box.add( new JLabel("Hello"));
              box.add( new JLabel("you"));
              box.add( new JLabel("all"));
              box.add( new JLabel("out"));
              box.add( new JLabel("there !"));
              box.add( new JLabel("-------"));
              box.add( new JButton("one"));
              box.add( new JButton("two"));
              box.add( new JButton("three"));
              getContentPane().add(new JScrollPane(box) , BorderLayout.CENTER);
              pack();
         public static void main (String[] args) throws InterruptedException {
              try {
              //     UIManager.setLookAndFeel(
              //          "com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
              catch (Exception e) {
                   System.out.println(e);
              Scroll t1 = new Scroll();
              t1.kuku();
              t1.show();
    } Run this code ( you can also uncomment the Look&Feel setting line ), resize the dialog vertically to half ( or even smaller ) size, then click (and hold) on the vertical scrollbar and slowly move down to the lowest position and back up to the top ( normal drag-scrolling ). On my system the scroll is not smooth, but jumps at one place ( at the location, where it was before clickin on the bar ). It can always be reproduced.
    Is this a known bug ?
    I use Sun JDK 1.4.1_03 on windows 200 pro SP3.

    Windows 2000 Professional Service Pack 3 and Sun JDK/JRE v1.4.1_03-b02 on a Pentium III 866 MHz.
    Are you sure you don't see anything wrong ?
    Make it so, the the visible area is about 40% of the entire area.
    Then drag the scrollbar up and down slowly ( so it is easier to see the problem ). On my system, the content is scrolled smoothly as I move the mouse, except at one place, where is stops even if I am still moving the mouse, then after about 20 pixels it jumps and cacthes up.
    To make it more visible, first scroll to the middle, release the mouse button and then start again scrolling, it should get stuck and then jump right there in the middle position ( that is, when you are moving over it, either from the bottom up or from top down ).
    Regards,
    stein

  • Expand VMDK Mount in Oracle Enterprise Linux

    I have a VM that is running Oracle Enterprise Linux. I'd like to expand a mount but i'm not quite sure how. It's running the following version:
    Linux version 2.6.39-200.32.1.el5uek ([email protected]) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-52)) #1 SMP Wed Sep 26 21:00:27 PDT 2012
    Oracle Linux Server release 5.8
    I was told through the GUI you can do it with no downtime, can someone show me the way to do this?

    It's usually a good idea to test everything . The pvcreate command is not necessary. The following is a protocol of extending the LVM root volume of Oracle Linux 5.8 under VirtualBox. The same will also work for VMWare. The whole process took only a couple of minutes.
    [root@vm016 ~]# fdisk -l /dev/sdb
    Disk /dev/sdb: 12.8 GB, 12884901888 bytes
    255 heads, 63 sectors/track, 1566 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
      Device Boot      Start        End      Blocks  Id  System
    /dev/sdb1              1        1566    12578863+  8e  Linux LVM
    [root@vm016 ~]# pvdisplay
      --- Physical volume ---
      PV Name              /dev/sda2
      VG Name              VolGroup00
      PV Size              19.89 GB / not usable 19.49 MB
      Allocatable          yes (but full)
      PE Size (KByte)      32768
      Total PE              636
      Free PE              0
      Allocated PE          636
      PV UUID              vboBeq-1gAF-m522-oKaf-E3wE-tUTD-QGoE5b
    [root@vm016 ~]# vgextend /dev/VolGroup00 /dev/sdb1
      No physical volume label read from /dev/sdb1
      Writing physical volume data to disk "/dev/sdb1"
      Physical volume "/dev/sdb1" successfully created
      Volume group "VolGroup00" successfully extended
    [root@vm016 ~]# lvextend -L+10G /dev/VolGroup00/LogVol00
      Extending logical volume LogVol00 to 27.91 GB
      Logical volume LogVol00 successfully resized
    [root@vm016 ~]# resize2fs /dev/VolGroup00/LogVol00
    resize2fs 1.39 (29-May-2006)
    Filesystem at /dev/VolGroup00/LogVol00 is mounted on /; on-line resizing required
    Performing an on-line resize of /dev/VolGroup00/LogVol00 to 7315456 (4k) blocks.
    The filesystem on /dev/VolGroup00/LogVol00 is now 7315456 blocks long.
    [root@vm016 ~]# pvdisplay
      --- Physical volume ---
      PV Name              /dev/sda2
      VG Name              VolGroup00
      PV Size              19.89 GB / not usable 19.49 MB
      Allocatable          yes (but full)
      PE Size (KByte)      32768
      Total PE              636
      Free PE              0
      Allocated PE          636
      PV UUID              vboBeq-1gAF-m522-oKaf-E3wE-tUTD-QGoE5b
      --- Physical volume ---
      PV Name              /dev/sdb1
      VG Name              VolGroup00
      PV Size              12.00 GB / not usable 28.05 MB
      Allocatable          yes
      PE Size (KByte)      32768
      Total PE              383
      Free PE              63
      Allocated PE          320
      PV UUID              UPW56I-Z59J-p8bS-HCru-3dX1-9dFB-9IBlZo

  • Flex datagrid problem - $20 reward

    My Datagrids don't seem to work as I would expect.
    The biggest issue is that resizing column seems to not be
    very intuitive, grabbing directly on the dividing line resizes the
    parent SizeableTitleWindow which may actually shrink the table with
    the window, if I grab to the side of the line, but still with the
    resize cursor, it seems to resize most of the time like expected,
    but i need it to work like expected for people without training
    them to grab to the side.
    It also seems that if I resize the parent SizeableTitleWindow
    and it forces the datagrid to shrink smaller than the datagrid
    'wants' to be it causes a white 'box' to hang out the side and
    bottom of the SizeableTitleWindow the size it wants to be, this
    also happens if I scroll the grid with my mousewheel without
    resizing, this looks bad whe I try to show my client what I have
    built.
    I will pay $10, via paypal, to the first person that provides
    a usable solution to each of these problems.

    Do to confidentiality I can't give the actual code/structure,
    so I created a simple recreation and in the process found the white
    box only happens when it has an itemrenderer in a column, but
    unfortunately it is needed that way so I still need a fix. I did a
    screen capture to demo both problems.
    demo:
    http://www.omnibizsolutions.com/DataGrid/DataGrid.html
    code:
    http://www.omnibizsolutions.com/DataGridCode.rar

  • Hiding Dim Name in Row section

    Useing Analyzer 6.5.1 and we are trying to hide one of two Dim's that are in the Row section. We only want one Dim to show in the Row description. Any ideas on how to do this. I can't find anything in any of the documents.

    Not sure if this works in 6.5, I'm on 7.0. The only thing I found that works is to resize the column so that you can't see it. If your report has year DIM and Month DIM iin the rows and you want to hide year, while in spreadsheet view hover your mouse over the line between year column and month column. The mouse will change to a two headed arrow and allow you to drag the line, resizing the column width. Drag the line towards the left until you can no longer see the Year DIM in your view. It's not the neatest way to do it, but it seems to work.Hope that helps.

  • I am losing resolution when I resize or rotate a line I have drawn.

    Can anyone help me?  I have been using photoshop to turn my drawings into digital stamps for crafting.  I always import my image, then with the pen tool I re-draw it in photoshop.  Usually I can take say my eye I had drawn and resize it or rotate it and it's perfect.  Lately I try any of that ant the lines will get very pixelated or lose resolution making them super fuzzy and ugly.  Does anyone know why this is now happening?
    I used to be able to duplicate it and flip it to have two perfect eyes, but again when I do that now same thing happens, it gets horribly pixelated. 
    I have attached two examples...
    Any helps is very much appreciated.  I am having the worst time trying to figure out why it's doing this all of the sudden. It has never done that before.  I have always been able to duplicate, rotate, and resize without it losing resolution or had the lines so fuzzy or pixelated.
    Thank you,
    Betty

    Hi again,
    Did you mean screen shots of my settings?  Maybe that would help?
    These are all my settings, and each time I draw a line and flip it or rotate it, it starts to lose resolution.  It is also now doing it when I take the finished file and place it into a "guide" file for making a watermark catalog image. Once I shrink the photo it looses resolution really badly.

  • Looking for a terminal that does not truncate lines when resized

    I am a huge fan of tiling window managers in general and have used dwm exclusively for over a year now. One thing that drives me crazy though is that when I switch a terminal window from being the primary window to a secondary and then back again, all of the lines are truncated to the smaller width. If I am watching a log file for example, this makes the previous output totally unreadable. Does anyone have a solution for this? Is there a way to make the terminal not truncate the lines if resized to a smaller width?
    Thanks!

    Try
    https://bbs.archlinux.org/viewtopic.php?pid=548267
    http://tomayko.com/writings/StupidShellTricks

  • [SOLVED] vim status line invisible/wrapped in terminal unless I resize

    Hi all,
    Whenever I open a file in Vim within a terminal (urxvt, Terminator, xterm) the status line at the very bottom is either invisible or wrapped onto a new line (ie "bot" or "All" will span a line) until I manually resize the window by dragging an edge - this seems to fix the issue (and Vim continues to display correctly even if I continue resizing) .  I tried changing the window geometries (in .Xresources for urxvt, and in terminator via --geoemtry) without luck.  Changing fonts (type, size) doesn't help either.
    I'm running Openbox on a recent Retina MacBook Pro with nVidia drivers, with infinality-bundle installed.
    The same behavior occurs under Awesome, and I tried various Openbox themes, all with the same result.   So, perhaps its a bash or nVidia issue.
    gVim works perfectly though.
    Any thoughts?
    Thanks!
    Last edited by iamjerico (2014-03-26 19:54:12)

    The status line - the very bottom line - is either (1) below the visible portion of the terminal window - and remains so even if I page down repeatedly (urxvt) - or (2) is visible but the text appearing on it, like "bot" or "all" that are normally visible on the lower right corner, will wrap around (Terminator).  That is, I'll see "b" on the bottom right corner and then "ot" on the bottom left but a line lower.  In either case, if I manually resize the terminal window, it "catches up" and all appears correctly.
    Update: when running Vim without opening a file (just "vim" from the command line), in Terminator ALL of the visible text from the startup text is wrapped (ie "Vim is open source and freely distributable" wraps onto a second line).  In urvxt, that text appears normally but the status line is not visible.  In both cases, a window resizes corrects the display.
    Very strange.

  • Resizing Image in AlertSet. Line Graph

    Hi Experts,
    I am using a dvt component LineGraph
    I have created an alertSet and placed some alarms.
    But when I click on zoom icon, the alarm icons are also stretching along with the graph.
    Is there a way to resize the alarm icons after the graph is zoomed ?
    Thanks,
    Ajay Potharaju

    In the line:
    BufferedImageOp op = new AffineTransformOp(AffineTransform.getScaleInstance(scalex_width,scalex_height),null);
    You set the interpretation type to null. I would set it to one of the two options either: BILINEAR or NEAREST_NEIGHBOUR.
    I can't remember which one I have used but I think this will solve your problem.

  • Line charts: data point symbol resize?

    I'm working with charts in Pages and would like to be able to have a greater variety of lines in my line chart. In addition to selecting the data point symbol (square, circle, etc), I wish I could resize that symbol. I know I can resize the line width from the Graphic tab of the Inspector.
    Is there a way to shrink the data point symbol from the Inspector? From anywhere?

    If I understand your question, this from the Pages online help may give the answer:
    To mark line, area, and scatter charts with data point symbols:
    Select the entire chart. You can also select the chart series (the line or area shape) that you want to mark with data point symbols.
    Click Inspector in the toolbar, and then click the Chart Inspector button.
    Click Series (except for scatter charts).
    Choose a symbol from the Data Point Symbol pop-up menu.
    Choose one of the following options from the Symbol Fill pop-up menu:
    To fill the symbol with the same color as its outline, choose Use Stroke Color.
    To fill the symbol with a solid color, choose Color Fill, click the Fill color well, and pick a color.
    To fill the symbol with a gradient, choose Gradient Fill and use the gradient controls to set the colors and change the angle of the gradient.
    To fill the symbol with an image, choose Image Fill and select the image you want. You can also resize the image by choosing an option from the pop-up menu above the Choose button.
    To fill the symbol with a tinted image, choose Tinted Image Fill and select the image you want. Click the color well to the right of the Choose button to change the tint color. You can also resize the image by choosing an option from the pop-up menu above the Choose button.

  • I am trying to resize the the lengths of the address bar and the search bar. I could before using a "line" between them to drag to resize. But this is now not s

    I am trying to resize the the lengths of the address bar and the search bar. I could before using a "line" between them to drag to resize. But this is now not showing. Any ideas?

    There is a simple way to try and fix the Issue.
    Try '''Resetting '''Your Toolbar to Default and Resize.
    '''You can always restore the default toolbar settings by clicking Restore Default Set in the Customize Toolbar window.'''
    For more step by step way of fixing the Toolbar Arrangement, [https://support.mozilla.org/en-US/kb/customize-firefox-controls-buttons-and-toolbars?esab=a&s=reset+toolbar&r=3&as=s Look at this Link]

  • Some lines are not scaled right when resizing

    Hello people,
    I recently have made a drawing in Illustrator CS5 of a certain vehicle. This size of the drawing is 2600 x 2583,5 px in a resolution of 72ppi for use on the web.
    Now I want to use this drawing on a website but therefor it needs to be resized to 160 x 146 px. When I scale down the drawing to the desired size there are some lines that aren't scaled down properly relative to the other lines. These lines become a stroke of 1pt and whatever I do, the stroke of these particular lines can not be sized to a value below 1pt.
    I have enabled "scale stroke & effects" in the preferences, unlocked all objects and most of the strokes are scaled down fine apart from a few wich will not be scaled below 1pt.
    Does anybody have a clue wat could be the cause of this?
    Greetings,
    Erik

    Thanks! The whole drawing is being scaled down correctly now.
    Greetings,
    Erik

Maybe you are looking for

  • Battery and WiFi issues after upgrade to 1.1.1?

    Since my upgrade to 1.1.1, my iPhone has had HORRIBLE battery life. I charged it all night last night and it is only almost noon, and I have not used it much at all, and it is already DEAD. It forced shutdown just now. Another issue that I have been

  • I need Information on this intresting OBJECT and i want to know what is XI

    On a monthly basis, after all data has been fed into One Source and the monthly One Source calculations have been performed, an extract will be run from One Source , converted via XI and loaded to BW.  The current plants that will be extracted from O

  • Smart Playlists not updating to my iPod

    I've got a few Smart Playlists set up. They select by "Least Recently Played". The tunes that are listed for the Smart Playlists seem to follow the rules I created. When I listen to a bunch of tunes on my iPod and then Sync to iTunes, I don't get the

  • TS4009 How do I see the photos I have stored on my Icloud

    How do I see the photos I have stored on my Icloud

  • [Solved] Keyboard layout - best practice

    I have two laptops running Arch Linux. On the first I have set norwegian keyboard with: Option "XkbLayout" "no" in then keyboard section of /etc/X11/xorg.conf.d/10-evdev.conf. On the second I have usede localectl set-x11-keymap no from CLI to set the