Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 248576 Details for
Bug 451019
TableWrap layout system for Sections is truncating elements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
Part of the class that creates the Section
PageDisplayUtilitiesClass.txt (text/plain), 4.64 KB, created by
Leandro Macedo
on 2014-11-11 12:12:50 EST
(
hide
)
Description:
Part of the class that creates the Section
Filename:
MIME Type:
Creator:
Leandro Macedo
Created:
2014-11-11 12:12:50 EST
Size:
4.64 KB
patch
obsolete
> public static TableWrapData createTableWrapData( int colspan, int indent, int maxWidth ) > { > TableWrapData td = new TableWrapData( ); > td.grabHorizontal = true; > td.indent = indent; > td.colspan = colspan; > td.maxWidth = getTableWrapMax(); > td.maxWidth = maxWidth; > > return td; > } > > public static Section CreateUserAssistSectionMulti( Composite parent, FormToolkit toolkit, String[] helpText, int style) > { > > Section section = toolkit.createSection( parent, style ); > > UserAssistSectionButton button = new UserAssistSectionButton( section, SWT.NONE, style ); > section.setTextClient( button ); > TableWrapLayout sectionLayout = new TableWrapLayout( ); > sectionLayout.verticalSpacing = 0; > sectionLayout.horizontalSpacing = 10; > sectionLayout.bottomMargin = 20; > sectionLayout.leftMargin = 5; > sectionLayout.numColumns = 1; > section.setLayout( sectionLayout ); > > Composite sectionComp = toolkit.createComposite(section, SWT.NONE); > TableWrapLayout sectionCompLayout = new TableWrapLayout(); > sectionCompLayout.numColumns = 1; > sectionCompLayout.verticalSpacing = 0; > sectionCompLayout.horizontalSpacing = 0; > sectionCompLayout.topMargin = 0; > sectionCompLayout.bottomMargin = 5; > sectionCompLayout.leftMargin = 0; > sectionCompLayout.rightMargin = 0; > sectionCompLayout.makeColumnsEqualWidth = true; > TableWrapData sectionCompLayoutData = new TableWrapData(); > sectionCompLayoutData.align = TableWrapData.FILL; > sectionCompLayoutData.valign = TableWrapData.FILL; > sectionCompLayoutData.maxWidth = getTableWrapMax(); > sectionComp.setLayout(sectionCompLayout); > sectionComp.setLayoutData(sectionCompLayoutData); > section.setClient(sectionComp); > > StringBuilder helpTextBuilder = new StringBuilder(); > > for( int i=0; i < helpText.length; i++ ) > { > String text = helpText[i]; > if( i > 0 && text.length() > 0 && !text.equals(" ") ) > { > helpTextBuilder.append( "\n\n" ); > } > helpTextBuilder.append( text ); > } > helpTextBuilder.append( "\n\n" ); > final Text helpTextArea = toolkit.createText( sectionComp, helpTextBuilder.toString(), SWT.MULTI | SWT.WRAP | SWT.READ_ONLY ); > > FormColors colors = toolkit.getColors(); > helpTextArea.setForeground( colors.getColor( IFormColors.TB_TOGGLE ) ); > > TableWrapData labelLayoutData = new TableWrapData( TableWrapData.FILL, TableWrapData.FILL, 1,1 ); > labelLayoutData.maxWidth = getTableWrapMax(); > labelLayoutData.indent = 5; > labelLayoutData.grabHorizontal = true; > > helpTextArea.setLayoutData( labelLayoutData ); > > button.addMouseListener( new MouseListener() > { > > @Override > public void mouseDown( MouseEvent e ) > { > } > > public void mouseUp( MouseEvent e ) > { > UserAssistSectionButton button = (UserAssistSectionButton)e.getSource(); > Section parent = (Section)button.getParent(); > if( parent.isExpanded() ) > { > parent.setExpanded( false ); > } > else > { > parent.setExpanded( true ); > > parent.getParent().getParent().pack( true ); > Point size = parent.getParent().getSize(); > size.x +=1; > parent.getParent().setSize( size ); > parent.getParent().update(); > parent.getParent().redraw(); > size.x -= 1; > parent.getParent().setSize( size ); > parent.getParent().update(); > parent.getParent().redraw(); > } > > } > > public void mouseDoubleClick( MouseEvent e ) > { > } > > } ); > > > Hyperlink profMigrHyperLink = toolkit.createHyperlink(sectionComp, "", SWT.WRAP); > TableWrapData linkWrapData = new TableWrapData(TableWrapData.FILL, TableWrapData.FILL, 1,1); > linkWrapData.maxWidth = getTableWrapMax(); > linkWrapData.indent = 5; > linkWrapData.grabHorizontal = true; > profMigrHyperLink.setLayoutData(linkWrapData); > profMigrHyperLink.setText("Click here"); > profMigrHyperLink.setEnabled(true); > profMigrHyperLink.setForeground(colors.getColor(IFormColors.TB_TOGGLE)); > profMigrHyperLink.addHyperlinkListener(new HyperlinkAdapter() > { > public void linkActivated(HyperlinkEvent event) > { > PlatformUI.getWorkbench().getHelpSystem().displayHelp(currentHelpContextID); > } > }); > > return section; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 451019
: 248576 |
248577
|
248578