Code Monkey home page Code Monkey logo

flex-pagination's Introduction

##Pagination UI for Flex 基于Flex SDK 4.6.x + page4as3lib的分页组件

项目主页:

http://www.k-zone.cn/project/flexpagination.html

Demo预览地址:

http://www.k-zone.cn/pagination/

分页逻辑:

https://github.com/kenshin/as-pagination

使用方法:

引入:

add page4as3lib-1.0.swc to libs folder

或者:

add com\ksria\flex\pagination\ to src folder

使用(AS3方式):

import com.ksria.flex.pagination.PaginationComp;
import com.ksria.flex.pagination.event.PaginationEvent;

private function pageTurningHandler( event : PaginationEvent ) : void {
    trace( '当前为:' + event.page + '页' );
}

private function createPagination() : void {
    
	var page : PaginationComp = new PaginationComp();
	
	page.page     = 1;
	page.total    = 307;
	page.pagesize = 6;
	page.offset   = 2;
	page.length   = 8;
	
	page.backLabel     = "<<";
	page.previousLabel = "<";
	page.nextLabel     = ">";
	page.forwardLabel  = ">>";
	
	page.pageTurnVisible = true;
	page.pageCtrlVisible = true;
	page.advModel        = true;
	page.pageCmbVisible  = true;
	
	page.addEventListener( PaginationEvent.PAGE_TURNING, pageTurningHandler );
	
	xxxxx.addElement( page );
}

使用(Flex方式):

<s:Application 
    xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/mx" 
    xmlns:pagination="http://pagination.ksria.com" 
>

<pagination:PaginationComp 
    pagesize="6" offset="2" length="8" 
	backLabel="后滚" previousLabel="后退" nextLabel="前进" forwardLabel="前滚" 
	pageTurnVisible="false" pageCtrlVisible="false" advModel="false" pageCmbVisible="true"
>

</pagination:PaginationComp>

Paginaton参数:

//分页属性
page.page     = 1;           //当前页
page.total    = 307;         //分页总数
page.pagesize = 6;           //每页显示的数据
page.offset   = 2;           //偏移量
page.length   = 8;           //分页的长度
//标签属性
page.backLabel     = "<<";   //后滚按钮的显示标签
page.previousLabel = "<";    //后退按钮的显示标签
page.nextLabel     = ">";    //前进按钮的显示标签
page.forwardLabel  = ">>";   //前滚按钮的显示标签
//控制条属性
page.pageTurnVisible = true; //是否显示前滚/后滚按钮
page.pageCtrlVisible = true; //是否显示前进/后退按钮
page.advModel        = true; //是否显示高级模式
page.pageCmbVisible  = true; //是否显示下拉列表

更新日志:

version 1.0 [2011-01-08]

  • 基于Flex SDK 4.6.x
  • 基于page4as3lib
  • 适合任意Flash Player 10.x+
  • 符合UI/UE设计**,高度定制化

联系方式:

版权和许可:

Copyright 2012 k-zone.cn
Licensed under MIT or GPL Version 2 licenses

flex-pagination's People

Contributors

kenshin avatar

Watchers

Guoyao Wu avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.