Java Code Examples for org.eclipse.draw2d.IFigure#isShowing()

The following examples show how to use org.eclipse.draw2d.IFigure#isShowing() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TableUtil.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Calculate the real selected objects in the selected bounds, complement
 * the list if not in it.
 * 
 * @param bounds
 * @param selection
 * @param children
 */
public static void calculateNewSelection( Rectangle bounds, List selection,
		List children )
{

	for ( int i = 0; i < children.size( ); i++ )
	{
		EditPart child = (EditPart) children.get( i );
		if ( !child.isSelectable( ) || isInTable( child ) )
			continue;
		IFigure figure = ( (GraphicalEditPart) child ).getFigure( );
		Rectangle r = figure.getBounds( ).getCopy( );
		figure.translateToAbsolute( r );

		Rectangle rect = bounds.getCopy( ).intersect( r );

		if ( rect.width > 0
				&& rect.height > 0
				&& figure.isShowing( )
				&& child.getTargetEditPart( CellDragTracker.MARQUEE_REQUEST ) == child
				&& isFigureVisible( figure ) )
		{
			if ( !selection.contains( child ) )
			{
				selection.add( child );
			}

		}
	}
}
 
Example 2
Source File: RootDragTracker.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
private List calculateNewSelection( )
{

	List newSelections = new ArrayList( );
	List children = getAllChildren( );

	// Calculate new selections based on which children fall
	// inside the marquee selection rectangle. Do not select
	// children who are not visible
	for ( int i = 0; i < children.size( ); i++ )
	{
		EditPart child = (EditPart) children.get( i );
		if ( !child.isSelectable( ) || isInTable( child ) )
			continue;
		IFigure figure = ( (GraphicalEditPart) child ).getFigure( );
		Rectangle r = figure.getBounds( ).getCopy( );
		figure.translateToAbsolute( r );

		if ( getMarqueeSelectionRectangle( ).contains( r.getTopLeft( ) )
				&& getMarqueeSelectionRectangle( ).contains( r.getBottomRight( ) )
				&& figure.isShowing( )
				&& child.getTargetEditPart( MARQUEE_REQUEST ) == child
				&& isFigureVisible( figure ) )
			newSelections.add( child );

	}
	return newSelections;
}
 
Example 3
Source File: ReportDomainEventDispatcher.java    From birt with Eclipse Public License 1.0 4 votes vote down vote up
private boolean isFocusEligible(IFigure fig) {
	if (fig == null || !fig.isFocusTraversable() || !fig.isShowing())
		return false;
	return true;
}
 
Example 4
Source File: ReportFocusTraverseManager.java    From birt with Eclipse Public License 1.0 4 votes vote down vote up
public boolean isFocusEligible(IFigure fig) {
	if (fig == null || !fig.isFocusTraversable() || !fig.isShowing())
		return false;
	return true;
}